cupy.cuda.Memory

class cupy.cuda.Memory(Py_ssize_t size)

Memory allocation on a CUDA device.

This class provides an RAII interface of the CUDA memory allocation.

Parameters:

size (int) – Size of the memory allocation in bytes.

Variables:
  • ptr (int) – Pointer to the place within the buffer.
  • size (int) – Size of the memory allocation in bytes.
  • device (Device) – Device whose memory the pointer refers to.

Methods

Attributes

device
ptr

‘size_t’

Type:ptr
size

‘Py_ssize_t’

Type:size