[ROCm][CI] fix flashinfer import check (#48647)

Signed-off-by: Divakar Verma <divakar.verma@amd.com>

Divakar Verma committed Jul 14, 2026 at 16:54 UTC 05d4f8bba3aac85814c3fc42cfc60bef21bb2bb4
1 file changed +6 -4
tests/v1/attention/test_flashinfer_dcp_spec_reorder.py
+6 -4
@@ -3,11 +3,16 @@
3 """FlashInfer GQA builder: reorder threshold under DCP with spec decode."""
4
5 import pytest
6 +
7 +from vllm.platforms import current_platform
8 +
9 +if not current_platform.is_cuda():
10 + pytest.skip("FlashInfer backend requires a CUDA platform.", allow_module_level=True)
11 +
12 import torch
13
14 from tests.v1.attention.utils import create_vllm_config
15 from vllm.config import SpeculativeConfig, set_current_vllm_config
10 -from vllm.platforms import current_platform
16 from vllm.v1.attention.backends import flashinfer as flashinfer_backend
17 from vllm.v1.attention.backends.flashinfer import (
18 FlashInferDecodeKernel,
@@ -16,9 +21,6 @@ from vllm.v1.attention.backends.flashinfer import (
21 from vllm.v1.attention.backends.utils import PerLayerParameters
22 from vllm.v1.kv_cache_interface import FullAttentionSpec
23
19 -if not current_platform.is_cuda():
20 - pytest.skip("FlashInfer backend requires a CUDA platform.", allow_module_level=True)
21 -
24
25 def test_flashinfer_gqa_dcp_spec_decode_clamps_reorder_threshold(monkeypatch):
26 """trtllm-gen decode receives no cp_rank/global-seq-len information, so its