From b3c14229b032a8bbf93d450a52c9a404ddaea429 Mon Sep 17 00:00:00 2001 From: Andreas Karatzas Date: Sat, 14 Feb 2026 09:32:09 -0600 Subject: [PATCH] [ROCm][CI] Guard sparse MLA backend imports for ROCm compatibility in tests (#34538) Signed-off-by: Andreas Karatzas --- tests/v1/attention/test_sparse_mla_backends.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/v1/attention/test_sparse_mla_backends.py b/tests/v1/attention/test_sparse_mla_backends.py index fe9ca8289..86cefa036 100644 --- a/tests/v1/attention/test_sparse_mla_backends.py +++ b/tests/v1/attention/test_sparse_mla_backends.py @@ -23,6 +23,17 @@ from vllm import _custom_ops as ops from vllm.config import set_current_vllm_config from vllm.model_executor.layers.linear import ColumnParallelLinear from vllm.platforms import current_platform + +# TODO: Integrate ROCMAiterMLASparseBackend for ROCm. +# The ROCm sparse MLA backend (rocm_aiter_mla_sparse.py) has a compatible +# forward_mqa interface but needs validation on ROCm hardware. +if not current_platform.is_cuda(): + pytest.skip( + "Sparse MLA backend tests currently only support CUDA. " + "ROCm support requires integrating ROCMAiterMLASparseBackend.", + allow_module_level=True, + ) + from vllm.utils.math_utils import cdiv from vllm.v1.attention.backends.mla.flashinfer_mla_sparse import ( FlashInferMLASparseBackend,