cuda.core.experimental.LegacyPinnedMemoryResource¶
- class cuda.core.experimental.LegacyPinnedMemoryResource¶
Create a pinned memory resource that uses legacy cuMemAllocHost/cudaMallocHost APIs.
Methods
- __init__()¶
Initialize the memory resource.
Subclasses may use additional arguments to configure the resource.
- deallocate(ptr: CUdeviceptr | int | None, size: int, stream: Stream = None)¶
Deallocate a buffer previously allocated by this resource.
- Parameters:
ptr (
DevicePointerT
) – The pointer or handle to the buffer to deallocate.size (int) – The size of the buffer to deallocate, in bytes.
stream (Stream, optional) – The stream on which to perform the deallocation asynchronously. If None, no synchronization would happen.
Attributes