torchx
torchx copied to clipboard
dist.ddp: tweaks to make torchelastic + lightning behave better on slurm
This changes dist.ddp
so the torchelastic rank matches the replica_id
.
This is important when using slurm w/ lightning and NCCL+IB since NCCL errors can occur leading to crashes or deadlocks. It's not fully clear why this is the case.
This also updates compute_world_size
to support running with NCCL since the tensors need to be on a GPU device.
Test plan:
CI
https://docs.google.com/document/d/10VSIVBlnmQ8na4pNXc9bS-HKvKco7JGDXiUsF9h3zwE/edit?usp=sharing
@d4l3k has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Codecov Report
Merging #459 (7bcc23f) into main (289eff0) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## main #459 +/- ##
=======================================
Coverage 94.60% 94.60%
=======================================
Files 65 65
Lines 3834 3834
=======================================
Hits 3627 3627
Misses 207 207
Impacted Files | Coverage Δ | |
---|---|---|
torchx/components/dist.py | 79.06% <ø> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 289eff0...7bcc23f. Read the comment docs.
Hi @d4l3k!
Thank you for your pull request.
We require contributors to sign our Contributor License Agreement, and yours needs attention.
You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.
Process
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed
. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at [email protected]. Thanks!