[Bugfix][SM120][MLA] Disable dense prefill for FlashInfer sparse MLA (#51395)
Signed-off-by: tommy-asai-sonarsource <yosuke.asai@sonarsource.com> Co-authored-by: Roger Wang <hey@rogerw.io>
Tommy Asai committed
Aug 18, 2026 at 01:58 UTC
58aa1e3d2692250c6bb24a0f852e3cb8e809a14f
2 files changed
+8
tests/v1/attention/test_flashinfer_sparse_mla_sm120_api.py
+7
@@ -34,6 +34,13 @@ def test_sm120_backend_uses_dedicated_backend_name() -> None:
34
)
35
36
37
+def test_sm120_backend_uses_sparse_mqa_for_prefill() -> None:
38
+ impl_cls = FlashInferMLASparseSM120Backend.get_impl_cls()
39
+
40
+ assert impl_cls.is_sparse
41
+ assert not impl_cls.supports_dense_mha_prefill
42
+
43
+
44
def test_v32_glm_sm120_backend_accepts_glm_block_size(
45
monkeypatch,
46
) -> None:
vllm/v1/attention/backends/mla/flashinfer_mla_sparse_sm120.py
+1
@@ -33,6 +33,7 @@ class FlashInferMLASparseSM120Impl(MLAAttentionImpl[FlashInferMLASparseMetadata]
33
"""SM120 FlashInfer sparse-MLA implementation."""
34
35
is_sparse = True
36
+ supports_dense_mha_prefill = False
37
38
def __init__(
39
self,