A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 11:00 UTC
[ROCm] Skip tests for quantizations incompatible with ROCm (#17905)
Signed-off-by: Hissu Hyvarinen <hissu.hyvarinen@amd.com>
hissu-hyvarinen committed
May 13, 2025 at 03:39 UTC
f6518b2b487724b3aa20c8b8224faba5622c4e44
4 files changed
+20
-3
tests/models/quantization/test_aqlm.py
+4
-1
@@ -2,6 +2,7 @@
2
import pytest
3
4
from tests.quantization.utils import is_quant_method_supported
5
+from vllm.platforms import current_platform
6
7
# These ground truth generations were generated using `transformers==4.38.1
8
# aqlm==1.1.0 torch==2.2.0`
@@ -34,7 +35,9 @@ ground_truth_generations = [
35
]
36
37
37
-@pytest.mark.skipif(not is_quant_method_supported("aqlm"),
38
+@pytest.mark.skipif(not is_quant_method_supported("aqlm")
39
+ or current_platform.is_rocm()
40
+ or not current_platform.is_cuda(),
41
reason="AQLM is not supported on this GPU type.")
42
@pytest.mark.parametrize("model", ["ISTA-DASLab/Llama-2-7b-AQLM-2Bit-1x16-hf"])
43
@pytest.mark.parametrize("dtype", ["half"])
tests/models/quantization/test_fp8.py
+8
@@ -55,6 +55,14 @@ def test_models(
55
Only checks log probs match to cover the discrepancy in
56
numerical sensitive kernels.
57
"""
58
+
59
+ if backend == "FLASHINFER" and current_platform.is_rocm():
60
+ pytest.skip("Flashinfer does not support ROCm/HIP.")
61
+
62
+ if kv_cache_dtype == "fp8_e5m2" and current_platform.is_rocm():
63
+ pytest.skip(
64
+ f"{kv_cache_dtype} is currently not supported on ROCm/HIP.")
65
+
66
with monkeypatch.context() as m:
67
m.setenv("TOKENIZERS_PARALLELISM", 'true')
68
m.setenv(STR_BACKEND_ENV_VAR, backend)
tests/models/quantization/test_gptq_marlin.py
+4
-1
@@ -14,6 +14,7 @@ import pytest
14
15
from tests.quantization.utils import is_quant_method_supported
16
from vllm.model_executor.layers.rotary_embedding import _ROPE_DICT
17
+from vllm.platforms import current_platform
18
19
from ..utils import check_logprobs_close
20
@@ -34,7 +35,9 @@ MODELS = [
35
36
37
@pytest.mark.flaky(reruns=3)
37
-@pytest.mark.skipif(not is_quant_method_supported("gptq_marlin"),
38
+@pytest.mark.skipif(not is_quant_method_supported("gptq_marlin")
39
+ or current_platform.is_rocm()
40
+ or not current_platform.is_cuda(),
41
reason="gptq_marlin is not supported on this GPU type.")
42
@pytest.mark.parametrize("model", MODELS)
43
@pytest.mark.parametrize("dtype", ["half", "bfloat16"])
tests/models/quantization/test_gptq_marlin_24.py
+4
-1
@@ -10,6 +10,7 @@ from dataclasses import dataclass
10
import pytest
11
12
from tests.quantization.utils import is_quant_method_supported
13
+from vllm.platforms import current_platform
14
15
from ..utils import check_logprobs_close
16
@@ -38,7 +39,9 @@ model_pairs = [
39
40
41
@pytest.mark.flaky(reruns=2)
41
-@pytest.mark.skipif(not is_quant_method_supported("gptq_marlin_24"),
42
+@pytest.mark.skipif(not is_quant_method_supported("gptq_marlin_24")
43
+ or current_platform.is_rocm()
44
+ or not current_platform.is_cuda(),
45
reason="Marlin24 is not supported on this GPU type.")
46
@pytest.mark.parametrize("model_pair", model_pairs)
47
@pytest.mark.parametrize("dtype", ["half"])