ArrayRequest

class cubie.memory.array_requests.ArrayRequest(dtype, shape: tuple[int, ...] = (1, 1, 1), memory: str = 'device', chunk_axis_index: int | None = 2, unchunkable: bool = False, total_runs: int = 1)[source]

Bases: object

Specification for requesting array allocation.

Parameters:
  • shape (tuple[int, ...]) – Tuple describing the requested array shape. Defaults to (1, 1, 1).

  • dtype – NumPy precision constructor used to produce the allocation. Defaults to numpy.float64(). Integer status buffers use numpy.int32().

  • memory (str) – Memory placement option. Must be one of "device", "mapped", "pinned", or "managed".

  • unchunkable (bool) – Whether the memory manager is allowed to chunk the allocation.

  • total_runs (int) – Total number of runs for chunking calculations. Defaults to 1 for arrays not intended for run-axis chunking (e.g., driver_coefficients). Memory manager extracts this value to determine chunk parameters. Always >= 1.

shape

Tuple describing the requested array shape.

Type:

tuple[int, …]

dtype

NumPy precision constructor used to produce the allocation.

memory

Memory placement option.

Type:

str

chunk_axis_index

Axis index along which chunking may occur.

Type:

int | None

unchunkable

Flag indicating that chunking should be disabled.

Type:

bool

total_runs

Total number of runs for chunking calculations. Always >= 1.

Type:

int

chunk_axis_index: int | None
dtype
memory: str
shape: tuple[int, ...]
property size: int

Total size of the array in bytes.

total_runs: int
unchunkable: bool