gmarkall commented on code in PR #48259:
URL: https://github.com/apache/arrow/pull/48259#discussion_r2569973650
##########
python/pyarrow/_cuda.pyx:
##########
@@ -460,9 +460,14 @@ cdef class CudaBuffer(Buffer):
"""
import ctypes
from numba.cuda.cudadrv.driver import MemoryPointer
- return MemoryPointer(self.context.to_numba(),
- pointer=ctypes.c_void_p(self.address),
- size=self.size)
+ try:
+ return MemoryPointer(self.context.to_numba(),
+ pointer=ctypes.c_void_p(self.address),
+ size=self.size)
+ except TypeError:
+ # Newer Numba does not take a context argument anymore
+ return MemoryPointer(pointer=ctypes.c_void_p(self.address),
+ size=self.size)
Review Comment:
The current documentation for this is at
https://nvidia.github.io/numba-cuda/user/external-memory.html
We should not have changed that API - it was an oversight. Numba-CUDA 0.21.2
is now released, so as long as 0.21.0 or 0.21.1 are not installed (either
0.21.2 upwards or 0.20.0 downwards) the `try` / `except` here should not be
necessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]