Shape inference
shape_inference
¶
ShapeInferenceRewritePattern
¶
Bases: RewritePattern
Rewrite pattern that applies a shape inference pattern.
Source code in xdsl/transforms/shape_inference.py
match_and_rewrite(op: Operation, rewriter: PatternRewriter)
¶
Source code in xdsl/transforms/shape_inference.py
ShapeInferencePass
dataclass
¶
Bases: ModulePass
Applies all shape inference patterns.
Source code in xdsl/transforms/shape_inference.py
infer_shapes(op: builtin.ModuleOp)
¶
A helper function for ShapeInferencePass which allows it to be called from within other passes while exposing the least restrictive API.