cupy.cuda.ManagedMemory¶
- class cupy.cuda.ManagedMemory(size_t size)¶
Managed memory (Unified memory) allocation on a CUDA device.
This class provides an RAII interface of the CUDA managed memory allocation.
- Parameters
size (int) – Size of the memory allocation in bytes.
Methods
- advise(self, int advise, Device dev)¶
(experimental) Advise about the usage of this memory.
- Parameters
advics (int) – Advise to be applied for this memory.
dev (cupy.cuda.Device) – Device to apply the advice for.
- prefetch(self, stream)¶
(experimental) Prefetch memory.
- Parameters
stream (cupy.cuda.Stream) – CUDA stream.
- __eq__(value, /)¶
Return self==value.
- __ne__(value, /)¶
Return self!=value.
- __lt__(value, /)¶
Return self<value.
- __le__(value, /)¶
Return self<=value.
- __gt__(value, /)¶
Return self>value.
- __ge__(value, /)¶
Return self>=value.
Attributes
- device¶
- device_id¶
‘int’
- Type
device_id
- ptr¶
‘intptr_t’
- Type
ptr
- size¶
‘size_t’
- Type
size