Skip to content

[BUG]DeepSpeed latest version fails during NCCL process-group initialization with CUDA error 600, while 0.17.2 works #8248

Description

@janelu9

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?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtraining

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions