MVP python BLAS example #8
Replies: 1 comment 4 replies
-
Hello @akochepasov ! Thank you for your interest in nvmath-python. The problem that I see in your code is that cuBLAS expect the matrices to be on the GPU, and passing host-side pointers might result in undefined behaviour. I guess the error you are seeing might be caused by that. Can you please try to convert your CuPy has
And to get the pointers to CuPy, you can use
One more thing is that you should only destroy cublas handle after synchronizing with the GPU. Currently, you're destroying it right after the operation is scheduled, but you should wait for the GPU to finish. Please let me know if the changes above help with the On our long-term roadmap, we have the introduction a Pythonic API that will cover |
Beta Was this translation helpful? Give feedback.
-
Hi guys, I'm trying to put together a simple MVP BLAS example for a C-ordered array, according to https://docs.nvidia.com/cuda/nvmath-python/latest/bindings/index.html
So far the result is mixed.
This example doesn't return result in C and crashes in
cublas.create()
on the second call:Can you help me to straighten this out? How can I make C keep the result and run multiple times?
Configuration:
nvmath.bindings.cublas.get_cudart_version()
returns12030
0.1.0
installed withpip
Beta Was this translation helpful? Give feedback.
All reactions