[Bugfix] Guard DeepSeek V4 MRV1 piecewise CUDA graphs (#51768)

Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Woosuk Kwon
2026-08-11 07:34:44 -07:00
committed by GitHub
co-authored by OpenAI Codex
parent dd7cc85f17
commit 87668ab69b
2 changed files with 73 additions and 0 deletions
+26
View File
@@ -66,9 +66,14 @@ else:
logger = init_logger(__name__)
MRV1_UNSUPPORTED_PIECEWISE_CUDAGRAPH_ARCHITECTURES = frozenset(
{"DeepseekV4ForCausalLM"}
)
DEFAULT_V2_MODEL_RUNNER_ARCHITECTURES = frozenset(
{
"DeepseekV2ForCausalLM",
"DeepseekV4ForCausalLM",
"GraniteMoeForCausalLM",
"InklingForCausalLM",
"InklingForConditionalGeneration",
@@ -702,6 +707,25 @@ class VllmConfig:
return False
return is_default_v2_architecture or not model_config.is_moe
def _validate_mrv1_piecewise_cudagraph(self) -> None:
if self.use_v2_model_runner:
return
model_config = self.model_config
if model_config is None:
return
if not self.compilation_config.cudagraph_mode.has_piecewise_cudagraphs():
return
architectures = getattr(model_config, "architectures", [])
if any(
arch in MRV1_UNSUPPORTED_PIECEWISE_CUDAGRAPH_ARCHITECTURES
for arch in architectures
):
raise ValueError(
"DeepSeek V4 does not support PIECEWISE CUDA graphs with "
"Model Runner V1. Use Model Runner V2 or disable PIECEWISE "
"CUDA graphs."
)
@property
def needs_dp_coordinator(self) -> bool:
"""
@@ -1589,6 +1613,8 @@ class VllmConfig:
"pipeline parallelism",
)
self._validate_mrv1_piecewise_cudagraph()
# final check of cudagraph mode after all possible updates
if current_platform.is_cuda_alike():
if (