vllm - 💡(How to fix) Fix [Bug]: Running DeepSeek-V4 fails with  CUDA error: unspecified launch failure  in  synchronize_input_prep [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#40952Fetched 2026-04-28 06:26:16
View on GitHub
Comments
1
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×2commented ×1

Error Message

When trying to serve DeepSeek-V4 using vLLM, the worker process crashes immediately with a CUDA error: unspecified launch failure error. The stack trace points to synchronize_input_prep in gpu_model_runner.py, and the process hangs before any requests are processed. 2. The server starts but immediately throws the following error and hangs: torch.AcceleratorError: CUDA error: unspecified launch failure

  • The error occurs even with minimal inference requests; GPU utilization and memory usage are low at the time of the crash.

Code Example

docker run --runtime=nvidia --gpus all \
    --name deepseek-v4 \
    -v /mnt/data/modelscope/deepseek-ai/DeepSeek-V4-Flash:/model \
    --env CUDA_VISIBLE_DEVICES=0,1,2,3 \
    --env VLLM_USE_DEEP_GEMM=1 \
    -p 8025:8000 \
    --ipc=host \
    --shm-size=32g \
    vllm/vllm-openai:deepseekv4-cu130 \
    --model /model \
    --served-model-name deepseek-v4 \
    --gpu-memory-utilization 0.85 \
    --max-num-seqs 8 \
    --max-model-len auto \
    --block-size 256 \
    --tensor-parallel-size 4 \
    --enable-chunked-prefill \
    --enable-expert-parallel \
    --enable-prefix-caching \
    --enable-auto-tool-choice \
    --tokenizer-mode deepseek_v4 \
    --tool-call-parser deepseek_v4 \
    --reasoning-parser deepseek_v4 \
    --trust-remote-code \
    --kv-cache-dtype fp8 \
    --no-disable-hybrid-kv-cache-manager
RAW_BUFFERClick to expand / collapse

Your current environment

Model: `DeepSeek v4 flash

  • CUDA version: 13.0
  • GPU model: H100*8
  • OS: Ubuntu 20.04 LTS
  • Container runtime: Docker deepseekv4 cu130

🐛 Describe the bug

vLLM fails to run DeepSeek-V4 with CUDA launch failure

When trying to serve DeepSeek-V4 using vLLM, the worker process crashes immediately with a CUDA error: unspecified launch failure error. The stack trace points to synchronize_input_prep in gpu_model_runner.py, and the process hangs before any requests are processed.

Steps to reproduce the behavior:

  1. Run the following vLLM command to serve DeepSeek-V4:
    docker run --runtime=nvidia --gpus all \
    --name deepseek-v4 \
    -v /mnt/data/modelscope/deepseek-ai/DeepSeek-V4-Flash:/model \
    --env CUDA_VISIBLE_DEVICES=0,1,2,3 \
    --env VLLM_USE_DEEP_GEMM=1 \
    -p 8025:8000 \
    --ipc=host \
    --shm-size=32g \
    vllm/vllm-openai:deepseekv4-cu130 \
    --model /model \
    --served-model-name deepseek-v4 \
    --gpu-memory-utilization 0.85 \
    --max-num-seqs 8 \
    --max-model-len auto \
    --block-size 256 \
    --tensor-parallel-size 4 \
    --enable-chunked-prefill \
    --enable-expert-parallel \
    --enable-prefix-caching \
    --enable-auto-tool-choice \
    --tokenizer-mode deepseek_v4 \
    --tool-call-parser deepseek_v4 \
    --reasoning-parser deepseek_v4 \
    --trust-remote-code \
    --kv-cache-dtype fp8 \
    --no-disable-hybrid-kv-cache-manager
  2. The server starts but immediately throws the following error and hangs:
    File "/usr/local/lib/python3.12/dist-packages/vllm/v1/worker/gpu_model_runner.py", line 3492, in synchronize_input_prep
        self.prepare_inputs_event.synchronize()
    torch.AcceleratorError: CUDA error: unspecified launch failure
    Search for 'cudaErrorLaunchFailure' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
    CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
    For debugging consider passing CUDA_LAUNCH_BLOCKING=1
    Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
    
    prompt throughput: 0.0 tokens/s, Avg generation throughput: 0.0 tokens/s, Running: 2 reqs, Waiting: 0 reqs, GPU KV cache usage: 1.8%, Prefix cach...
    broadcast block found in 60 seconds. This typically happens when some processes are hanging or doing some time-consuming work
    ``

Additional context

  • The error occurs even with minimal inference requests; GPU utilization and memory usage are low at the time of the crash.
  • I have tried setting CUDA_LAUNCH_BLOCKING=1 and TORCH_USE_CUDA_DSA, but the issue persists.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

extent analysis

TL;DR

The most likely fix for the CUDA launch failure error in DeepSeek-V4 is to investigate and adjust the GPU configuration, such as the number of GPUs used or the CUDA_VISIBLE_DEVICES environment variable.

Guidance

  • Verify that the GPU devices specified in CUDA_VISIBLE_DEVICES are correctly recognized and utilized by the Docker container.
  • Check the GPU memory utilization and adjust the --gpu-memory-utilization parameter if necessary to prevent memory overload.
  • Consider reducing the --tensor-parallel-size or --max-num-seqs parameters to decrease the computational load on the GPUs.
  • Investigate the possibility of a compatibility issue between the CUDA version (13.0) and the GPU model (H100), and explore updating or downgrading CUDA if necessary.

Example

No specific code snippet is provided, as the issue seems to be related to the configuration and environment rather than a code error.

Notes

The error message suggests that the issue might be related to the CUDA kernel launch, and adjusting the GPU configuration or environment variables might help resolve the issue. However, without more detailed information about the system and the specific error, it is difficult to provide a more precise solution.

Recommendation

Apply a workaround by adjusting the GPU configuration and environment variables, as the issue seems to be related to the interaction between the CUDA version, GPU model, and the Docker container. This approach allows for a more targeted investigation and potential resolution of the issue without requiring a version upgrade or significant code changes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

vllm - 💡(How to fix) Fix [Bug]: Running DeepSeek-V4 fails with  CUDA error: unspecified launch failure  in  synchronize_input_prep [1 comments, 1 participants]