Skip to content

Commit aeed836

Browse files
IanWood1giacs-epic
authored andcommitted
[Global Opt] Fix transpose propagation failure (iree-org#19322)
When applying the "bubbling" patterns in the transpose propagation pass, the greedy rewriter was failing because it reached 10 iterations before converging. This PR sets the iteration limit to `kNoLimit` which is the same config used for the "sinking" patterns that are applied afterwards. This is needed because these patterns take a bit to converge. Fixes iree-org#19320 Signed-off-by: Ian Wood <[email protected]> Signed-off-by: Giacomo Serafini <[email protected]>
1 parent aa2da60 commit aeed836

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

compiler/src/iree/compiler/GlobalOptimization/PropagateLinalgTranspose.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,8 +1104,11 @@ void PropagateLinalgTransposePass::runOnOperation() {
11041104
context, /*benefit=*/2);
11051105
bubblingPatterns.insert<ComposeTransposes>(context);
11061106
populateCommonCanonicalizationPatterns(context, bubblingPatterns);
1107-
if (failed(applyPatternsAndFoldGreedily(funcOp,
1108-
std::move(bubblingPatterns)))) {
1107+
1108+
GreedyRewriteConfig config;
1109+
config.maxIterations = GreedyRewriteConfig::kNoLimit;
1110+
if (failed(applyPatternsAndFoldGreedily(funcOp, std::move(bubblingPatterns),
1111+
config))) {
11091112
funcOp.emitError("Transpose bubbling patterns failed");
11101113
return signalPassFailure();
11111114
}

0 commit comments

Comments
 (0)