diff --git a/tests/v1/attention/test_flashinfer_sparse_mla_sm120_api.py b/tests/v1/attention/test_flashinfer_sparse_mla_sm120_api.py index 12a8cf5cbc..724c8874b9 100644 --- a/tests/v1/attention/test_flashinfer_sparse_mla_sm120_api.py +++ b/tests/v1/attention/test_flashinfer_sparse_mla_sm120_api.py @@ -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: diff --git a/vllm/v1/attention/backends/mla/flashinfer_mla_sparse_sm120.py b/vllm/v1/attention/backends/mla/flashinfer_mla_sparse_sm120.py index 9db696a39c..4de2c2f53f 100644 --- a/vllm/v1/attention/backends/mla/flashinfer_mla_sparse_sm120.py +++ b/vllm/v1/attention/backends/mla/flashinfer_mla_sparse_sm120.py @@ -33,6 +33,7 @@ class FlashInferMLASparseSM120Impl(MLAAttentionImpl[FlashInferMLASparseMetadata] """SM120 FlashInfer sparse-MLA implementation.""" is_sparse = True + supports_dense_mha_prefill = False def __init__( self,