-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#sdy Add support for all-to-all in
-sdy-reshard-to-collectives
and …
…make further improvements. Improvements: 1. Introduces a CollectiveInserter class that holds and manipulates the current state of the transformation. 2. Simplify the handling of sub-axes by aligning them between the input and output shardings, so that we can treat them as full axes and use them as keys in hash maps. 3. Make all-slice and all-to-all insertion greedy, i.e., we slice axes if they are available and all-to-all axes if they are the suffix of the source dimension, regardless of whether they will end up in the right position in the target dimension. 4. All-slice in a dimension that isn't the one in the output sharding, if we can then all-to-all the sliced axis together with an axis that was already in that source dimension, to the same target dimension. A few notes: 1. Greedy all-slice and all-to-all is only possible if the target dimension has the capacity, we ignore this constraint in this CL and will address in a follow up. 2. This pass is still missing support for collective-permute, which is crucial for getting optimal collectives in cases where axes are reordered or replaced with others in the same dimension. Added some use cases to the test. PiperOrigin-RevId: 723451739
- Loading branch information
1 parent
35f1ea9
commit 9541653
Showing
5 changed files
with
802 additions
and
452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.