Repository navigation
Description
Describe the bug
With the latest DeepSpeed version, launching a single-GPU training job fails during torch.distributed.new_group() with an NCCL CUDA error 600: device not ready.
The failure occurs during DeepSpeed-launched process initialization, before the model forward pass or any training computation.
Importantly, the same environment can successfully initialize both the default NCCL process group and an additional NCCL process group without DeepSpeed. Downgrading DeepSpeed to 0.17.2 makes the exact same training command work correctly.
This suggests a regression or compatibility issue in the latest DeepSpeed launcher/runtime related to NCCL process-group initialization.
To Reproduce
1. Environment
The issue was reproduced with:
PyTorch: 2.13.0+cu129
CUDA: 12.9
NCCL: 2.29.7
GPU: NVIDIA GeForce RTX 3060 Laptop GPU
GPU capability: 8.6
Python: 3.12
2. Launch a training job with the DeepSpeed launcher
deepspeed --module jllm.train_pipe \
--model Qwen3.5-27B \
--num_train_epochs 1 \
--gradient_accumulation_steps 1 \
--train_data s10_Qwen3.5-27B/ \
--init \
--partition_method '0,6'DeepSpeed launches:
world_size=1
local_rank=0
CUDA_VISIBLE_DEVICES=0
3. The job fails during model-parallel initialization
The relevant traceback is:
torch.distributed.new_group()
-> _new_process_group_helper()
-> eager_backend.eager_connect_single_device()
-> NCCL error
Error:
torch.distributed.DistBackendError: NCCL error in:
.../NCCLUtils.cpp:243, unhandled cuda error
ncclUnhandledCudaError: Call to CUDA function failed.
Last error:
Cuda failure 600 'device not ready'
The failure occurs at:
jllm/core/parallel_state.py
create_group()
-> torch.distributed.new_group()
before the model starts training.
Expected behavior
The DeepSpeed launcher should successfully initialize the NCCL process group, as it does with DeepSpeed 0.17.2.
Since the job uses only one GPU (world_size=1), NCCL process-group initialization should not fail with CUDA error 600.
ds_report output
ds_report output:
[Please paste the output of `ds_report` here]
Screenshots
Not applicable. The complete traceback is provided above.
System info
- OS: Ubuntu on WSL2
- GPU count and types: 1 × NVIDIA GeForce RTX 3060 Laptop GPU
- GPU capability: 8.6
- Interconnects: N/A (single GPU)
- Python: 3.12
- PyTorch: 2.13.0+cu129
- CUDA runtime: 12.9
- NCCL: 2.29.7
- DeepSpeed: latest version where the issue occurs
Launcher context
The experiment is launched using the DeepSpeed launcher:
deepspeed --module jllm.train_pipe ...DeepSpeed reports:
WORLD INFO DICT: {'localhost': [0]}
nnodes=1
num_local_procs=1
node_rank=0
dist_world_size=1
CUDA_VISIBLE_DEVICES=0
Docker context
Not using Docker.
Additional context
I verified that the underlying PyTorch/NCCL environment works correctly without DeepSpeed.
The following minimal test succeeds in the same Python environment:
import torch
import torch.distributed as dist
print("torch:", torch.__version__)
print("cuda:", torch.version.cuda)
print("nccl:", torch.cuda.nccl.version())
print("gpu:", torch.cuda.get_device_name(0))
print("capability:", torch.cuda.get_device_capability(0))
torch.cuda.set_device(0)
dist.init_process_group(
backend="nccl",
init_method="tcp://127.0.0.1:29501",
rank=0,
world_size=1,
)
print("default PG OK")
g = dist.new_group(
ranks=[0],
backend="nccl",
)
print("new_group OK")
dist.destroy_process_group()Output:
torch: 2.13.0+cu129
cuda: 12.9
nccl: (2, 29, 7)
gpu: NVIDIA GeForce RTX 3060 Laptop GPU
capability: (8, 6)
default PG OK
new_group OK
Therefore, the CUDA/NCCL stack itself appears to be functional.
DeepSpeed version comparison
The exact same training environment and command work correctly after downgrading DeepSpeed to:
DeepSpeed 0.17.2
So the issue appears to be specific to newer DeepSpeed versions.
In summary:
DeepSpeed latest
-> torch.distributed.new_group()
-> NCCL eager_connect_single_device()
-> CUDA error 600: device not ready
-> FAIL
DeepSpeed 0.17.2
-> same environment
-> same training command
-> SUCCESS
Could this be related to a change in the DeepSpeed launcher or distributed/NCCL initialization path in versions newer than 0.17.2?
Activity
pengdurice commentedon Aug 26, 2026
@janelu9 , thank you for reporting this issue! A couple of asks to help us debug more;-)
and see what happens.
can you also try NCCL_DEBUG=INFO when doing the tests and paste the full log?
Thank you!
janelu9 commentedon Aug 26, 2026
Thanks, I will try again. It's well when running on two GPUs.
pengdurice commentedon Aug 26, 2026
Thank you! LMK when you get new results. It is interesting to learn that it works on 2 GPUs and do not work on one.
pengdurice commentedon Aug 26, 2026
I did some investigations on my side:
settings:
h200 gpu, torch 2.8.0+cu128, NCCL 2.27.3, Linux (I don't have the wsl2 as the @janelu9 has):
I tried 4 different code versions: 0.17.2, 0.17.3; master and the fix version with PR 8269.
Also, I tried a simple toy example training as well as @janelu9 's jllm codebase.
The tldr is that, I can generate some intermediate results that can be indicative but not the final failure (maybe because I don't have the same machine or lib versions).
The mechanism is that: when a device_id is given (introduced in 0.17.3), the process group init happens eagerly and when a new group is requested, it will do the commSplit of the existing process groups. But when a device id is not given, the init is lazy and there is no com split, and it goes a different path. I can reproduce the number of comm split:
bound_device_idncclCommSplitNonecuda:0cuda:0NoneSo the remaining question becomes if the comm split causes issues specifically on customer's hardware and software.
This PR may be a walk-around at best to avoid the trigger of the issue rather than solving it if comm split is the root cause.
As of world size = 1 vs world size =2: I am still investigating on that.
Look forward to the full raw stack of errors from the customer and if the fix will resolve the issue and what happens with world size = 2.
pengdurice commentedon Aug 26, 2026
@janelu9 , would you also mind paste the logs of world-size = 2? that helps understand the diffs of ws=1 vs 2. Thank you!
janelu9 commentedon Aug 27, 2026
My code is similar to Megatron-DeepSpeed, and the problem occurs when building the 3D parallel topology. The error only occurs when world_size=1; there are no errors when world_size>1.
The error occurs here.
https://github.com/janelu9/EasyLLM/blob/11589b1b177c06b8dcbdc6ada59043de7f6cce8b/jllm/core/parallel_state.py#L183
pengdurice commentedon Aug 27, 2026
Thank you! this is helpful, would you mind share other information? e.g. ws=2; running with NCCL_DEBUG=INFO and applying the PR and see if it fixes things? Looking forward to it!
pengdurice commentedon Aug 28, 2026
Also, would you mind create a simple model and training loop to test? this train_pipe.py contains calls parallel_state.py which creates tons of new groups for different purposes. A simple clean model and training loop help isolate better if it the excessive new_group operation is the culprit.
janelu9 commentedon Sep 1, 2026
In the latest version, it still reports an error when
ws=1, whilews=2works normally as before.janelu9 commentedon Sep 1, 2026
When using version 0.17.2, which does not report any errors, the logs are as follows:
fix: Only bind device id when needed, Fixes deepspeedai#8248 (deepspe…