forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Closes apache#3439 from pearu/arrow-4212 and squashes the following commits: ba90573 <Pearu Peterson> Add 2-D and 3-D tests. buffer_from_object requires contiguous memory input. 355fc03 <Pearu Peterson> Apply more feedback fixes. 22134da <Pearu Peterson> Refactor. Add tests for negative strides and reduce test cases. dbd1cec <Pearu Peterson> Moved some buffer_from_objects tests under test_cuda. 562c180 <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. df8656f <Pearu Peterson> Add GetDeviceAddress method to CudaContext.
- Loading branch information
Showing
8 changed files
with
292 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.