[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>
This commit is contained in:
Tommy Asai
2026-08-17 16:58:02 -07:00
committed by GitHub
co-authored by Roger Wang
parent c296cf8259
commit 58aa1e3d26
2 changed files with 8 additions and 0 deletions
@@ -34,6 +34,13 @@ def test_sm120_backend_uses_dedicated_backend_name() -> None:
)
def test_sm120_backend_uses_sparse_mqa_for_prefill() -> None:
impl_cls = FlashInferMLASparseSM120Backend.get_impl_cls()
assert impl_cls.is_sparse
assert not impl_cls.supports_dense_mha_prefill
def test_v32_glm_sm120_backend_accepts_glm_block_size(
monkeypatch,
) -> None:
@@ -33,6 +33,7 @@ class FlashInferMLASparseSM120Impl(MLAAttentionImpl[FlashInferMLASparseMetadata]
"""SM120 FlashInfer sparse-MLA implementation."""
is_sparse = True
supports_dense_mha_prefill = False
def __init__(
self,