gmarkall commented on issue #47128: URL: https://github.com/apache/arrow/issues/47128#issuecomment-3089063774
With this change in Arrow: ```diff diff --git a/python/pyarrow/_cuda.pyx b/python/pyarrow/_cuda.pyx index 340f7e35c7..96e5c13949 100644 --- a/python/pyarrow/_cuda.pyx +++ b/python/pyarrow/_cuda.pyx @@ -451,9 +451,9 @@ cdef class CudaBuffer(Buffer): Device buffer as a view of numba MemoryPointer. """ ctx = Context.from_numba(mem.context) - if mem.device_pointer.value is None and mem.size==0: + if mem.device_pointer_value is None and mem.size==0: return ctx.new_buffer(0) - return ctx.foreign_buffer(mem.device_pointer.value, mem.size, base=mem) + return ctx.foreign_buffer(mem.device_pointer_value, mem.size, base=mem) def to_numba(self): """Return numba memory pointer of CudaBuffer instance. ``` and the Numba-CUDA PR https://github.com/NVIDIA/numba-cuda/pull/328 on top of Numba-CUDA `main`, all tests pass: ``` 0 gmarkall@housel 11:32:46 (main) ~/numbadev/arrow/python $ python -m pytest pyarrow/tests/test_cuda_numba_interop.py ============================================ test session starts ============================================= platform linux -- Python 3.10.18, pytest-8.4.1, pluggy-1.6.0 rootdir: /home/gmarkall/numbadev/arrow/python configfile: setup.cfg plugins: hypothesis-6.135.32 collected 50 items pyarrow/tests/test_cuda_numba_interop.py .................................................. [100%] ====================================== 50 passed, 18 warnings in 2.48s ======================================= 0 gmarkall@housel 11:32:50 (main) ~/numbadev/arrow/python $ pip list ... numba-cuda 0.16.0 /home/gmarkall/numbadev/numba-cuda ... ``` Next I'll aim to: * Get a Numba-CUDA release out with the relevant fixes, and * Make a PR to Arrow with the above change. The change above swaps the use of `device_pointer.value` with `device_pointer_value` because `device_pointer_value` always returns `None` or an integer regardless of whether the `device_pointer` is a `c_void_p` or `CUdeviceptr`. Feel free to take this change and merge it before I get chance to make a PR, if you would prefer :-) -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org