You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could explore if creating a numpy array with the pointer being a device pointer and calling cupy.asarray(numpy_array_w_device_ptr) from it works [ref][more details] or if this triggers a copy and/or if this triggers ownership issues. There also seems to be a , copy=False option in array which is equivalent to asarray[ref].
Maybe we need to write our own constructor (could also consider contributing this upstream). I opened an issue to ask about details: cupy/cupy#4644
Right now, WarpX exposes its data to Python, by converting it to
numpy
arrays:WarpX/Python/pywarpx/_libwarpx.py
Line 135 in 1f8ab0e
However, this would not be a good solution when running on GPU. Instead we should expose the data as a GPU-aware object (e.g.
cupy
array)The text was updated successfully, but these errors were encountered: