Skip to content

Reapply "[Codegen] Fix dominance issues blocking consumer fusions (#21551)" - #21637

Merged
Max191 merged 2 commits into
iree-org:mainfrom
Max191-agents:dont-add-moved-consumers-to-worklist
Aug 8, 2025
Merged

Max191 merged 2 commits into
iree-org:mainfrom
Max191-agents:dont-add-moved-consumers-to-worklist

Conversation

@Max191

@Max191 Max191 commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Reapplies 9c77258 with a bug fix for #21622. Operations were being moved by the rewriter before the FuseTilableConsumer pattern was guaranteed to succeed, which added the ops to the pattern worklist every time the pattern failed. This caused an infinite recursion of the pattern application. The fix is to move the ops without the rewriter, so they will not be added to the worklist. This op movement can also be removed once the upstream fusion transformation is refactored to properly handle multi-result scf.forall loops.

@nirvedhmeshram nirvedhmeshram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Max191
Max191 merged commit e1d05b2 into iree-org:main Aug 8, 2025
@Max191
Max191 deleted the dont-add-moved-consumers-to-worklist branch August 8, 2025 20:36
hhkit pushed a commit to opencompl/iree that referenced this pull request Aug 11, 2025
…ee-org#21551)" (iree-org#21637)

Reapplies
iree-org@9c77258
with a bug fix for iree-org#21622.
Operations were being moved by the rewriter before the
FuseTilableConsumer pattern was guaranteed to succeed, which added the
ops to the pattern worklist every time the pattern failed. This caused
an infinite recursion of the pattern application. The fix is to move the
ops without the rewriter, so they will not be added to the worklist.
This op movement can also be removed once the upstream fusion
transformation is refactored to properly handle multi-result scf.forall
loops.

---------

Signed-off-by: Max Dawkins <[email protected]>
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
…1551)" (#21637)

Reapplies
9c77258
with a bug fix for #21622.
Operations were being moved by the rewriter before the
FuseTilableConsumer pattern was guaranteed to succeed, which added the
ops to the pattern worklist every time the pattern failed. This caused
an infinite recursion of the pattern application. The fix is to move the
ops without the rewriter, so they will not be added to the worklist.
This op movement can also be removed once the upstream fusion
transformation is refactored to properly handle multi-result scf.forall
loops.

---------

Signed-off-by: Max Dawkins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants