Skip to content

Commit 28e6a93

Browse files
committed
init diffusion
1 parent a589eb7 commit 28e6a93

File tree

6 files changed

+1395
-0
lines changed

6 files changed

+1395
-0
lines changed

include/gc/Transforms/Passes.td

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,25 @@ def LinalgToXeGPU : Pass<"linalg-to-xegpu", "func::FuncOp"> {
7171
];
7272
}
7373

74+
def AnyTilableFusion : Pass<"any-tilable-fusion",
75+
"func::FuncOp"> {
76+
let summary = "Fusion for any tilable operation";
77+
let description = [{
78+
The pass tries to fuse any MLIR operation which can be tiled. Moreover, this pass aims to support:
79+
1. Matmul fusion with element-wise/reduce/broadcast ops.
80+
2. Pre-op and post-op fusion.
81+
3. Multi-consumer and multi-producer support.
82+
4. Cost-model to determine whether to fuse or not.
83+
5. TBC
84+
85+
It intends to control the granularity of fusion by `fusion-level`, E.g.
86+
* `0`: disable any fusion.
87+
* `1`:[Default] enable pre-op fusion + post-op fusion covering any tilable operation including tensor.pack/tensor.fill/linalg.reduce etc but excluding branches forked by multiple uses.
88+
* `2`: `LEVEL 1` + extend to any topology including branches.
89+
* `3`: `LEVEL 2` + support coarse-grained fusion.
90+
}];
91+
let dependentDialects = ["func::FuncDialect", "linalg::LinalgDialect", "scf::SCFDialect",
92+
"tensor::TensorDialect"];
93+
}
94+
7495
#endif // GC_DIALECT_GC_PASSES

0 commit comments

Comments
 (0)