[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:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
84586c9acc
commit
fd50a66015
@@ -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]
|
||||
|
||||
@@ -25,6 +25,7 @@ from vllm.model_executor.layers.vocab_parallel_embedding import (
|
||||
ParallelLMHead,
|
||||
VocabParallelEmbedding,
|
||||
)
|
||||
from vllm.platforms import current_platform
|
||||
|
||||
|
||||
@pytest.fixture(scope="function", autouse=True)
|
||||
@@ -467,6 +468,12 @@ def test_modelopt_mixed_precision_dispatches_w4a16_layer(
|
||||
from vllm.model_executor.layers.linear import LinearBase
|
||||
from vllm.model_executor.layers.quantization import modelopt as m
|
||||
|
||||
if (
|
||||
expected_linear_cls_name == "ModelOptNvFp4W4A16LinearMethod"
|
||||
and current_platform.is_rocm()
|
||||
):
|
||||
pytest.skip("ModelOptNvFp4W4A16LinearMethod is not supported with rocm")
|
||||
|
||||
hf_quant_config: dict[str, Any] = {
|
||||
"quantization": {
|
||||
"quant_algo": "MIXED_PRECISION",
|
||||
|
||||
Reference in New Issue
Block a user