-
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
TPU Spawn Rank & root device Error #7074
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7074 +/- ##
========================================
Coverage ? 87%
========================================
Files ? 196
Lines ? 12573
Branches ? 0
========================================
Hits ? 10942
Misses ? 1631
Partials ? 0 |
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.
Awesome, thanks for the fast fix!
@@ -65,6 +65,10 @@ def local_rank(self) -> int: | |||
def world_size(self) -> int: | |||
return self.num_processes | |||
|
|||
@property | |||
def root_device(self) -> torch.device: | |||
return self.device |
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.
Is it correct, we aren't allowed to call xm.xla_device() here before we have spawned the processes?
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.
@awaelchli I don't think it would be required to call root_device
outside the new processes.
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.
Works for me! Thanks
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 🐰
* TPU Spawn Rank Error * Update tpu spawn * Fix root device property for tpu spawn * Update changelog
* TPU Spawn Rank Error * Update tpu spawn * Fix root device property for tpu spawn * Update changelog
What does this PR do?
Fixes #7086
Fixes #7088
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
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 🙃