-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Deprecate LightningDistributed
and keep logic in ddp/ddpSpawn directly
#9691
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
Conversation
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.
Have a look at the tests/deprecated_api
where we should add a quick test for the 1.7 removal :)
Codecov Report
@@ Coverage Diff @@
## master #9691 +/- ##
=======================================
- Coverage 93% 89% -4%
=======================================
Files 179 178 -1
Lines 15306 15297 -9
=======================================
- Hits 14201 13576 -625
- Misses 1105 1721 +616 |
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.
i think there's an optimization opportunity for broadcast but we can pick it up in a follow up PR along with tensor specializations
Co-authored-by: Adrian Wälchli <[email protected]>
Co-authored-by: ananthsub <[email protected]>
Co-authored-by: ananthsub <[email protected]>
Co-authored-by: ananthsub <[email protected]>
a7f74d1
to
3a1d92c
Compare
LightningDistributed
and keep logic in ddp/ddpSpawn directly
What does this PR do?
LightningDistributed() class only used by ddp and ddpSpawn, and only have one broadcast function for torch collectives. It's unnecessary to have.
Also, we have to set rank and device in set up steps. If subclass extend DDP or DDPSpawn, and overridden function where LightningDistributed.rank and device setted, could cause silent failures.
Now the src is not respected in torch broadcast, fix the issue
Fixes #9692
Does your PR introduce any breaking changes? If yes, please list them.
Before 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 🙃