vllm-project/vllm · error · ValueError

The Proton profiler requires CUDA graphs to be disabled. Use

Error message

The Proton profiler requires CUDA graphs to be disabled. Use --enforce-eager or set --compilation-config.cudagraph_mode=none.

What it means

Proton profiling cannot capture kernels inside CUDA graph replay, so vLLM requires CUDA graphs to be fully disabled when profiling with Proton. Validation fails if `profiler == 'proton'' and `compilation_config.cudagraph_mode != CUDAGraphMode.NONE`.

Source

Thrown at vllm/config/vllm.py:1297

                "To workaround this limitation, vLLM will set 'ieee' input "
                "precision for chunked prefill triton kernels."
            )

        if self.model_config is not None and self.model_config.enforce_eager:
            logger.warning_once(
                "Enforce eager set, disabling torch.compile and CUDAGraphs. "
                "This is equivalent to setting -cc.mode=none -cc.cudagraph_mode=none"
            )
            self.compilation_config.mode = CompilationMode.NONE
            self.compilation_config.cudagraph_mode = CUDAGraphMode.NONE

        if self.profiler_config.profiler == "proton":
            if not current_platform.is_cuda():
                raise ValueError(
                    "The Proton profiler currently supports NVIDIA CUDA only"
                )
            if self.compilation_config.cudagraph_mode != CUDAGraphMode.NONE:
                raise ValueError(
                    "The Proton profiler requires CUDA graphs to be disabled. "
                    "Use --enforce-eager or set "
                    "--compilation-config.cudagraph_mode=none."
                )

        if os.environ.get("TORCH_COMPILE_DISABLE") == "1":
            logger.warning_once(
                "TORCH_COMPILE_DISABLE is set, disabling torch.compile. "
                "This is equivalent to setting -cc.mode=none"
            )
            self.compilation_config.mode = CompilationMode.NONE

        # For model classes don't carry @support_torch_compile —
        # the breakable cudagraph is the supported PIECEWISE path. Auto-enable
        # it unless the user has explicitly opted out via the env var.
        if (
            self.model_config is not None
            and "VLLM_USE_BREAKABLE_CUDAGRAPH" not in os.environ

View on GitHub (pinned to c794754062)

Solutions

  1. Add `--enforce-eager` to the launch command.
  2. Or pass `--compilation-config.cudagraph_mode=none`.
  3. Remove `--profiler proton` if CUDA graphs must stay enabled.

Example fix

# before
vllm serve model --profiler proton

# after
vllm serve model --profiler proton --enforce-eager
Defensive patterns

Strategy: validation

Validate before calling

if profiler == "proton" and cudagraph_mode != "none":
    cudagraph_mode = "none"  # or set enforce_eager=True before launch

Try / catch

try:
    LLM(profiler=ProfilerConfig(profiler="proton"), ...)
except ValueError as e:
    if "requires CUDA graphs to be disabled" in str(e):
        args.enforce_eager = True
    else:
        raise

Prevention

When it happens

Trigger: Launching with `--profiler proton` while cudagraph_mode is left at its default (FULL/PIECEWISE) — i.e. without `--enforce-eager` and without `--compilation-config.cudagraph_mode=none`.

Common situations: Enabling Proton to profile kernel-level performance but reusing a production launch command that keeps CUDA graphs enabled for throughput.

Related errors


AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14). Data as JSON: /api/errors/983d8b09e1b357e3. Report an issue: GitHub.