I've recently asked Going to try to move some of my scipy/numpy calculation to GPU, how to avoid disappointing results? I've taken some time to explain the computational problem, that it runs in numpy
and might require calls to scipy.special
. One of the things I would like to try to improve its speed is to move part of the calculation to a GPU and have outlined some concerns I have before going out and investing in a GPU.
In it I link to three similar questions asking for help/advice on moving a calculation to GPU
- CUDA & Python for numerical integration and solving differential equations
- Writing code on the CPU while developing, running it on the GPU when live - which approach?
- GPU vs CPU calculation
Each of these questions was relatively well received, and has received two answers with good advice.
None of these questions received a request of specific code. In each case the OP was trusted to be asking the question to which they would like an answer.
However under my question there is more than one request for specific code.
Of course there are many ways that one can try to speed up a program and especially a python script. It's important to structure the arrays properly and there are options (e.g. numba
) for more efficient compilation.
But this question is not about that. Similarly to the three linked questions, this questions asks for specific pointers for how to avoid being disappointed purchasing a GPU and finding out it does not add performance. They can be expensive.
In a comment I've said:
In this case I feel the script is distracting and will tend to attract well-meaning answers about how to better script it which is not what this question is about.
I feel that the direction the comments have taken has somewhat derailed my question. Of course they are all well-meaning and are reaching out to try to help, but I also feel that unlike the authors of the three linked questions I am not being given sufficient credibility that I know the question to which I would like answers.
Is there something about the way my question is written that might be causing this?