cupy.cuda.MemoryAsync

class cupy.cuda.MemoryAsync(size_t size, intptr_t stream)

Asynchronous 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.

  • stream (intptr_t) – Pointer to the stream on which the memory is allocated and freed.

Methods

__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

stream