Skip to content

Commit

Permalink
[Global Opt] Fix transpose propagation failure (iree-org#19322)
Browse files Browse the repository at this point in the history
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 <ianwood2024@u.northwestern.edu>
  • Loading branch information
IanWood1 authored Nov 27, 2024
1 parent ad4cf1a commit 677ae42
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1104,8 +1104,11 @@ void PropagateLinalgTransposePass::runOnOperation() {
context, /*benefit=*/2);
bubblingPatterns.insert<ComposeTransposes>(context);
populateCommonCanonicalizationPatterns(context, bubblingPatterns);
if (failed(applyPatternsAndFoldGreedily(funcOp,
std::move(bubblingPatterns)))) {

GreedyRewriteConfig config;
config.maxIterations = GreedyRewriteConfig::kNoLimit;
if (failed(applyPatternsAndFoldGreedily(funcOp, std::move(bubblingPatterns),
config))) {
funcOp.emitError("Transpose bubbling patterns failed");
return signalPassFailure();
}
Expand Down

0 comments on commit 677ae42

Please sign in to comment.