[CI][ROCm] Skip unsupported test cases on ROCm (#46160)

Signed-off-by: Felix Marty <Felix.Marty@amd.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
fxmarty-amd
2026-06-23 11:35:49 -05:00
committed by GitHub
co-authored by mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 84586c9acc
commit fd50a66015
2 changed files with 34 additions and 2 deletions
+27 -2
View File
@@ -5,6 +5,7 @@
Run `pytest tests/quantization/test_compressed_tensors.py`.
"""
from contextlib import contextmanager
from unittest.mock import Mock
import pytest
@@ -370,6 +371,27 @@ def test_compressed_tensors_kv_cache_fp8_per_attn_head(vllm_runner):
assert output
@contextmanager
def _nvfp4_marlin_error_context(model, capfd):
is_rocm_and_unsupported = (
model == "nm-testing/TinyLlama-1.1B-Chat-v1.0-NVFP4A16"
and current_platform.is_rocm()
)
if is_rocm_and_unsupported:
expected_error = (
"ValueError: Forced NVFP4 kernel MarlinNvFp4LinearKernel is not "
"supported: Marlin FP4 not available"
)
with pytest.raises(RuntimeError, match="Engine core initialization failed"):
yield
captured = capfd.readouterr()
assert expected_error in captured.out + captured.err
else:
yield
@pytest.mark.parametrize(
"args",
[
@@ -377,9 +399,12 @@ def test_compressed_tensors_kv_cache_fp8_per_attn_head(vllm_runner):
("nm-testing/TinyLlama-1.1B-Chat-v1.0-NVFP4", False),
],
)
def test_compressed_tensors_nvfp4(vllm_runner, args):
def test_compressed_tensors_nvfp4(vllm_runner, args, capfd):
model, use_a16 = args
with vllm_runner(model, enforce_eager=True) as llm:
with (
_nvfp4_marlin_error_context(model, capfd),
vllm_runner(model, enforce_eager=True) as llm,
):
def check_model(model):
layer = model.model.layers[0]