Expand description
Symbolic shape inference over the shared runtime IR (ONNX_RS §9).
This module is a thin standard-library wrapper around
onnx_runtime_shape_inference. It does not duplicate operator rules:
infer_shapes uses the crate’s built-in InferenceRegistry, while
infer_shapes_with_registry accepts a caller-supplied registry containing
custom rules.
Structs§
- DimExpr
- A canonical integer polynomial over symbolic dimensions.
- Inference
Context - The context passed to every op inference rule.
- Inference
Registry - A registry mapping
(domain, op_type, opset)to anInferenceFn. - NodeIo
- The resolved inference state of a single input or output slot: an optional
type and an optional
ShapeDataside-value. - Shape
Data - The known element values of a rank-0 or rank-1 integer tensor flowing through a shape-computation subgraph.
- Shape
Inference Result - Summary of a whole-model shape-inference run.
- Type
Info - The inferred type of a value: element dtype plus a symbolic shape.
Enums§
- Merge
Policy - How to reconcile an inferred shape with a value’s declared shape.
- Shape
Error - An error produced while inferring shapes.
Functions§
- infer_
shapes - Infer value types and shapes with the built-in ONNX operator registry.
- infer_
shapes_ with_ registry - Infer value types and shapes with a caller-supplied registry.
- register_
shape_ inference - Register an opset-aware shape-inference function on
registry.
Type Aliases§
- Inference
Fn - An operator inference rule: reads inputs from the
InferenceContextand sets its outputs’ types (and, where applicable, shape-data). - Typed
Shape - An inferred shape: an ordered list of symbolic dimension expressions. The
rank is always known (unknown-rank tensors are represented by the absence
of a
TypeInfo, never by aTypedShape).