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

[train] update TORCH_NCCL_ASYNC_ERROR_HANDLING env var #47292

Merged
merged 3 commits into from
Aug 23, 2024

Conversation

matthewdeng
Copy link
Contributor

@matthewdeng matthewdeng commented Aug 23, 2024

Why are these changes needed?

Fixes this warning:

(RayTrainWorker pid=2273, ip=172.24.21.66) [rank7]:[W Utils.hpp:108] Warning: Environment variable NCCL_ASYNC_ERROR_HANDLING is deprecated; use TORCH_NCCL_ASYNC_ERROR_HANDLING instead (function getCvarString)

This environment variable was changed in torch 2.2.0: pytorch/pytorch@8f8722e.

More details about this environment variable can be found here: https://github.com/pytorch/pytorch/blob/dc8bb2636c5412c68e72dc6e33a6589683d8fd12/docs/source/torch_nccl_environment_variables.rst.

Related issue number

Closes #47286

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Matthew Deng <matt@anyscale.com>
Signed-off-by: Matthew Deng <matt@anyscale.com>
Copy link
Contributor

@justinvyu justinvyu left a comment

Choose a reason for hiding this comment

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

Thanks!

python/ray/train/torch/config.py Outdated Show resolved Hide resolved
if backend == "nccl":
# See https://github.com/pytorch/pytorch/blob/c263bd43e8e8502d4726643bc6fd046f0130ac0e/torch/distributed/distributed_c10d.py#L803-L823 # noqa: E501
# We do not use TORCH_NCCL_BLOCKING_WAIT due to performance overhead.
if Version(torch.__version__) < Version("2.2.0"):
Copy link
Contributor

Choose a reason for hiding this comment

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

how'd you find this version in the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops I haven't updated the PR description, but it was added in pytorch/pytorch@8f8722e!

Co-authored-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: matthewdeng <matthew.j.deng@gmail.com>
@matthewdeng matthewdeng marked this pull request as ready for review August 23, 2024 20:07
@matthewdeng matthewdeng enabled auto-merge (squash) August 23, 2024 20:08
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Aug 23, 2024
@matthewdeng matthewdeng merged commit 2b27b31 into ray-project:master Aug 23, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[train] Update torch NCCL env var from NCCL_ASYNC_ERROR_HANDLING to TORCH_NCCL_ASYNC_ERROR_HANDLING
2 participants