-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[None][feat] Add DWDP (Distributed Weight Data Parallelism) support for MoE inference #12136
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
Merged
+4,013
−578
Merged
Changes from 9 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
bbe48fa
[None][feat] Add DWDP (Distributed Weight Data Parallelism) support f…
tianyuz-nv 7e4a855
Merge upstream/main into dwdp_productization
tianyuz-nv f76d026
Register DWDP accuracy test in CI test lists
tianyuz-nv f153099
Fix CI: remove forbidden from_dict, init helper, apply pre-commit for…
tianyuz-nv 38d6e92
Fix CI and add env var config for disaggregated benchmark
tianyuz-nv d52a3cf
Merge remote-tracking branch 'upstream/main' into dwdp_productization
tianyuz-nv f52716d
Remove unused helper variable to fix ruff F841
tianyuz-nv 64a7c7d
Merge branch 'main' into dwdp_productization
Kefeng-Duan 47618f3
Merge branch 'main' into dwdp_productization
Kefeng-Duan b10dc89
Improve DwdpConfig docstring per review feedback
tianyuz-nv 7040370
Decouple DWDP from mainline disagg scripts per reviewer feedback
tianyuz-nv 28390e5
fix(moe): remove commented-out barrier in moeA2AInitializeOp
tianyuz-nv a4085ea
fix(dwdp): move record_compute_and_prefetch_next to per-layer level
tianyuz-nv a8a0a8f
style: fix pre-commit formatting for DWDP files
tianyuz-nv 26e3e9f
Merge remote-tracking branch 'upstream/main' into dwdp_productization
tianyuz-nv 85def53
refactor(dwdp): address reviewer feedback on DWDP config and lifecycle
tianyuz-nv afcd735
test(api_stability): align llm.yaml dwdp_config with Optional + proto…
tianyuz-nv be12482
Merge remote-tracking branch 'upstream/main' into dwdp_productization
tianyuz-nv 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
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
61 changes: 61 additions & 0 deletions
61
examples/disaggregated/slurm/benchmark/start_worker_dwdp.sh
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 |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| #! /bin/bash | ||
| set -u | ||
| set -e | ||
| set -x | ||
|
|
||
| config_file=${1} | ||
| numa_bind=${2} | ||
| log_dir=${3} | ||
| enable_nsys=${4} | ||
| ctx_profile_range=${5} | ||
| gen_profile_range=${6} | ||
| num_ctx_gpus=${7} | ||
| ctx_worker_env_var=${8} | ||
| gen_worker_env_var=${9} | ||
|
|
||
| unset UCX_NET_DEVICES | ||
| unset UCX_TLS | ||
|
|
||
| echo "SLURM_PROCID: ${SLURM_PROCID}, hostname: $(hostname)" | ||
|
|
||
| if [ "${SLURM_PROCID}" -lt "${num_ctx_gpus}" ]; then | ||
| worker_role="CTX" | ||
| worker_env_var=${ctx_worker_env_var} | ||
| profile_range=${ctx_profile_range} | ||
| else | ||
| worker_role="GEN" | ||
| worker_env_var=${gen_worker_env_var} | ||
| profile_range=${gen_profile_range} | ||
| fi | ||
|
|
||
| echo "worker_role: ${worker_role}, profile_range: ${profile_range}" | ||
|
|
||
| for env_var in ${worker_env_var}; do | ||
| export "${env_var}" | ||
| echo "Exported: ${env_var}" | ||
| done | ||
|
|
||
| if [ "${numa_bind}" = "true" ]; then | ||
| numa_bind_cmd="numactl -m 0,1" | ||
| echo "numactl -m 0,1 - Only allocate memory from nodes on GB200/GB300 NVL72" | ||
| else | ||
| numa_bind_cmd="" | ||
| echo "Not binding memory. If on GB200/GB300 NVL72, use \"numactl -m 0,1\" to only allocate memory from nodes." | ||
| fi | ||
|
|
||
| echo "config_file: ${config_file}" | ||
|
|
||
| nsys_prefix="" | ||
| if [ "${enable_nsys}" != "true" ]; then | ||
| echo "nsys is not enabled, start normal flow" | ||
| else | ||
| nsys_file=${log_dir}/nsys_worker_proc_${worker_role}_${SLURM_PROCID} | ||
| export TLLM_PROFILE_RECORD_GC=1 | ||
| export TLLM_NVTX_DEBUG=1 | ||
| export NSYS_MPI_STORE_TEAMS_PER_RANK=1 | ||
| export TLLM_PROFILE_START_STOP=${profile_range} | ||
| echo "nsys is enabled on ${worker_role} ranks, TLLM_PROFILE_START_STOP=${profile_range}" | ||
| nsys_prefix="nsys profile -o ${nsys_file} -f true -t cuda,nvtx,python-gil -c cudaProfilerApi --cuda-graph-trace node --capture-range-end=stop --gpu-metrics-devices=none" | ||
| fi | ||
|
|
||
| ${nsys_prefix} ${numa_bind_cmd} trtllm-serve disaggregated_mpi_worker -c ${config_file} |
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.
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.
Uh oh!
There was an error while loading. Please reload this page.