Expand description
Initializer weight resolution: inline data and external mmap (§19.2, §12).
Turns each TensorProto initializer into an onnx_runtime_ir::WeightRef
descriptor that the IR stores. Inline tensors keep their bytes; external
tensors are described by (path, offset, length) and the referenced files
are memory-mapped so downstream consumers get zero-copy access via
WeightStore::bytes.
Structs§
- Expert
Quantization - Quantization geometry needed to interpret one expert’s packed tensor slice.
- Expert
Tensor Layout - Compact layout descriptor used to derive expert byte ranges.
- Expert
Weight Region - One expert’s contiguous byte window in an external initializer mapping.
- Weight
Range Error - Overflow error shared by loader range catalogs and paging-aware kernels.
- Weight
Region Catalog - Validated expert-region catalog over a
WeightRefin aWeightStore. - Weight
Store - A resolved set of initializer weights, keyed by the value they populate, plus the live memory maps backing any external data files.
Enums§
- Expert
Storage Order - Physical storage order declared by the model/package layout descriptor.
- NonPageable
Reason - Why an external tensor cannot use the expert paging path.
- Pageability
- Pageability classification. Non-pageable tensors remain valid and use the existing resident/materializing execution path.
Functions§
- checked_
byte_ count - Checked element-size multiplication, rejecting slices larger than
isize. - checked_
product - Checked product that still detects overflow when another factor is zero.
- checked_
range - Checked fixed-width range
index * width .. start + width. - checked_
storage_ byte_ count - Checked storage byte count, including sub-byte ONNX dtypes.
- load_
weights - Resolve all initializers, memory-mapping external data relative to
model_dir.name_mapmaps initializer names to the graph value ids created by thegraph_builder.