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] Automatically set NCCL_SOCKET_IFNAME to use ethernet #28633

Merged
merged 7 commits into from
Sep 21, 2022

Conversation

amogkam
Copy link
Contributor

@amogkam amogkam commented Sep 20, 2022

Signed-off-by: Amog Kamsetty [email protected]

Automatically set NCCL_SOCKET_IFNAME to prefer ethernet. Also adds a FAQ section in the docs on how to diagnose this issue.

Closes #26663

Why are these changes needed?

Related issue number

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 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: Amog Kamsetty <[email protected]>
Signed-off-by: Amog Kamsetty <[email protected]>
Copy link
Contributor

@matthewdeng matthewdeng left a comment

Choose a reason for hiding this comment

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

Nice, thanks for doing this!!

Comment on lines +78 to +79
2. Choose the network interface that corresponds to the private IP address of your node. In most cases, this will be either
`ens3` or `ens5`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any NCCL documentation that corroborates this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no...nothing I could find. This is just from our experiences. Unfortunately the documentation around this is pretty sparse :(

# Use ethernet when possible.
# NCCL_SOCKET_IFNAME does a prefix match so "ens3" or "ens5" will match with
# "en".
DEFAULT_NCCL_SOCKET_IFNAME = "en,eth,bond"
Copy link
Contributor

Choose a reason for hiding this comment

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

Double checking my understanding, does order matter here? Or does it matter what the order of ifconfig outputs?

Copy link
Contributor

Choose a reason for hiding this comment

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

The first is prefered (first anything starting in en, then eth, then bond)

Copy link
Contributor

@krfricke krfricke left a comment

Choose a reason for hiding this comment

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

LGTM, do we have passing release tests?

Copy link
Member

@Yard1 Yard1 left a comment

Choose a reason for hiding this comment

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

One question, should we log or warn when we are doing this?

@jiaodong
Copy link
Member

Looks great ! Even updated tests are release tests with pytorch, can you also kick them off on PR to ensure everything works as expected ?

Signed-off-by: Amog Kamsetty <[email protected]>
@amogkam
Copy link
Contributor Author

amogkam commented Sep 20, 2022

@Yard1 added a debug statement

@amogkam
Copy link
Contributor Author

amogkam commented Sep 21, 2022

Passing release test here: https://buildkite.com/ray-project/release-tests-pr/builds/15918#01835d56-ea64-4d75-8bac-56fc4d1c0198

Signed-off-by: Amog Kamsetty <[email protected]>
Signed-off-by: Amog Kamsetty <[email protected]>
Signed-off-by: Amog Kamsetty <[email protected]>
@amogkam
Copy link
Contributor Author

amogkam commented Sep 21, 2022

Torch comparison benchmark release test passing here: https://buildkite.com/ray-project/release-tests-pr/builds/15987#018361b3-f423-4f53-bfbf-ed73cf7a7f8d

@amogkam amogkam merged commit c68a8c3 into ray-project:master Sep 21, 2022
@amogkam amogkam deleted the train-network-interface-doc branch September 21, 2022 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AIR][Train] Add default network setting for pytorch multi-host training
6 participants