Skip to content

Commit 554cb60

Browse files
authored
ROCm mxfp4 Skips (#2209)
Add skip_if_rocm decorator to test_inference_subclass in test_mx_linear.py This change introduces the skip_if_rocm decorator to the test_inference_subclass function, ensuring that the test is skipped on ROCm platforms due to the requirement for gfx950. This enhances the robustness of the test suite by preventing unnecessary failures on unsupported hardware.
1 parent 4300079 commit 554cb60

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/prototype/mx_formats/test_mx_linear.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from torchao.prototype.mx_formats.mx_subclass import MXFPInferenceConfig
2929
from torchao.quantization import quantize_
3030
from torchao.quantization.utils import compute_error
31+
from torchao.testing.utils import skip_if_rocm
3132
from torchao.utils import (
3233
TORCH_VERSION_AT_LEAST_2_8,
3334
is_sm_at_least_89,
@@ -400,6 +401,9 @@ def test_inference_print_str():
400401
@pytest.mark.parametrize("bias", [True, False])
401402
@pytest.mark.parametrize("compile", [True, False])
402403
@torch.no_grad()
404+
@skip_if_rocm(
405+
"ROCm float4 gemm require gfx950"
406+
) # TODO(future): deploy gfx950 in ROCM CI
403407
def test_inference_subclass(elem_dtype, bias: bool, compile: bool):
404408
"""
405409
Smoke test for inference compile

0 commit comments

Comments
 (0)