[Attention] Integrate FlashAttention 4 SM100 headdim 256 support - #42669
Merged
Conversation
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Flash Attention 4 (FA4) compatibility logic for Blackwell GPUs to reflect current TMEM capacity limits, specifically allowing head sizes of 256 and the asymmetric MLA configuration (192/128). Feedback was provided to improve the readability of the conditional logic by grouping the supported head size exceptions into a single clause.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
|
Any updates / plans for integrations? |
MatthewBonanni
marked this pull request as ready for review
July 22, 2026 16:25
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
Contributor
|
Documentation preview: https://vllm--42669.org.readthedocs.build/en/42669/ |
NickLucche
approved these changes
Jul 24, 2026
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
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.
Purpose
FA4 added support for headdim 256 in Dao-AILab/flash-attention#2412 (and optimized it in Dao-AILab/flash-attention#2487 and Dao-AILab/flash-attention#2488). This support was integrated into vLLM with #41052. This PR is a follow-up to activate the headdim 256 support.
Note
This kernel is currently slower than
TRTLLM_RAGGED. Regardless, right now on main, FA is selected and then downgrades to FA2, so this PR additionally updates the routing toTRTLLM_RAGGEDfor these dimensions.Note
This kernel only supports
block_size = tile_n = 128at this head size, which precludes its use for mamba models like Gemma 3.Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.