chore: fast paths for distributed functions, remove obsolete wrapper#96
Merged
chore: fast paths for distributed functions, remove obsolete wrapper#96
Conversation
aa66166 to
f9eb14b
Compare
Contributor
3c94516 to
6fa4a0d
Compare
31fa5b1 to
ad6b1f4
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We provide convenience methods for some of the communication collectives, one main reason for that is they work in both distributed as well as non-distributed code. However in the none-distributed path we still were doing some work such as moving the data from cpu to gpu or vice versa. We can always avoid doing this work, reduce and gather ops should be noops if we only have one process.
Another simplification is to remove the custom autograd function for gather. PyTorch added support for gradients in all_gather some time ago: pytorch/pytorch#40762, thus we can just use the normal all_gather functions