Files
vllm/tests
Roger WangandClaude afcf797f6e [Attention][TokenSpeed MLA] Fix FLASHINFER MLA prefill test failures
The new parametrization of test_mla_backends.py over MLAPrefillBackendEnum
exercised FLASHINFER MLA prefill for the first time, exposing two test-only
issues. Both are fixed entirely in the test:

1. MockMLAAttentionLayer now subclasses MLAAttention (skipping
   MLAAttention.__init__ to avoid its self-registration side effects).
   FlashInferPrefillBackend._resolve_global_hyperparameters filters
   static_forward_context by isinstance(layer, MLAAttention); the mock
   previously only inherited from AttentionLayerBase, so the filter found
   zero layers and infer_global_hyperparameters asserted.

2. run_attention_backend now passes 1/sqrt(qk_head_dim) (the prefill scale)
   to impl_cls, matching production where impl.scale and prefill backend
   scale are the same. The decode SDPA reference uses prefill_scale too.
   Without this, FlashInfer would plan with the wrong sm_scale (read back
   from impl.scale via global_hyperparameters) and prefill numerics would
   drift past the rtol=1e-2, atol=5e-1 tolerance.

Verified locally on B300: all 144 previously-failing FLASHINFER cases pass
(144 passed in 387s).

Co-authored-by: Claude

Signed-off-by: Roger Wang <hey@rogerw.io>
2026-05-12 05:29:54 +00:00
..
2026-05-10 07:55:57 +00:00
2026-03-25 10:22:54 -07:00