[CI/Build][ROCm] Guard the two CUDA-only tests in test_bf16_skinny_gemm (#54984)

Signed-off-by: Stefan Koncarevic <Stefan.Koncarevic@amd.com>

stefankoncarevic committed Sep 2, 2026 at 20:21 UTC 3e9d364ff727f002680d242ea76e8a0bbdc0163c
1 file changed +9 -2
tests/kernels/test_bf16_skinny_gemm.py
+9 -2
@@ -18,6 +18,7 @@ from vllm.models.deepseek_v32.nvidia import glm52_low_latency_gemm as glm52_gemm
18 from vllm.models.kimi_k3.nvidia import low_latency_gemm as k3_gemm
19 from vllm.models.kimi_k3.nvidia.low_latency_gemm import KIMI_K3_PROJECTIONS
20 from vllm.models.qwen4_exp.nvidia import low_latency_gemm as qwen4_exp_gemm
21 +from vllm.platforms import current_platform
22
23 # Keyed by local (N, K): (cute token counts, dsv3 token counts). 1536x7168 is
24 # the unified shared_gate_up_proj/mla_g_proj entry (dsv3 M1..16).
@@ -284,7 +285,7 @@ def test_kda_projection_overlap_is_tp8_only(tp_size: int) -> None:
285 def test_kda_qkvg_autotune_enables_full_overlap(
286 monkeypatch: pytest.MonkeyPatch,
287 ) -> None:
287 - import flashinfer.gemm
288 + flashinfer_gemm = pytest.importorskip("flashinfer.gemm")
289
290 from vllm.models.kimi_k3.nvidia.kda import KimiK3DeltaAttention
291
@@ -302,7 +303,7 @@ def test_kda_qkvg_autotune_enables_full_overlap(
303 calls.append((a.shape, b.shape, pdl, backend))
304 return torch.empty(a.shape[0], b.shape[1], dtype=a.dtype)
305
305 - monkeypatch.setattr(flashinfer.gemm, "mm_bf16", fake_mm_bf16)
306 + monkeypatch.setattr(flashinfer_gemm, "mm_bf16", fake_mm_bf16)
307
308 k3_gemm.autotune_kda_qkvg(kda)
309
@@ -1216,6 +1217,12 @@ def test_residual_dispatch_falls_back_to_addmm(
1217 assert output is fallback
1218
1219
1220 +@pytest.mark.skipif(
1221 + not current_platform.is_cuda(),
1222 + reason="The base UnquantizedLinearMethod is platform-dispatched: on ROCm it "
1223 + "goes through the vllm::rocm_unquantized_gemm custom op, which has no CPU "
1224 + "kernel, so the CPU-tensor fallback cannot be exercised there.",
1225 +)
1226 def test_fallback_preserves_default_method() -> None:
1227 x = torch.randn(2, 4)
1228 weight = torch.randn(3, 4)