[ROCm][CI] Skip three torchao tests of gfx950 until `torchao==0.18` is released (#49732)

Signed-off-by: Felix Marty <Felix.Marty@amd.com> Co-authored-by: Felix Marty <Felix.Marty@amd.com> Co-authored-by: Claude <noreply@anthropic.com>

fxmarty committed Jul 27, 2026 at 11:36 UTC bc3629b1c4760f7260d41a67e38ff460edbe22d7
1 file changed +25
tests/quantization/test_torchao.py
+25
@@ -1,17 +1,30 @@
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3 +import importlib.metadata
4 import importlib.util
5
6 import pytest
7 import torch
8 +from packaging import version
9
10 from vllm.model_executor.model_loader import get_model_loader
11 from vllm.platforms import current_platform
12
13 +if current_platform.is_rocm():
14 + from vllm.platforms.rocm import on_gfx950
15 +else:
16 +
17 + def on_gfx950() -> bool:
18 + return False
19 +
20 +
21 DEVICE_TYPE = current_platform.device_type
22 DTYPE = ["bfloat16"]
23
24 TORCHAO_AVAILABLE = importlib.util.find_spec("torchao") is not None
25 +TORCHAO_VERSION_0_18_AVAILABLE = TORCHAO_AVAILABLE and version.parse(
26 + importlib.metadata.version("torchao")
27 +) >= version.parse("0.18.0")
28
29
30 @pytest.mark.skipif(
@@ -90,6 +103,10 @@ def test_opt_125m_awq_int4wo_model_loading_with_params(vllm_runner):
103
104
105 @pytest.mark.skipif(not TORCHAO_AVAILABLE, reason="torchao is not available")
106 +@pytest.mark.skipif(
107 + on_gfx950() and not TORCHAO_VERSION_0_18_AVAILABLE,
108 + reason="requires torchao>=0.18.0 on gfx950",
109 +)
110 def test_online_quant_config_dict_json(vllm_runner, enable_pickle):
111 """Testing online quantization, load_weights integration point,
112 with config dict serialized to json string
@@ -135,6 +152,10 @@ def test_online_quant_config_dict_json(vllm_runner, enable_pickle):
152
153
154 @pytest.mark.skipif(not TORCHAO_AVAILABLE, reason="torchao is not available")
155 +@pytest.mark.skipif(
156 + on_gfx950() and not TORCHAO_VERSION_0_18_AVAILABLE,
157 + reason="requires torchao>=0.18.0 on gfx950",
158 +)
159 def test_online_quant_config_file(vllm_runner):
160 """Testing on the fly quantization, load_weights integration point,
161 with config file
@@ -170,6 +191,10 @@ def test_online_quant_config_file(vllm_runner):
191
192
193 @pytest.mark.skipif(not TORCHAO_AVAILABLE, reason="torchao is not available")
194 +@pytest.mark.skipif(
195 + on_gfx950() and not TORCHAO_VERSION_0_18_AVAILABLE,
196 + reason="requires torchao>=0.18.0 on gfx950",
197 +)
198 def test_reload_weights():
199 import json
200