-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpuarray.dot() works too slow at the first calling #309
Comments
That's because the first time the function is called, a few kernels are compiled behind the scenes to do the work. The basic assumption is that your program will run for long enough (otherwise, why are you using a GPU to speed it up?) that this cost will be more than amortized. Also, that cost should only be incurred once. The kernels should be in the disk cache after that, making them quick to load. |
Thanks for your reply.
Is this a good solution for it? |
If that works for your use case, then yes, that should avoid compilation/module load delays on subsequent runs of the kernel. |
Oh... I found gpuarray.dot() is different from numpy.dot(). It seems that
can be regarded as a package that can run on the GPU and can be used with pycuda. However, it will get error: New problem... |
I found it will cost much time when the first calling of gpuarray.dot().
Here is my code:
Why it will happen? And how can I solve the problem?
The text was updated successfully, but these errors were encountered: