{"record":{"id":"983d8b09e1b357e3","repo":"vllm-project/vllm","slug":"the-proton-profiler-requires-cuda-graphs-to-be-dis","errorCode":null,"errorMessage":"The Proton profiler requires CUDA graphs to be disabled. Use --enforce-eager or set --compilation-config.cudagraph_mode=none.","messagePattern":"The Proton profiler requires CUDA graphs to be disabled\\. Use --enforce-eager or set --compilation-config\\.cudagraph_mode=none\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/vllm.py","lineNumber":1297,"sourceCode":"                \"To workaround this limitation, vLLM will set 'ieee' input \"\n                \"precision for chunked prefill triton kernels.\"\n            )\n\n        if self.model_config is not None and self.model_config.enforce_eager:\n            logger.warning_once(\n                \"Enforce eager set, disabling torch.compile and CUDAGraphs. \"\n                \"This is equivalent to setting -cc.mode=none -cc.cudagraph_mode=none\"\n            )\n            self.compilation_config.mode = CompilationMode.NONE\n            self.compilation_config.cudagraph_mode = CUDAGraphMode.NONE\n\n        if self.profiler_config.profiler == \"proton\":\n            if not current_platform.is_cuda():\n                raise ValueError(\n                    \"The Proton profiler currently supports NVIDIA CUDA only\"\n                )\n            if self.compilation_config.cudagraph_mode != CUDAGraphMode.NONE:\n                raise ValueError(\n                    \"The Proton profiler requires CUDA graphs to be disabled. \"\n                    \"Use --enforce-eager or set \"\n                    \"--compilation-config.cudagraph_mode=none.\"\n                )\n\n        if os.environ.get(\"TORCH_COMPILE_DISABLE\") == \"1\":\n            logger.warning_once(\n                \"TORCH_COMPILE_DISABLE is set, disabling torch.compile. \"\n                \"This is equivalent to setting -cc.mode=none\"\n            )\n            self.compilation_config.mode = CompilationMode.NONE\n\n        # For model classes don't carry @support_torch_compile —\n        # the breakable cudagraph is the supported PIECEWISE path. Auto-enable\n        # it unless the user has explicitly opted out via the env var.\n        if (\n            self.model_config is not None\n            and \"VLLM_USE_BREAKABLE_CUDAGRAPH\" not in os.environ","sourceCodeStart":1279,"sourceCodeEnd":1315,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/vllm.py#L1279-L1315","documentation":"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`.","triggerScenarios":"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`.","commonSituations":"Enabling Proton to profile kernel-level performance but reusing a production launch command that keeps CUDA graphs enabled for throughput.","solutions":["Add `--enforce-eager` to the launch command.","Or pass `--compilation-config.cudagraph_mode=none`.","Remove `--profiler proton` if CUDA graphs must stay enabled."],"exampleFix":"# before\nvllm serve model --profiler proton\n\n# after\nvllm serve model --profiler proton --enforce-eager","handlingStrategy":"validation","validationCode":"if profiler == \"proton\" and cudagraph_mode != \"none\":\n    cudagraph_mode = \"none\"  # or set enforce_eager=True before launch","typeGuard":null,"tryCatchPattern":"try:\n    LLM(profiler=ProfilerConfig(profiler=\"proton\"), ...)\nexcept ValueError as e:\n    if \"requires CUDA graphs to be disabled\" in str(e):\n        args.enforce_eager = True\n    else:\n        raise","preventionTips":["Profiling runs and throughput runs are separate profiles: profile with --enforce-eager","Pair proton with cudagraph_mode=none in profiling presets"],"tags":["profiling","proton","cuda-graphs","startup-config"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}