-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Kernel] Flash Attention 3 Support #12093
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
4ec9893
build fa3 from vllm
LucasWilkinson b320398
v0 update to seqused_k
LucasWilkinson a84cdda
add env var for controlling version
LucasWilkinson 71e5bec
update branch and python only build
LucasWilkinson a48a9ad
fix mypy error
LucasWilkinson 8d578cf
minor refactors
LucasWilkinson 234f6c1
codespell fix
LucasWilkinson 6d8e439
update git hash
LucasWilkinson 7f82709
update fa3
LucasWilkinson ef4283b
missing specify fa versions
LucasWilkinson 509e9d8
update fa3
LucasWilkinson 3410016
add assert
LucasWilkinson c5b6b4a
fix tests + softmax
LucasWilkinson 10b3cd2
fix building sm80 on H200
LucasWilkinson 2f9015e
disable fp8 for now
LucasWilkinson d577b10
fix building .cu files that are included by other .cu files
LucasWilkinson e8c2fe1
fix glob
LucasWilkinson ded7cb6
cut down fa3 binary size
LucasWilkinson 6ccb5b2
update vllm-flash-attn cmake
LucasWilkinson 0c16227
disable fa3 on 8.6 and 8.9
LucasWilkinson eafde62
disable fa build on AMD
LucasWilkinson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm: Lovelace GPUs will also use FA2 by default, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, the CI picked up some shapes that were failing because of not enough shared memory; FA3 doesn't seem to work for all shapes (8.9 can only be configured to have 100kb shared memory, A100 have 164kb, I had only tested locally on an A100). So that is something that will probably have to be resolved. For now though I just disabled testing FA3 on Lovelace and disabled support in the vlllm-flash -attn repo (https://github.com/vllm-project/flash-attention/blob/90eacc1af2a7c3de62ea249e929ed5faccf38954/vllm_flash_attn/flash_attn_interface.py#L34-L39)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Thanks for the explanation!
Do we know which shapes are not supported? Since FA3 could be very important for our performance, I'm wondering if we could enable it for Lovelace and Ampere GPUs at least for the supported shapes (in a future PR).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LucasWilkinson A small concern on this is that most of our CI wouldn't test FA3 actually since it uses L4 (if I remember correctly).