From 05d4f8bba3aac85814c3fc42cfc60bef21bb2bb4 Mon Sep 17 00:00:00 2001 From: Divakar Verma <137818590+divakar-amd@users.noreply.github.com> Date: Tue, 14 Jul 2026 16:54:19 -0400 Subject: [PATCH] [ROCm][CI] fix flashinfer import check (#48647) Signed-off-by: Divakar Verma --- tests/v1/attention/test_flashinfer_dcp_spec_reorder.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/v1/attention/test_flashinfer_dcp_spec_reorder.py b/tests/v1/attention/test_flashinfer_dcp_spec_reorder.py index cfdbc9211ce..868d59247af 100644 --- a/tests/v1/attention/test_flashinfer_dcp_spec_reorder.py +++ b/tests/v1/attention/test_flashinfer_dcp_spec_reorder.py @@ -3,11 +3,16 @@ """FlashInfer GQA builder: reorder threshold under DCP with spec decode.""" import pytest + +from vllm.platforms import current_platform + +if not current_platform.is_cuda(): + pytest.skip("FlashInfer backend requires a CUDA platform.", allow_module_level=True) + import torch from tests.v1.attention.utils import create_vllm_config from vllm.config import SpeculativeConfig, set_current_vllm_config -from vllm.platforms import current_platform from vllm.v1.attention.backends import flashinfer as flashinfer_backend from vllm.v1.attention.backends.flashinfer import ( FlashInferDecodeKernel, @@ -16,9 +21,6 @@ from vllm.v1.attention.backends.flashinfer import ( from vllm.v1.attention.backends.utils import PerLayerParameters from vllm.v1.kv_cache_interface import FullAttentionSpec -if not current_platform.is_cuda(): - pytest.skip("FlashInfer backend requires a CUDA platform.", allow_module_level=True) - def test_flashinfer_gqa_dcp_spec_decode_clamps_reorder_threshold(monkeypatch): """trtllm-gen decode receives no cp_rank/global-seq-len information, so its