[Fwd,SM100,CuTe] Fix split KV OOM with diff headdim + fix SM100 kwarg mismatch#2338
Merged
tridao merged 1 commit intoDao-AILab:mainfrom Mar 12, 2026
Merged
Conversation
Member
|
I feel the right approach is to subtile the O inside the kernel so we can keep the same size of smem. But that's more annoying to impl so for now we can just decrease tile_n. |
tridao
approved these changes
Mar 12, 2026
5t4r1i9ht
pushed a commit
to 5t4r1i9ht/flash-attention
that referenced
this pull request
Mar 15, 2026
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
zhuochenKIDD
pushed a commit
to zhuochenKIDD/flash-attention
that referenced
this pull request
Mar 25, 2026
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
NJX-njx
pushed a commit
to NJX-njx/flash-attention
that referenced
this pull request
Mar 28, 2026
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using split KV with diff headdim (e.g. 192/128 for DeepSeek MLA prefill) exceeds SMEM due to float32 partial output doubling the O buffer size. This PR reduces tile size or disables splitting in that case, with a heuristic to ensure optimal performance.
Also fixes a bug introduced in 99d0148 where the SM100 constructor is called with
tile_m/tile_ninstead ofm_block_size/n_block_size, which would cause aTypeError.This change has been applied to vLLM's FA fork via vllm-project#123 and vllm-project#126 to enable using FA4 for MLA prefill in vLLM (vllm-project/vllm#34732). This PR applies the fix upstream.
Benchmarking performed using vLLM attention benchmark tool:
