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
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/Linalg/Transforms/CodegenStrategy.cpp | ||
---|---|---|
49 | Can this be folded inside the createLinalgStrategyEnablePass ? |
mlir/lib/Dialect/Linalg/Transforms/CodegenStrategy.cpp | ||
---|---|---|
49 | 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. |
Can this be folded inside the createLinalgStrategyEnablePass ?
This is the "one size fits all" for all enabling stuff (hoisting etc).
This way you'd also have more control if you need to run some enabling stuff multiple times.