Change sharding rule of @PartialReduce custom call so we don't propagate sideways between the operands or results along the reduction dim. #206
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).