jorisvandenbossche opened a new issue, #41663:
URL: https://github.com/apache/arrow/issues/41663

   A pyarrow object (`Array`, `RecordBatch`, etc) can be backed by non-CPU data 
(i.e. the buffers having a non-CPU device / memory manager), but when accessing 
one of the buffers of this object (e.g. through `arr.buffers()` for an array) 
this always gives a base class `pyarrow.Buffer` instance. 
   
   While in the specific case of a buffer living on a CUDA device, we have the 
`CudaBuffer` subclass (both on the C++ side as in `pyarrow.cuda` module), and 
returning this object gives a richer, CUDA-specific API compared to the base 
class `Buffer`. 
   Therefore, it might be useful for the user that we automatically wrap a C++ 
Buffer as a `pyarrow.cuda.CudaBuffer` if it has a CUDA device?
   
   There is already existing functionality to manually do this conversion using 
`pyarrow.cuda.CudaBuffer.from_buffer(arr.buffers()[1])`, so an alternative 
would be leave this to the user to do manually but better document this.


-- 
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]

Reply via email to