Skip to content

Conversation

@IanWood1
Copy link
Contributor

@IanWood1 IanWood1 commented Dec 3, 2025

This change prevents fusion when the root op does not share parallel loops with it's producers or consumers. Because we require the iteration space of reduction ops to match exactly, this can only occur when the non-root is all parallel. And when the non-root is all parallel, there will only ever be no common parallel loops if the root has no parallel loops. newMap is the mapping from the root op's to the non-root op's parallel loops. If there aren't any dims in the output, then there is no mapping between the loops.

This preserves the old behavior introduced by #12661.

Related #22815

Copy link
Member

@kuhar kuhar left a comment

Choose a reason for hiding this comment

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

Thanks @IanWood1

@IanWood1 IanWood1 requested a review from Groverkss as a code owner December 4, 2025 19:02
@IanWood1
Copy link
Contributor Author

IanWood1 commented Dec 4, 2025

CLIP dispatch count increased because this now gets split into 2 dispatches https://gist.github.com/IanWood1/73971d57bd8243f491291bfa4d4b8e36

Copy link
Collaborator

@MaheshRavishankar MaheshRavishankar left a comment

Choose a reason for hiding this comment

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

The increase in clip dispatch is fine. This shouldnt have fused to start with.

@IanWood1 IanWood1 enabled auto-merge (squash) December 4, 2025 20:47
@IanWood1 IanWood1 merged commit 82fc1ac into iree-org:main Dec 4, 2025
62 of 66 checks passed
IanWood1 added a commit that referenced this pull request Dec 8, 2025
Fixes golden dispatch counts that were not updated in
#22819 because the PR wasn't run
with `ci-extra: test_torch`.





ci-extra: test_torch

Signed-off-by: Ian Wood <[email protected]>
keshavvinayak01 pushed a commit that referenced this pull request Jan 27, 2026
…22819)

This change prevents fusion when the root op does not share parallel
loops with its producers or consumers. Because we require the iteration
space of reduction ops to match exactly, this can only occur when the
non-root is all parallel. And when the non-root is all parallel, there
will only ever be no common parallel loops if the root has no parallel
loops. `newMap` is the mapping from the root op's to the non-root op's
parallel loops. If there aren't any dims in the output, then there is no
mapping between the loops.

This preserves the old behavior introduced by
#12661.

Related #22815

---------

Signed-off-by: Ian Wood <[email protected]>
Signed-off-by: Keshav Vinayak Jha <[email protected]>
keshavvinayak01 pushed a commit that referenced this pull request Jan 27, 2026
Fixes golden dispatch counts that were not updated in
#22819 because the PR wasn't run
with `ci-extra: test_torch`.

ci-extra: test_torch

Signed-off-by: Ian Wood <[email protected]>
Signed-off-by: Keshav Vinayak Jha <[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.

3 participants