From a48745df79191409ee33eb914d7c650bea9ebd43 Mon Sep 17 00:00:00 2001 From: Vinnie6167 Date: Wed, 29 Jul 2026 18:57:45 -0700 Subject: [PATCH] test: skip NVFP4-KV decode tests on SM107 No NVFP4-KV (E2m1) decode kernels exist for SM107; the library already raises ValueError("KV Cache NVFP4 is not supported on SM107") for this configuration, so exercise the tests only where the kernels exist. The skip mirrors that guard and covers all nvfp4 entry points in the file. --- tests/attention/test_batch_decode_kernels.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/attention/test_batch_decode_kernels.py b/tests/attention/test_batch_decode_kernels.py index a6791e49b78..62dc01b701f 100644 --- a/tests/attention/test_batch_decode_kernels.py +++ b/tests/attention/test_batch_decode_kernels.py @@ -53,6 +53,13 @@ def skip_if_nvfp4_large_head_decode_unsupported(head_dim: int): ) +def skip_if_nvfp4_kv_unsupported(): + # Mirrors the guard in flashinfer.decode/prefill: no NVFP4-KV decode + # kernels exist for SM107. + if get_compute_capability(torch.device("cuda:0")) == (10, 7): + pytest.skip("KV Cache NVFP4 is not supported on SM107") + + @pytest.fixture( autouse=not has_flashinfer_jit_cache(), scope="module", @@ -734,6 +741,7 @@ def test_batch_decode_with_paged_kv_cache_nvfp4( Reference is computed by dequantizing the packed KV back to q_dtype and running single_decode_with_kv_cache per batch item. """ + skip_if_nvfp4_kv_unsupported() kv_layout = "NHD" torch.manual_seed(42)