Add CSE after every transformation. Transformations such as tiling introduce redundant computation, for example, one AffineMinOp for every operand dimension pair. Follow up transformations such as Padding and Hoisting benefit from CSE since comparing slice sizes simplifies to comparing SSA values instead of analyzing affine expressions.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Linalg/Transforms/CodegenStrategy.cpp | ||
---|---|---|
49 ↗ | (On Diff #389741) | Can this be folded inside the createLinalgStrategyEnablePass ? |
mlir/lib/Dialect/Linalg/Transforms/CodegenStrategy.cpp | ||
---|---|---|
49 ↗ | (On Diff #389741) | I think this would require another dynamic pass manager nested inside the LinalgStrategyEnablePass? My understanding is that we should minimize the use of dynamic pass managers? @mehdi_amini do you have a recommendation on how to address this problem? Our goal is to "call one thing" that runs the LinalgStrategyEnablePass and performs CSE. The LinalgStrategyEnablePass applies canonicalization patterns while CSE is a pass. |