Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding CloneToConsumersPass and ElideAsyncTransfersPass. #20103

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

benvanik
Copy link
Collaborator

CloneToConsumersPass performs affinity analysis and clones any clonable producer that is used by multiple affinities per-user. It's effectively the inverse of a CSE step and is intended to undo CSE that created the affinity ambiguity. ElideAsyncTransfersPass does a global analysis to try to find transfers that are redundant and elides them.

The primary case where this arises today is CSE collapsing a splat or splat-like dispatch that is consumed by transfers or dispatches on different affinities.

@benvanik benvanik force-pushed the users/benvanik/clone-no-yuck branch from 291662d to 17d438f Compare February 26, 2025 19:55
These transfers can arise during stream conversion if there was
ambiguity in the source IR.
This performs affinity analysis and clones any clonable producer that is
used by multiple affinities per-user. It's effectively the inverse of a
CSE step and is intended to undo CSE that created the affinity ambiguity.

The primary case where this arises today is CSE collapsing a splat or
splat-like dispatch that is consumed by transfers or dispatches on
different affinities.
I do not recall why there was a carveout for constants.
@benvanik benvanik force-pushed the users/benvanik/clone-no-yuck branch 2 times, most recently from 2052c99 to 57a757d Compare February 27, 2025 19:31
@benvanik benvanik force-pushed the users/benvanik/clone-no-yuck branch from 57a757d to 54eeac4 Compare February 27, 2025 21:27
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.

1 participant