From ce2e343be1f757a92b3c990023f87bdd87a579ac Mon Sep 17 00:00:00 2001 From: Rohan Potdar Date: Mon, 31 Aug 2026 23:17:54 -0500 Subject: [PATCH] [ROCm] Keep GLM-5.2 on MRV1 and disable default breakable cudagraph (#53155) Signed-off-by: Rohan Potdar Co-authored-by: Claude Opus 4.8 Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- tests/test_config.py | 7 +++++-- vllm/config/vllm.py | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index 4c27a6fe69..1a36b0ec92 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -159,7 +159,8 @@ def test_v2_model_runner_env_tri_state(monkeypatch, env_value, expected): def test_rocm_keeps_compiled_deepseek_defaults(monkeypatch): - """ROCm keeps DeepSeek V3.2 and V4 on their compiled MRV1 paths.""" + """ROCm keeps the DSA models (DeepSeek V3.2/V4, GLM-5.2) on their compiled + MRV1 paths and off breakable cudagraphs by default.""" from vllm.config.vllm import ( ROCM_DEFAULT_MRV1_ARCHITECTURES, default_breakable_cudagraph_architectures, @@ -172,10 +173,12 @@ def test_rocm_keeps_compiled_deepseek_defaults(monkeypatch): try: assert "DeepseekV32ForCausalLM" in ROCM_DEFAULT_MRV1_ARCHITECTURES assert "DeepseekV4ForCausalLM" in ROCM_DEFAULT_MRV1_ARCHITECTURES + assert "GlmMoeDsaForCausalLM" in ROCM_DEFAULT_MRV1_ARCHITECTURES breakable_architectures = default_breakable_cudagraph_architectures() assert "DeepseekV32ForCausalLM" not in breakable_architectures assert "DeepseekV32MTPModel" not in breakable_architectures + assert "GlmMoeDsaForCausalLM" not in breakable_architectures # The carve-out takes effect via the runner-selection property # (warning_once args must be hashable for its lru_cache). @@ -254,7 +257,7 @@ def test_dsa_models_default_to_mrv2_and_breakable_cudagraph( ("DeepseekV32MTPModel", False, True), ("DeepseekV32MTPModel", True, False), ("GlmMoeDsaForCausalLM", False, True), - ("GlmMoeDsaForCausalLM", True, True), + ("GlmMoeDsaForCausalLM", True, False), ], ) def test_dsa_breakable_cudagraph_platform_default( diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index aadaccc82d..033267baf6 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -69,7 +69,7 @@ logger = init_logger(__name__) # TODO(rocm): These models are either unsupported by MRV2 or slower with # MRV2 on AMD GPUs. ROCM_DEFAULT_MRV1_ARCHITECTURES = frozenset( - {"DeepseekV32ForCausalLM", "DeepseekV4ForCausalLM"} + {"DeepseekV32ForCausalLM", "DeepseekV4ForCausalLM", "GlmMoeDsaForCausalLM"} ) DEFAULT_BREAKABLE_CUDAGRAPH_ARCHITECTURES = frozenset( @@ -100,10 +100,10 @@ def default_breakable_cudagraph_architectures() -> frozenset[str]: from vllm.platforms import current_platform if current_platform.is_rocm(): - return DEFAULT_BREAKABLE_CUDAGRAPH_ARCHITECTURES - { - "DeepseekV32ForCausalLM", - "DeepseekV32MTPModel", - } + # Breakable CUDA graphs currently regress performance on ROCm, so no + # architecture opts in by default here. Users can still force it with + # VLLM_USE_BREAKABLE_CUDAGRAPH=1. + return frozenset() return DEFAULT_BREAKABLE_CUDAGRAPH_ARCHITECTURES