-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Make HorovodPlugin.all_gather
return a tensor
#9696
Make HorovodPlugin.all_gather
return a tensor
#9696
Conversation
HorovodPlugin.all_gather
consistent with other pluginsHorovodPlugin.all_gather
return a tensor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4c04a30
to
0aa986e
Compare
Codecov Report
@@ Coverage Diff @@
## master #9696 +/- ##
=======================================
- Coverage 93% 89% -4%
=======================================
Files 179 179
Lines 15314 15312 -2
=======================================
- Hits 14208 13592 -616
- Misses 1106 1720 +614 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
What does this PR do?
Fixes #9695
The Horovod Plugin is the only plugin whose
all_gather
returns a List[torch.Tensor] instead of a regular tensor. this is despite the support or allgather here: https://horovod.readthedocs.io/en/stable/_modules/horovod/torch/mpi_ops.html#allgatherThis PR updates the implementation of all gather here such that:
I'm unclear why it was implemented like this before
This is part of #7534
and came up during review of #9414 and #9677
Note: TrainingTypePlugin.all_gather is not called anywhere in the trainer. this is purely to power the LightningModule's all_gather's implementation. So this would be a breaking change iff someone was training with horovod and they depended on
LightningModule.all_gather
Does your PR introduce any breaking changes? If yes, please list them.
Yes, this makes an in-place change to
HorovodPlugin.all_gather
to return a new return typeBefore submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃