From 88402a41c4ab272ebbbd33f4a77fbbac0431cbb9 Mon Sep 17 00:00:00 2001 From: Liangliang Ma Date: Tue, 28 Jul 2026 16:26:49 +0800 Subject: [PATCH] [Test] Skip ROCm AITER MLA prefill tests on non-ROCm platforms (#49945) Signed-off-by: Liangliang-Ma Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- tests/v1/attention/test_mla_prefill_selector.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/v1/attention/test_mla_prefill_selector.py b/tests/v1/attention/test_mla_prefill_selector.py index f5985e7bc8e..e6d9f939ea5 100644 --- a/tests/v1/attention/test_mla_prefill_selector.py +++ b/tests/v1/attention/test_mla_prefill_selector.py @@ -8,6 +8,7 @@ import pytest import torch from vllm.config import AttentionConfig, ModelConfig, VllmConfig +from vllm.platforms import current_platform from vllm.platforms.interface import DeviceCapability from vllm.v1.attention.backends.mla.prefill.base import MLADimensions from vllm.v1.attention.backends.mla.prefill.registry import MLAPrefillBackendEnum @@ -287,6 +288,11 @@ class TestBackendValidation: assert invalid_reasons == [] +@pytest.mark.skipif( + not current_platform.is_cuda_alike(), + reason="Imports vllm.platforms.rocm, whose module init requires a CUDA or " + "ROCm torch build; not importable on XPU/CPU/TPU.", +) class TestROCmAiterFAPrefillSelection: """Tests for the ROCm AITER FlashAttention MLA prefill backend."""