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
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
match_and_rewrite(op: ApplyOp | CombineOp, rewriter: PatternRewriter)
Source code in xdsl/transforms/experimental/stencil_storage_materialization.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
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
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
name = 'stencil-storage-materialization'
class-attribute
instance-attribute
apply(ctx: Context, op: builtin.ModuleOp) -> None
Source code in xdsl/transforms/experimental/stencil_storage_materialization.py
58 59 60 61 62 63 64 65 | |
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.
Source code in xdsl/transforms/experimental/stencil_storage_materialization.py
15 16 17 18 19 20 21 22 | |