mirror of
https://github.com/Dao-AILab/flash-attention.git
synced 2026-10-12 02:01:54 +00:00
The MLA forward kernels take nheads_kv as a compile-time parameter, but the forward compile key only recorded the per-KV-head query count. Shapes with equal GQA ratios and different KV head counts, such as 128/2 and 64/1, reused one kernel specialized for the wrong packed layout and scheduler head count: reusing a kernel built for fewer KV heads never writes the extra head, and the reverse launches a phantom head whose rows alias the next token. stack-info: PR: https://github.com/Dao-AILab/flash-attention/pull/2978, branch: drisspg/stack/78