- cupy.cuda.malloc_async(size_t size) → MemoryPointer¶
(Experimental) Allocate memory from Stream Ordered Memory Allocator.
This method can be used as a CuPy memory allocator. The simplest way to use CUDA’s Stream Ordered Memory Allocator as the default allocator is the following code:
Using this feature requires CUDA >= 11.2 with a supported GPU and platform. If it is not supported, an error will be raised.
The current CuPy stream is used to allocate/free the memory.
size (int) – Size of the memory allocation in bytes.
Pointer to the allocated buffer.
- Return type
This feature is currently experimental and subject to change.