You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Transform][Fusion] Introduce an iterative tiling and fusion pass in forward and backward fashion (#87)
* Matmul fusion with element-wise/reduce/broadcast ops.
* Pre-op and post-op fusion(a.k.a. producer and consumer fusion respectively).
* Multi-consumer and multi-producer support.
* Support multiple level tiling and fusion.
* Add flexible options to control the boundary of iterative fusion.
* Enable default tiling when no op is tiled before fusion.
* Cost-model to determine whether to fuse or not.
let summary = "Iterative tiling and fusion for any tilable operation";
67
+
let description = [{
68
+
The pass tries to fuse any MLIR operation which can be tiled. Moreover, this pass aims to support:
69
+
1. Matmul fusion with element-wise/reduce/broadcast ops.
70
+
2. Pre-op and post-op fusion.
71
+
3. Multi-consumer and multi-producer support.
72
+
4. Multiple level of nest loops and candidates.
73
+
5. Flexible option to control the boundary of iterative process.
74
+
6. Cost-model to determine whether to fuse or not.
75
+
76
+
It intends to control the granularity of fusion by `fusion-level`, E.g.
77
+
* `0`: disable any fusion.
78
+
* `1`:[Default] enable both producer and consumer fusion, covering any tilable operation including tensor.pack/tensor.fill/linalg.reduce etc but excluding branches forked by multiple uses.
79
+
* `2`: `LEVEL 1` + extend to any topology including branches.
80
+
}];
81
+
let dependentDialects = ["func::FuncDialect", "linalg::LinalgDialect", "scf::SCFDialect",
82
+
"tensor::TensorDialect"];
83
+
84
+
let options = [
85
+
Option<"fusionLevel", "fusion-level", "int64_t",
86
+
/*default=*/"1",
87
+
"Control the granularity of fusion.">,
88
+
Option<"useCostModel", "use-cost-model", "bool",
89
+
/*default=*/"false",
90
+
"Decide if enable cost model to control iterative fusion.">,
0 commit comments