[ROCm][CI] skip the ROCm MRV1 default where MRV1 cannot serve the config (#58535)

Signed-off-by: Stefan Koncarevic <Stefan.Koncarevic@amd.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
stefankoncarevic
2026-09-24 15:36:36 -05:00
committed by GitHub
co-authored by Andreas Karatzas
parent 0908116dd9
commit e33de821c0
5 changed files with 91 additions and 2 deletions
+1
View File
@@ -307,6 +307,7 @@ steps:
- csrc/
- tests/evals/gsm8k/configs/Kimi-K3-pruned75-DSpark-AITER-TP4.yaml
- tests/evals/gsm8k/configs/DeepSeek-V4-Flash-DSpark-AITER-TEP4.yaml
- tests/evals/gsm8k/configs/DeepSeek-V4-Flash-DSpark-FP8-TP4-ROCm.yaml
- tests/evals/gsm8k/configs/models-spec-decode-rocm.txt
- tests/evals/gsm8k/test_gsm8k_correctness.py
- tests/evals/gsm8k/gsm8k_eval.py
@@ -0,0 +1,28 @@
model_name: "deepseek-ai/DeepSeek-V4-Flash-DSpark"
accuracy_threshold: 0.92
tolerance: 0.08
min_acceptance_length: 1.2
num_questions: 1319
num_fewshot: 5
startup_max_wait_seconds: 1800
env:
VLLM_ROCM_USE_AITER: "1"
server_args: >-
--tokenizer-mode deepseek_v4
--trust-remote-code
--max-model-len 8192
--tensor-parallel-size 4
--enable-expert-parallel
--all2all-backend allgather_reducescatter
--block-size 256
--gpu-memory-utilization 0.5
--kv-cache-dtype fp8
--attention_config.indexer_kv_dtype=fp8
--max-num-batched-tokens 16384
--max-num-seqs 128
--enforce-eager
--speculative-config '{"method":"dspark",
"model":"deepseek-ai/DeepSeek-V4-Flash-DSpark",
"num_speculative_tokens":7,
"draft_sample_method":"probabilistic",
"enable_adaptive_verification":false}'
@@ -1,2 +1,3 @@
Kimi-K3-pruned75-DSpark-AITER-TP4.yaml
DeepSeek-V4-Flash-DSpark-AITER-TEP4.yaml
DeepSeek-V4-Flash-DSpark-FP8-TP4-ROCm.yaml
+47
View File
@@ -550,11 +550,58 @@ def test_rocm_keeps_compiled_deepseek_defaults(monkeypatch):
model_config=SimpleNamespace(architectures=["DeepseekV32ForCausalLM"]),
attention_config=AttentionConfig(),
)
config._get_v1_model_runner_unsupported_features = lambda: []
assert VllmConfig.use_v2_model_runner.fget(config) is False
finally:
default_breakable_cudagraph_architectures.cache_clear()
def test_rocm_mrv1_default_yields_to_v1_unsupported_config(monkeypatch):
"""The ROCm V1 default is a speed preference, not a capability claim.
DSpark runs only on V2, so pinning DeepSeek V4 to V1 would fail config
validation instead of serving it. With nothing V1 refuses, it still holds.
"""
from vllm.platforms import current_platform
monkeypatch.setattr(current_platform, "is_rocm", lambda: True)
monkeypatch.setattr(vllm_config_module, "HAS_TRITON", True)
monkeypatch.delenv("VLLM_USE_V2_MODEL_RUNNER", raising=False)
config = SimpleNamespace(
model_config=SimpleNamespace(
architectures=["DeepseekV4ForCausalLM"], is_diffusion=False
),
attention_config=AttentionConfig(),
parallel_config=SimpleNamespace(
prefill_context_parallel_size=1,
pipeline_parallel_size=1,
enable_batch_sharded_sampling=False,
),
scheduler_config=SimpleNamespace(async_scheduling=False),
speculative_config=None,
)
config._dflash_needs_multi_kv_group = lambda: False
config._is_dflash2_draft = lambda: False
config._get_v2_model_runner_unsupported_features = lambda: []
# The real predicate, so the test also pins where dspark lands in it.
config._get_v1_model_runner_unsupported_features = lambda: (
VllmConfig._get_v1_model_runner_unsupported_features(config)
)
assert VllmConfig.use_v2_model_runner.fget(config) is False
config.speculative_config = SimpleNamespace(
method="dspark", enable_adaptive_verification=False
)
assert VllmConfig.use_v2_model_runner.fget(config) is True
# Yielding is not the same as selecting V2: the later checks still run, so
# a config neither runner can serve lands on V1 and fails validation there.
config._get_v2_model_runner_unsupported_features = lambda: ["sequence parallelism"]
assert VllmConfig.use_v2_model_runner.fget(config) is False
@pytest.mark.parametrize(
("model", "architecture"),
[
+14 -2
View File
@@ -722,11 +722,23 @@ class VllmConfig:
if model_config is not None and current_platform.is_rocm():
architectures = getattr(model_config, "architectures", ())
if any(arch in ROCM_DEFAULT_MRV1_ARCHITECTURES for arch in architectures):
# This default is a speed preference, not a claim that V1 can
# serve the config, so it yields where V1 cannot. It yields by
# falling through to the checks below, not by selecting V2.
v1_unsupported = self._get_v1_model_runner_unsupported_features()
if not v1_unsupported:
logger.warning_once(
"Defaulting to V1 model runner on ROCm for model "
"architectures: %s",
", ".join(architectures),
)
return False
logger.warning_once(
"Defaulting to V1 model runner on ROCm for model architectures: %s",
"Skipping the ROCm V1 model runner default for %s: V1 does "
"not support %s.",
", ".join(architectures),
", ".join(v1_unsupported),
)
return False
if not HAS_TRITON:
logger.warning_once(