BaseCUDAMemoryManager#
- class nvmath.BaseCUDAMemoryManager(device_id: int, logger: Logger)[source]#
Protocol for memory manager plugins.
See also
Methods
- abstract memalloc(
- size: int,
Allocate device memory synchronously or on the current stream.
- Parameters:
size – The size of the memory buffer in bytes.
- Returns:
An object that owns the allocated memory and is responsible for releasing it (to the OS or a pool). The object must have an attribute named
device_ptr,device_pointer, orptrspecifying the pointer to the allocated memory buffer. SeeMemoryPointerfor an example interface.
Note
Objects of type
numba.cuda.MemoryPointeras well ascupy.cuda.MemoryPointermeet the requirements listed above for the device memory pointer object.