Skip to content

Ignoring single-user ops in CloneToConsumers. - #20921

Merged
benvanik merged 1 commit into
mainfrom
users/benvanik/clone-to-consumers-2
May 28, 2025
Merged

benvanik merged 1 commit into
mainfrom
users/benvanik/clone-to-consumers-2

Conversation

@benvanik

Copy link
Copy Markdown
Collaborator

Previously the pass would always clone an op if analysis resulted in multiple producer affinities. This leads to bad behavior where the pass will keep trying to clone ops in order to fix the situation but do nothing meaningful before the next try (and eventually hit the limit).

This should help situations where CloneToConsumersPass was hitting its iteration limit. It does not fix affinity analysis iteration limits - those are caused by ambiguous IR and will still fail to converge with these changes.

Previously the pass would always clone an op if analysis resulted in
multiple producer affinities. This leads to bad behavior where the pass
will keep trying to clone ops in order to fix the situation but do
nothing meaningful before the next try (and eventually hit the limit).
@benvanik
benvanik requested review from ScottTodd and hanhanW May 28, 2025 21:27
@benvanik
benvanik marked this pull request as ready for review May 28, 2025 21:35
@benvanik
benvanik enabled auto-merge (squash) May 28, 2025 21:36
@benvanik
benvanik merged commit dc11ba6 into main May 28, 2025
@benvanik
benvanik deleted the users/benvanik/clone-to-consumers-2 branch May 28, 2025 21:52
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
Previously the pass would always clone an op if analysis resulted in
multiple producer affinities. This leads to bad behavior where the pass
will keep trying to clone ops in order to fix the situation but do
nothing meaningful before the next try (and eventually hit the limit).

This should help situations where CloneToConsumersPass was hitting its
iteration limit. It does not fix affinity analysis iteration limits -
those are caused by ambiguous IR and will still fail to converge with
these changes.
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