Stencil storage materialization
stencil_storage_materialization
¶
ApplyOpMaterialization
¶
Bases: RewritePattern
Adds stencil.buffer to any used output of a stencil.apply that is not otherwised mapped to storage.
Source code in xdsl/transforms/experimental/stencil_storage_materialization.py
match_and_rewrite(op: ApplyOp | CombineOp, rewriter: PatternRewriter)
¶
Source code in xdsl/transforms/experimental/stencil_storage_materialization.py
StencilStorageMaterializationPass
dataclass
¶
Bases: ModulePass
Pass adding stencil.buffer whenever necessary to lower a stencil dialect IR, by adding stencil.buffer on any used stencil.apply output not otherwise mapped to storage.
Source code in xdsl/transforms/experimental/stencil_storage_materialization.py
should_materialize(temp: SSAValue)
¶
Predicates if a specific stencil.apply output should be buffered. It should if it is used by another stencil.apply and not already buffered or stored.