Skip to content

Conversation

@SeanNaren
Copy link
Contributor

@SeanNaren SeanNaren commented Jun 23, 2021

What does this PR do?

When using torchelastic, I noticed that nproc_per_node is set to one per gpu device (so if there was 8 GPUs, there are 8 processes) that only see the individual GPU. This means each process sees one GPU at GPU ID 0.

This PR skips sanitising the total GPUs when using torchelastic + one visible GPU with multi-gpu setups, assuming torchelastic has created processes.

cc @ananthsub @awaelchli

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 🙃

@SeanNaren SeanNaren self-assigned this Jun 23, 2021
@SeanNaren SeanNaren added the bug Something isn't working label Jun 23, 2021
@SeanNaren SeanNaren added this to the v1.3.x milestone Jun 23, 2021
@codecov
Copy link

codecov bot commented Jun 23, 2021

Codecov Report

Merging #8095 (a09e1e9) into master (a45ab00) will decrease coverage by 5%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #8095    +/-   ##
=======================================
- Coverage      92%     87%    -5%     
=======================================
  Files         211     211            
  Lines       13669   13658    -11     
=======================================
- Hits        12538   11895   -643     
- Misses       1131    1763   +632     

@justusschock justusschock merged commit 8bd7b1b into master Jun 23, 2021
@justusschock justusschock deleted the fix/torchelastic branch June 23, 2021 12:09
awaelchli added a commit that referenced this pull request Jun 29, 2021
* Add torchelastic check

* Add changelog

* Address review

* fix
awaelchli added a commit that referenced this pull request Jun 29, 2021
* Add torchelastic check

* Add changelog

* Address review

* fix
awaelchli added a commit that referenced this pull request Jun 30, 2021
* Add torchelastic check

* Add changelog

* Address review

* fix
awaelchli pushed a commit that referenced this pull request Jul 1, 2021
* Add torchelastic check

* Add changelog

* Address review

* fix
lexierule pushed a commit that referenced this pull request Jul 1, 2021
* Add torchelastic check

* Add changelog

* Address review

* fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants