-
Notifications
You must be signed in to change notification settings - Fork 67
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
parse gpu array from python to Julia #93
Comments
I'm no GPU expert, but you should be able to use the cuda array interface (https://numba.pydata.org/numba-doc/dev/cuda/cuda_array_interface.html) to get the pointer to the data. PythonCall does something similar (https://github.com/cjdoris/PythonCall.jl/blob/main/src/pywrap/PyArray.jl) to wrap python objects that have the numpy array interface. |
Thanks, so I made progress thanks to your hints I changed it into numba cuda array still it is very slow although function does nothing - I mean theat just passing to argument gets 3633 miliseconds ( I am working on CUDA accelerated segmentation metrics and on data with the same size whole calculation takes around 50 ms )
|
https://github.com/pabloferz/DLPack.jl might be of interest! |
Thanks !! |
This issue has been marked as stale because it has been open for 30 days with no activity. If the issue is still relevant then please leave a comment, or else it will be closed in 7 days. |
This issue has been closed because it has been stale for 7 days. If it is still relevant, please re-open it. |
hello I have cupy cuda array and I want to pass it into julia as is.
CUDA arrays are just list of pointers so it should be possible
from CUDA.jl side I know is possible as I have a comment
"""
for passing data the other way around you can use unsafe_wrap(CuArray, ...) to create a CUDA.jl array from a device pointer you get from Python
"""
still I can not make it work - anybody have some working example?
What I was trying
The text was updated successfully, but these errors were encountered: