Skip to main content

MAX_TENSOR_CELLS

Constant MAX_TENSOR_CELLS 

Source
pub const MAX_TENSOR_CELLS: usize = _; // 268_435_456usize
Expand description

The largest number of cells a tensor operation will materialize in one allocation. A dimension product can be far below usize::MAX and still be hopeless to allocate (a [1_000_000, 1_000_000] broadcast is 1e12 cells); this ceiling is the line past which the input is rejected rather than driven into an out-of-memory abort.