cuda.core.LegacyPinnedMemoryResource#
- class cuda.core.LegacyPinnedMemoryResource#
Create a pinned memory resource that uses legacy cuMemAllocHost/cudaMallocHost APIs.
Methods
- __init__()#
- allocate(
- size,
- *,
- stream: Stream | GraphBuilder | None = None,
Allocate a buffer of the requested size.
cuMemAllocHostis synchronous, so this resource ignores any supplied stream. The argument is accepted (and validated when non-None) for interface conformance with stream-ordered memory resources.
- deallocate(
- ptr: DevicePointerType,
- size,
- *,
- stream: Stream | GraphBuilder | None = None,
Deallocate a buffer previously allocated by this resource.
Attributes
- device_id#
This memory resource is not bound to any GPU.
- is_managed#
bool
Whether buffers allocated by this resource are CUDA managed (unified) memory.
- Type:
MemoryResource.is_managed