Commits


Pearu Peterson authored and Antoine Pitrou committed f0c464ea70e
ARROW-4212: [C++][Python] CudaBuffer view of arbitrary device memory object This PR implements the following new features: 1. `CudaContext::GetDeviceAddress` method 2. `pyarrow.cuda.Context.get_device_address` method 3. `pyarrow.cuda.Context.buffer_from_object` method to create a CudaBuffer view of arbitrary device memory object that implements `__cuda_array_interface__` attribute or that is `CudaBuffer` or `CudaHostBuffer` or numba `MemoryPointer` object. 4. Tests for `buffer_from_object` method and the following improvements: 1. `pyarrow.cuda.Context.foreign_buffer` ensures that the used device memory address is valid for the given context. Author: Pearu Peterson <pearu.peterson@gmail.com> Closes #3439 from pearu/arrow-4212 and squashes the following commits: ba905739 <Pearu Peterson> Add 2-D and 3-D tests. buffer_from_object requires contiguous memory input. 355fc035 <Pearu Peterson> Apply more feedback fixes. 22134da4 <Pearu Peterson> Refactor. Add tests for negative strides and reduce test cases. dbd1cec6 <Pearu Peterson> Moved some buffer_from_objects tests under test_cuda. 562c1805 <Pearu Peterson> Change GetDeviceAddress API to use uint8_t, add C++ tests for it, update docs and apply feedback. 2726a91e <Pearu Peterson> Add buffer_from_object and get_device_address methods. df8656f8 <Pearu Peterson> Add GetDeviceAddress method to CudaContext.