| [ Web Proxy ] |
| Viewing: https://arrow.apache.org/docs/python/generated/../api/../generated/pyarrow.cuda.CudaBuffer.html | [Back] [Original] |
Bases: Buffer
An Arrow buffer with data located in a GPU device.
To create a CudaBuffer instance, use Context.device_buffer().
The memory allocated in a CudaBuffer is freed when the buffer object is deleted.
Methods
|
|
|
Copy data from device to device. |
|
Copy data from host to device. |
|
Copy memory from GPU device to CPU host |
|
Determine if two buffers contain exactly the same data. |
|
Expose this device buffer as IPC memory which can be used in other processes. |
|
Convert back generic buffer into CudaBuffer |
|
Create a CudaBuffer view from numba MemoryPointer instance. |
|
Compute hexadecimal representation of the buffer. |
|
Return slice of device buffer |
|
Return numba memory pointer of CudaBuffer instance. |
|
Return device buffer content as Python bytes. |
Attributes
The buffer's address, as an integer. |
|
Returns the CUDA driver context of this buffer. |
|
The device where the buffer resides. |
|
The device type where the buffer resides. |
|
Whether the buffer is CPU-accessible. |
|
Whether the buffer is mutable. |
|
The memory manager associated with the buffer. |
|
The buffer size in bytes. |
The buffers address, as an integer.
The returned address may point to CPU or device memory. Use is_cpu() to disambiguate.
Returns the CUDA driver context of this buffer.
Copy data from device to device.
CudaBufferSpecify source device buffer.
intSpecify the starting position of the copy in device buffer. Default: 0.
intSpecify the number of bytes to copy. Default: -1 (all from source until device buffer, starting from position, is full)
intNumber of bytes copied.
Copy data from host to device.
The device buffer must be pre-allocated.
Buffer, array-like}Specify data in host. It can be array-like that is valid argument to py_buffer
intSpecify the starting position of the copy in device buffer. Default: 0.
intSpecify the number of bytes to copy. Default: -1 (all from source until device buffer, starting from position, is full)
intNumber of bytes copied.
Copy memory from GPU device to CPU host
Caller is responsible for ensuring that all tasks affecting the memory are finished. Use
<CudaBuffer instance>.context.synchronize()
when needed.
intSpecify the starting position of the source data in GPU device buffer. Default: 0.
intSpecify the number of bytes to copy. Default: -1 (all from the position until host buffer is full).
BufferSpecify a pre-allocated output buffer in host. Default: None (allocate new output buffer).
MemoryPoolSpecify extra arguments to allocate_buffer. Used only when buf is None.
BufferOutput buffer in host.
The device where the buffer resides.
DeviceThe device type where the buffer resides.
DeviceAllocationTypeDetermine if two buffers contain exactly the same data.
BufferTrue if buffer contents and size are equal
Expose this device buffer as IPC memory which can be used in other processes.
After calling this function, this device memory will not be freed when the CudaBuffer is destructed.
IpcMemHandleThe exported IPC handle
Convert back generic buffer into CudaBuffer
BufferSpecify buffer containing CudaBuffer
CudaBufferResulting device buffer.
Create a CudaBuffer view from numba MemoryPointer instance.
numba.cuda.cudadrv.driver.MemoryPointerCudaBufferDevice buffer as a view of numba MemoryPointer.
Whether the buffer is CPU-accessible.
Whether the buffer is mutable.
The memory manager associated with the buffer.
MemoryManagerThe buffer size in bytes.
Return slice of device buffer
int, default 0Specify offset from the start of device buffer to slice
int, default NoneSpecify the length of slice (default is until end of device buffer starting from offset). If the length is larger than the data available, the returned slice will have a size of the available data starting from the offset.
CudaBufferZero-copy slice of device buffer.
Return numba memory pointer of CudaBuffer instance.
Return device buffer content as Python bytes.
| Web Proxy Viewer | New URL | Original Page |