Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/platforms/nvidia.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ NVTE_FUSED_ATTN=1 # default, but verify
TORCHINDUCTOR_CACHE_DIR=/data/.inductor
```

miles sets `NVSHMEM_DISABLE_NCCL=1` on rollout and training actors automatically. DeepEP
initializes NVSHMEM, whose built-in NCCL path opens a second NCCL communicator that collides
with miles' own NCCL and hangs during SGLang CUDA-graph replay. Export `NVSHMEM_DISABLE_NCCL=0`
to opt out.

## NVLink + IB topology

For 8× GPUs per node:
Expand Down
2 changes: 2 additions & 0 deletions miles/ray/actor_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def _allocate_gpus_for_actor(self, pg, num_gpus_per_actor):
# we need also set it to 0 to prevent nccl error.
"NCCL_CUMEM_ENABLE": os.environ.get("NCCL_CUMEM_ENABLE", "0"),
"NVTE_FP8_BLOCK_SCALING_FP32_SCALES": "1",
# DeepEP/NVSHMEM's internal NCCL conflicts with our NCCL and hangs under CUDA graphs.
"NVSHMEM_DISABLE_NCCL": os.environ.get("NVSHMEM_DISABLE_NCCL", "1"),
**{name: "1" for name in NOSET_VISIBLE_DEVICES_ENV_VARS_LIST},
**self.args.train_env_vars,
}
Expand Down
2 changes: 2 additions & 0 deletions miles/ray/rollout/server_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def start_engines(
env_vars = {name: "1" for name in NOSET_VISIBLE_DEVICES_ENV_VARS_LIST} | {
key: os.environ.get(key, default_val)
for key, default_val in {
# DeepEP/NVSHMEM's internal NCCL conflicts with our NCCL and hangs under CUDA graphs.
"NVSHMEM_DISABLE_NCCL": "1",
"SGLANG_JIT_DEEPGEMM_PRECOMPILE": "false",
# TODO: this is hacky. Use env var SGLANG_DG_CACHE_DIR_PER_PROCESS=1
# to enable this isolation.
Expand Down
Loading