{"record":{"id":"40f64de4d27220c8","repo":"vllm-project/vllm","slug":"can-t-determine-cudagraph-shapes-that-are-both-a-m","errorCode":null,"errorMessage":"Can't determine cudagraph shapes that are both a multiple of {uniform_decode_query_len} (num_speculative_tokens + 1) required by spec-decode and {tensor_parallel_size} (tensor_parallel_size) required by sequence parallelism please adjust num_speculative_tokens or disable sequence parallelism","messagePattern":"Can't determine cudagraph shapes that are both a multiple of (.+?) \\(num_speculative_tokens \\+ 1\\) required by spec-decode and (.+?) \\(tensor_parallel_size\\) required by sequence parallelism please adjust num_speculative_tokens or disable sequence parallelism","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/compilation.py","lineNumber":1529,"sourceCode":"                \"proceed. Please lower max_num_seqs to at most \"\n                f\"{kv_cache_config.num_blocks} or increase \"\n                \"gpu_memory_utilization.\"\n            )\n\n        self.cudagraph_mode = cudagraph_mode\n        return cudagraph_mode\n\n    def adjust_cudagraph_sizes_for_spec_decode(\n        self, uniform_decode_query_len: int, tensor_parallel_size: int\n    ):\n        multiple_of = uniform_decode_query_len\n        if tensor_parallel_size > 1 and self.pass_config.enable_sp:\n            multiple_of = max(uniform_decode_query_len, tensor_parallel_size)\n            if (\n                multiple_of % uniform_decode_query_len != 0\n                or multiple_of % tensor_parallel_size != 0\n            ):\n                raise ValueError(\n                    f\"Can't determine cudagraph shapes that are both a \"\n                    f\"multiple of {uniform_decode_query_len} \"\n                    f\"(num_speculative_tokens + 1) required by spec-decode \"\n                    f\"and {tensor_parallel_size} (tensor_parallel_size) \"\n                    f\"required by sequence parallelism please adjust \"\n                    f\"num_speculative_tokens or disable sequence parallelism\"\n                )\n\n        if not self.cudagraph_capture_sizes or multiple_of <= 1:\n            return\n\n        assert self.max_cudagraph_capture_size is not None\n        rounded_sizes = sorted(\n            set(\n                round_up(size, multiple_of)\n                for size in self.cudagraph_capture_sizes\n                if round_up(size, multiple_of) <= self.max_cudagraph_capture_size\n            )","sourceCodeStart":1511,"sourceCodeEnd":1547,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/compilation.py#L1511-L1547","documentation":"Error \"Can't determine cudagraph shapes that are both a multiple of {uniform_decode_query_len} (num_speculative_tokens + 1) required by spec-decode and {tensor_parallel_size} (tensor_parallel_size) required by sequence parallelism please adjust num_speculative_tokens or disable sequence parallelism\" thrown in vllm-project/vllm.","triggerScenarios":"Raised at vllm/config/compilation.py:1529 when validation fails: Can't determine cudagraph shapes compatible with spec-decode and sequence parallelism. Typically triggered by an incompatible or incomplete vLLM configuration, an unsupported platform/backend combination, or a runtime resource/dependency that is missing.","commonSituations":"Commonly encountered at vllm/config/compilation.py:1529 during vLLM startup/config validation or runtime setup when: (1) conflicting CLI flags or config fields are combined, (2) the current platform (CUDA/ROCm/CPU/XPU) or installed optional packages do not support the requested feature, or (3) a required value is absent or out of range. Resolve by correcting the configuration as described in the message, or by selecting a supported alternative.","solutions":["Adjust num_speculative_tokens so that (num_speculative_tokens + 1) and tensor_parallel_size share compatible multiples.","Or disable sequence parallelism."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}