| [ Web Proxy ] |
| Viewing: https://arrow.apache.org/docs/python/generated/../generated/../generated/pyarrow.cuda.Context.html | [Back] [Original] |
Bases: _Weakrefable
CUDA driver context.
Create a CUDA driver context for a particular device.
If a CUDA context handle is passed, it is wrapped, otherwise a default CUDA context for the given device is requested.
Methods
Create a CUDA driver context for a particular device. |
|
|
Create device buffer and initialize with data. |
|
Create device buffer view of arbitrary object that references device accessible memory. |
|
Create device buffer from address and size as a view. |
|
Create a Context instance from a Numba CUDA context. |
|
Return the device address that is reachable from kernels running in the context |
Return the number of GPU devices. |
|
|
Return new device buffer. |
|
Open existing CUDA IPC memory handle |
|
Blocks until the device has completed all preceding requested tasks. |
|
Convert Context to a Numba CUDA context. |
Attributes
Return the number of allocated bytes. |
|
The device instance associated with this context. |
|
Return context device number. |
|
Return pointer to context handle. |
|
The default memory manager tied to this context's device. |
Create device buffer and initialize with data.
CudaBuffer, HostBuffer, Buffer, array-like}Specify data to be copied to device buffer.
intSpecify the offset of input buffer for device data buffering. Default: 0.
intSpecify the size of device buffer in bytes. Default: all (starting from input offset)
CudaBufferDevice buffer with copied data.
Create device buffer view of arbitrary object that references device accessible memory.
When the object contains a non-contiguous view of device accessible memory then the returned device buffer will contain contiguous view of the memory, that is, including the intermediate data that is otherwise invisible to the input object.
Buffer, HostBuffer, CudaBuffer, }Specify an object that holds (device or host) address that can be accessed from device. This includes objects with types defined in pyarrow.cuda as well as arbitrary objects that implement the CUDA array interface as defined by numba.
CudaBufferDevice buffer as a view of device accessible memory.
Return the number of allocated bytes.
The device instance associated with this context.
DeviceReturn context device number.
Create device buffer from address and size as a view.
The caller is responsible for allocating and freeing the memory. When address==size==0 then a new zero-sized buffer is returned.
intSpecify the starting address of the buffer. The address can refer to both device or host memory but it must be accessible from device after mapping it with get_device_address method.
intSpecify the size of device buffer in bytes.
None, object}Specify object that owns the referenced memory.
CudaBufferDevice buffer as a view of device reachable memory.
Create a Context instance from a Numba CUDA context.
numba.cuda.cudadrv.driver.Context, None}A Numba CUDA context instance. If None, the current Numba context is used.
pyarrow.cuda.ContextContext instance.
Return the device address that is reachable from kernels running in the context
intSpecify memory address value
intDevice address accessible from device context
Notes
The device address is defined as a memory address accessible by device. While it is often a device memory address but it can be also a host memory address, for instance, when the memory is allocated as host memory (using cudaMallocHost or cudaHostAlloc) or as managed memory (using cudaMallocManaged) or the host memory is page-locked (using cudaHostRegister).
Return the number of GPU devices.
Return pointer to context handle.
The default memory manager tied to this contexts device.
MemoryManagerReturn new device buffer.
intSpecify the number of bytes to be allocated.
CudaBufferAllocated buffer.
Open existing CUDA IPC memory handle
IpcMemHandleSpecify opaque pointer to CUipcMemHandle (driver API).
CudaBufferreferencing device buffer
Blocks until the device has completed all preceding requested tasks.
Convert Context to a Numba CUDA context.
numba.cuda.cudadrv.driver.ContextNumba CUDA context instance.
| Web Proxy Viewer | New URL | Original Page |