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

Change sharding rule of @PartialReduce custom call so we don't propagate sideways between the operands or results along the reduction dim. #206

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

copybara-service[bot]
Copy link

Change sharding rule of @PartialReduce custom call so we don't propagate sideways between the operands or results along the reduction dim.

This is because the op needs the reduction dim to be fully replicated, and therefore even if the 1st operand is sharded along that dim, it doesn't make sense to propagate the sharding to the 2nd operand (iota) as we will need to all gather both anyways.

A better solution is to do what is done for sort, and try to all-to-all the sharding to another dimension, in which case the other operand will need to be sharded in the same way (that doesn't have to happen during propagation though).

…ate sideways between the operands or results along the reduction dim.

This is because the op needs the reduction dim to be fully replicated, and therefore even if the 1st operand is sharded along that dim, it doesn't make sense to propagate the sharding to the 2nd operand (iota) as we will need to all gather both anyways.

A better solution is to do what is done for sort, and try to all-to-all the sharding to another dimension, in which case the other operand will need to be sharded in the same way (that doesn't have to happen during propagation though).

PiperOrigin-RevId: 696621875
@copybara-service copybara-service bot merged commit 4e1ad0d into main Nov 14, 2024
@copybara-service copybara-service bot deleted the test_693386592 branch November 14, 2024 20:57
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