-
Notifications
You must be signed in to change notification settings - Fork 2
Users/oyazdanb/multi node improve #60
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
Open
oyazdanb
wants to merge
4
commits into
main
Choose a base branch
from
users/oyazdanb/multi_node_improve
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,7 @@ expected_outputs/ | |
| testdata/ | ||
| actual_outputs/ | ||
| *.html | ||
| *.zip | ||
|
|
||
| # IDE/project-specific folders | ||
| .vscode/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You also need to change the scripts/multi_node/setup_multi_node.sh to take AORTA_PATH from scripts directory, currently it expects at $HOME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,121 @@ | ||
| #!/bin/bash | ||
| # ============================================================================= | ||
| # Global NCCL/RCCL environment variables for multi-node training | ||
| # Based on DLRM_set_env_variables.sh | ||
| # Configured for MI350X cluster | ||
| # | ||
| # This file is the SINGLE SOURCE OF TRUTH for all NCCL/RCCL configuration. | ||
| # Edit variables here - local_launch.sh will automatically pick them up. | ||
| # ============================================================================= | ||
|
|
||
| # NCCL Debug Settings (use INFO for debugging network issues) | ||
| export NCCL_DEBUG=INFO | ||
| export NCCL_DEBUG_SUBSYS=INIT,NET | ||
| # Try disabling IB if InfiniBand is not properly configured | ||
| export NCCL_IB_DISABLE=1 | ||
| # ----------------------------------------------------------------------------- | ||
| # NCCL Debug Settings | ||
| # ----------------------------------------------------------------------------- | ||
| export NCCL_DEBUG=WARN | ||
| export NCCL_DEBUG_SUBSYS= # Options: COLL,INIT,NET (empty = none) | ||
|
|
||
| # IB/RNIC Configuration (commented out when IB is disabled) | ||
| # export NCCL_IB_HCA=bnxt_re0,bnxt_re1,bnxt_re2,bnxt_re3,bnxt_re4,bnxt_re5,bnxt_re6,bnxt_re7 | ||
| # export NCCL_IB_GID_INDEX=3 | ||
| # ----------------------------------------------------------------------------- | ||
| # RCCL-Specific Settings (ROCm) | ||
| # ----------------------------------------------------------------------------- | ||
| export RCCL_DIRECT_ALLGATHER_DISABLE=1 # Disable direct allgather | ||
| export RCCL_MSCCL_ENABLE=0 # Disable MSCCL | ||
| export RCCL_THREADS_PER_BLOCK=256 # Threads per block (override via --threads) | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # IB/RNIC Configuration for MI350X | ||
| # ----------------------------------------------------------------------------- | ||
| export NCCL_IB_HCA=bnxt_re0,bnxt_re1,bnxt_re2,bnxt_re3,bnxt_re4,bnxt_re5,bnxt_re6,bnxt_re7 | ||
| export NCCL_IB_GID_INDEX=3 | ||
| export NCCL_NCHANNELS_PER_NET_PEER=8 | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # HSA Settings for ROCm | ||
| # ----------------------------------------------------------------------------- | ||
| export HSA_ENABLE_IPC_MODE_LEGACY=1 | ||
| export HSA_ENABLE_SDMA=0 # Disable SDMA for stability | ||
|
|
||
| # NCCL Protocol | ||
| # ----------------------------------------------------------------------------- | ||
| # NCCL Protocol and Channels | ||
| # ----------------------------------------------------------------------------- | ||
| export NCCL_PROTO=Simple | ||
|
|
||
| # Channel Configuration (can be overridden by sweep parameters) | ||
| export NCCL_MIN_NCHANNELS=40 | ||
| export NCCL_MAX_NCHANNELS=40 | ||
| export NCCL_MAX_NCHANNELS=40 # Override via --channels | ||
|
|
||
| # Network Interface | ||
| # Change this to match your network interface: eth0, ib0, enp49s0f0np0, etc. | ||
| # Temporarily commented out for auto-detection: | ||
| # export NCCL_SOCKET_IFNAME=enp193s0f0 | ||
| # ----------------------------------------------------------------------------- | ||
| # Network Interface for MI350X cluster | ||
| # ----------------------------------------------------------------------------- | ||
| export NCCL_SOCKET_IFNAME=enp49s0f0np0,fenic0 | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # Timeout and Error Handling | ||
| # ----------------------------------------------------------------------------- | ||
| export NCCL_TIMEOUT_MS=12000 # 12 second timeout | ||
| export TORCH_DIST_INIT_TIMEOUT=60 | ||
| export TORCH_NCCL_ASYNC_ERROR_HANDLING=1 | ||
| export TORCH_NCCL_TRACE_BUFFER_SIZE=10000 | ||
| export TORCH_NCCL_DUMP_ON_TIMEOUT=1 # Critical for hang debugging | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # PyTorch ROCm Profiler | ||
| # ----------------------------------------------------------------------------- | ||
| export PYTORCH_ROCM_PROFILER_ENABLE_TRACING=1 | ||
|
|
||
| # Optional: Force non-overlap for debugging | ||
| # ----------------------------------------------------------------------------- | ||
| # List of environment variables to pass to Docker container | ||
| # Add/remove variables here to control what gets passed through | ||
| # ----------------------------------------------------------------------------- | ||
| DOCKER_ENV_VARS=( | ||
| # NCCL Debug | ||
| NCCL_DEBUG | ||
| NCCL_DEBUG_SUBSYS | ||
| # RCCL | ||
| RCCL_DIRECT_ALLGATHER_DISABLE | ||
| RCCL_MSCCL_ENABLE | ||
| RCCL_THREADS_PER_BLOCK | ||
| # IB/RNIC | ||
| NCCL_IB_HCA | ||
| NCCL_IB_GID_INDEX | ||
| NCCL_NCHANNELS_PER_NET_PEER | ||
| # HSA | ||
| HSA_ENABLE_IPC_MODE_LEGACY | ||
| HSA_ENABLE_SDMA | ||
| # Protocol/Channels | ||
| NCCL_PROTO | ||
| NCCL_MIN_NCHANNELS | ||
| NCCL_MAX_NCHANNELS | ||
| # Network | ||
| NCCL_SOCKET_IFNAME | ||
| # Timeout/Error Handling | ||
| NCCL_TIMEOUT_MS | ||
| TORCH_DIST_INIT_TIMEOUT | ||
| TORCH_NCCL_ASYNC_ERROR_HANDLING | ||
| TORCH_NCCL_TRACE_BUFFER_SIZE | ||
| TORCH_NCCL_DUMP_ON_TIMEOUT | ||
| # Profiler | ||
| PYTORCH_ROCM_PROFILER_ENABLE_TRACING | ||
| ) | ||
| export DOCKER_ENV_VARS | ||
|
|
||
| # ----------------------------------------------------------------------------- | ||
| # Helper function: Build docker -e flags from DOCKER_ENV_VARS | ||
| # Usage: DOCKER_ENV_FLAGS=$(build_docker_env_flags) | ||
| # ----------------------------------------------------------------------------- | ||
| build_docker_env_flags() { | ||
| local flags="" | ||
| for var in "${DOCKER_ENV_VARS[@]}"; do | ||
| local value="${!var}" | ||
| flags+=" -e ${var}=${value}" | ||
| done | ||
| echo "$flags" | ||
| } | ||
| export -f build_docker_env_flags | ||
|
|
||
| # ============================================================================= | ||
| # Optional settings (uncomment to enable) | ||
| # ============================================================================= | ||
|
|
||
| # Force non-overlap for debugging (single HW queue) | ||
| # export GPU_MAX_HW_QUEUES=1 | ||
| # unset TORCH_NCCL_HIGH_PRIORITY | ||
|
|
||
| # Optional: Disable SDMA for testing | ||
| # export HSA_ENABLE_SDMA=0 | ||
|
|
||
| # Optional: Disable IB for Ethernet-only testing | ||
| # Disable IB for Ethernet-only testing | ||
| # export NCCL_IB_DISABLE=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need these same changes in config/multi_node/distributed_multinode.yaml