Skip to main content

Module shape

Module shape 

Source
Expand description

Shape inference pass.

Propagates tensor shapes through the IR module. For each global variable, infers the concrete or symbolic shape and stores it in a ShapeMap.

Structs§

Shape
Inferred shape of a tensor.
ShapeInference
Shape inference pass.

Enums§

Dim
A dimension: either a concrete size, a symbolic name, or fully dynamic.

Functions§

infer_shapes
Infer shapes for all storage global variables in the module.
ir_dim_to_dim
Convert an IR Dimension to a shape inference Dim.
unify_dim
Unify two dimensions according to shape inference rules:
unify_shapes
Unify two shapes element-wise. Returns None if ranks differ or any dimension pair is incompatible.

Type Aliases§

ShapeMap
Map from global variable handles to their inferred shapes.