Stencil shape minimize
stencil_shape_minimize
ShapeAnalysis
dataclass
Bases: TypeConversionPattern
Source code in xdsl/transforms/stencil_shape_minimize.py
21 22 23 24 25 26 27 28 29 | |
seen: set[stencil.TempType[Attribute]] = field(default_factory=(set[stencil.TempType[Attribute]]))
class-attribute
instance-attribute
__init__(recursive: bool = False, ops: tuple[type[Operation], ...] | None = None, seen: set[stencil.TempType[Attribute]] = set[stencil.TempType[Attribute]]()) -> None
convert_type(typ: stencil.TempType[Attribute]) -> Attribute | None
Source code in xdsl/transforms/stencil_shape_minimize.py
27 28 29 | |
ShapeMinimisation
dataclass
Bases: TypeConversionPattern
Source code in xdsl/transforms/stencil_shape_minimize.py
32 33 34 35 36 37 38 39 40 41 42 43 | |
shape: stencil.StencilBoundsAttr | None = None
class-attribute
instance-attribute
__init__(recursive: bool = False, ops: tuple[type[Operation], ...] | None = None, shape: stencil.StencilBoundsAttr | None = None) -> None
convert_type(typ: stencil.FieldType[Attribute]) -> Attribute | None
Source code in xdsl/transforms/stencil_shape_minimize.py
36 37 38 39 40 41 42 43 | |
InvalidateTemps
dataclass
Bases: TypeConversionPattern
Source code in xdsl/transforms/stencil_shape_minimize.py
46 47 48 49 50 51 | |
__init__(recursive: bool = False, ops: tuple[type[Operation], ...] | None = None) -> None
convert_type(typ: stencil.TempType[Attribute]) -> Attribute | None
Source code in xdsl/transforms/stencil_shape_minimize.py
48 49 50 51 | |
FuncOpShapeUpdate
dataclass
Bases: RewritePattern
Source code in xdsl/transforms/stencil_shape_minimize.py
54 55 56 57 58 59 | |
__init__() -> None
match_and_rewrite(op: func.FuncOp, rewriter: PatternRewriter)
Source code in xdsl/transforms/stencil_shape_minimize.py
56 57 58 59 | |
RestrictStoreOp
dataclass
Bases: RewritePattern
Source code in xdsl/transforms/stencil_shape_minimize.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
restrict: tuple[int, ...]
instance-attribute
__init__(restrict: tuple[int, ...]) -> None
match_and_rewrite(op: stencil.StoreOp, rewriter: PatternRewriter)
Source code in xdsl/transforms/stencil_shape_minimize.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | |
StencilShapeMinimize
dataclass
Bases: ModulePass
Minimises the shapes of stencil.field types that have been over-allocated and are larger than necessary.
Source code in xdsl/transforms/stencil_shape_minimize.py
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
name = 'stencil-shape-minimize'
class-attribute
instance-attribute
restrict: tuple[int, ...] | None = None
class-attribute
instance-attribute
__init__(restrict: tuple[int, ...] | None = None) -> None
apply(ctx: Context, op: builtin.ModuleOp) -> None
Source code in xdsl/transforms/stencil_shape_minimize.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |