Skip to content
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

Fix sync_dist for tpus #6950

Merged
merged 12 commits into from
Apr 13, 2021
Merged

Conversation

kaushikb11
Copy link
Contributor

@kaushikb11 kaushikb11 commented Apr 10, 2021

What does this PR do?

Fixes #6922

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

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:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented Apr 10, 2021

Codecov Report

Merging #6950 (9a402c3) into master (80c5293) will decrease coverage by 5%.
The diff coverage is 62%.

@@           Coverage Diff           @@
##           master   #6950    +/-   ##
=======================================
- Coverage      92%     86%    -5%     
=======================================
  Files         194     194            
  Lines       12366   12368     +2     
=======================================
- Hits        11350   10697   -653     
- Misses       1016    1671   +655     

@kaushikb11 kaushikb11 marked this pull request as ready for review April 11, 2021 20:15
@kaushikb11 kaushikb11 self-assigned this Apr 11, 2021
@kaushikb11 kaushikb11 added accelerator: tpu Tensor Processing Unit bug Something isn't working labels Apr 11, 2021
@kaushikb11 kaushikb11 added this to the 1.2.x milestone Apr 11, 2021
Copy link
Member

@awaelchli awaelchli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

pytorch_lightning/utilities/distributed.py Outdated Show resolved Hide resolved
pytorch_lightning/utilities/distributed.py Outdated Show resolved Hide resolved
pytorch_lightning/core/step_result.py Show resolved Hide resolved
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@@ -318,3 +313,9 @@ def register_ddp_comm_hook(
state=ddp_comm_state,
hook=ddp_comm_hook,
)


def tpu_distributed():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat !

pytorch_lightning/utilities/imports.py Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@mergify mergify bot removed the has conflicts label Apr 13, 2021
pytorch_lightning/utilities/distributed.py Outdated Show resolved Hide resolved
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
@kaushikb11 kaushikb11 merged commit 1b3e4f9 into Lightning-AI:master Apr 13, 2021
@kaushikb11 kaushikb11 deleted the fix/tpu_sync_dist branch April 13, 2021 08:47
@SeanNaren SeanNaren mentioned this pull request Apr 13, 2021
SeanNaren pushed a commit that referenced this pull request Apr 13, 2021
(cherry picked from commit 1b3e4f9)
awaelchli pushed a commit that referenced this pull request Apr 13, 2021
(cherry picked from commit 1b3e4f9)
Borda pushed a commit that referenced this pull request Apr 14, 2021
(cherry picked from commit 1b3e4f9)
lexierule pushed a commit that referenced this pull request Apr 14, 2021
(cherry picked from commit 1b3e4f9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accelerator: tpu Tensor Processing Unit bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add logic for sync distributed for TPUs in Step Result log
6 participants