Add scatter reduce for JACCL#3901
Open
angeloskath wants to merge 12 commits into
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Like #3900 this is on top of the coordinator changes and the threads changes. I will be rebasing as these are merged.
This PR adds scatter reduce to the JACCL backend. It also removes the ring from the mesh implementation and switches to a scatter gather approach for the high BW all reduce which makes better use of the many cables than the ring reduce. We now use the naive all reduce only for sizes <= 32KB which are completely latency bound.
For the ring backend we can't unfortunately use the ring_pass for the scatter reduce because it requires a buffer of the same size as the input to avoid having race conditions in the read/write location. The approach in the scatter reduce is to only write in the output buffer at parts that have already been copied to the RDMA buffers.
Here is a 4-node all reduce comparison of before and after this PR.