Skip to main content

static_size

Function static_size 

Source
pub fn static_size(graph: &Graph, value: ValueId) -> Option<usize>
Expand description

Byte size of a value from its static shape, or None if any dimension is symbolic (unknown until run time) or the element count overflows usize.

Uses onnx_runtime_ir::DataType::checked_storage_bytes so sub-byte packed types (int4/uint4/float4) are sized correctly and an overflowing element count becomes None rather than a wrapped under-count.