diff --git a/tests/test_config.py b/tests/test_config.py index 79d02bc8c364..e0b2cda302a8 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1110,9 +1110,9 @@ def test_no_hisparse_connector_keeps_attention_config_unset(monkeypatch): assert config.attention_config.hisparse_config is None -def test_rocm_keeps_compiled_deepseek_defaults(monkeypatch): - """ROCm keeps the DSA models (DeepSeek V3.2/V4, GLM-5.2) on their compiled - paths and off breakable cudagraphs by default.""" +def test_rocm_breakable_cudagraph_architecture_defaults(monkeypatch): + """ROCm enables breakable cudagraphs for supported DSA architectures + while keeping DeepseekV32ForCausalLM excluded by default.""" from vllm.config.vllm import default_breakable_cudagraph_architectures from vllm.platforms import current_platform @@ -1122,8 +1122,8 @@ def test_rocm_keeps_compiled_deepseek_defaults(monkeypatch): try: breakable_architectures = default_breakable_cudagraph_architectures() assert "DeepseekV32ForCausalLM" not in breakable_architectures - assert "DeepseekV32MTPModel" not in breakable_architectures - assert "GlmMoeDsaForCausalLM" not in breakable_architectures + assert "DeepseekV32MTPModel" in breakable_architectures + assert "GlmMoeDsaForCausalLM" in breakable_architectures # V4.1 cannot torch.compile and the ROCm sparse SWA backend only # supports uniform-batch CUDA graphs, so it must opt in or the # default FULL_AND_PIECEWISE serve path cannot start. @@ -1192,9 +1192,9 @@ def test_dsa_models_default_to_breakable_cudagraph( ("DeepseekV32ForCausalLM", False, True), ("DeepseekV32ForCausalLM", True, False), ("DeepseekV32MTPModel", False, True), - ("DeepseekV32MTPModel", True, False), + ("DeepseekV32MTPModel", True, True), ("GlmMoeDsaForCausalLM", False, True), - ("GlmMoeDsaForCausalLM", True, False), + ("GlmMoeDsaForCausalLM", True, True), ("Qwen4ExpForCausalLM", False, True), ("Qwen4ExpForCausalLM", True, False), ("Qwen4ExpForConditionalGeneration", False, True), diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index 724c30829094..0a82e2a53ff3 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -156,6 +156,7 @@ def default_breakable_cudagraph_architectures() -> frozenset[str]: # HYV4 also runs without torch.compile, preserving runtime-shape # kernel selection during graph capture. # Qwen3.5 runs the eager vllm/models/qwen3_5/amd model. + # GLM DSA benefits from breakable CUDA graphs on ROCm. return ( frozenset( { @@ -163,6 +164,8 @@ def default_breakable_cudagraph_architectures() -> frozenset[str]: "HYV4ForCausalLM", "HYV4VLForConditionalGeneration", "HYV4MTPModel", + "GlmMoeDsaForCausalLM", + "DeepseekV32MTPModel", } ) | _QWEN3_5_ARCHITECTURES