-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Use single mma warp group for short q_len in FA to optimize decoding performance #18985
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,7 +92,7 @@ FetchContent_Populate(repo-flashinfer) | |
| FetchContent_Declare( | ||
| repo-flash-attention | ||
| GIT_REPOSITORY https://github.com/sgl-project/sgl-attn | ||
| GIT_TAG f866ec34002250e74c8bbcbcffa0e1ae71300b2d | ||
| GIT_TAG cc75c5c5979a607ad20a6828635646f9841acf01 | ||
| GIT_SHALLOW OFF | ||
| ) | ||
| FetchContent_Populate(repo-flash-attention) | ||
|
|
@@ -464,21 +464,21 @@ if (SGL_KERNEL_ENABLE_FA3) | |
| endif() | ||
|
|
||
| file(GLOB FA3_BF16_GEN_SRCS | ||
| "${repo-flash-attention_SOURCE_DIR}/hopper/instantiations/flash_fwd_hdimall_bf16*_sm90.cu") | ||
| "${repo-flash-attention_SOURCE_DIR}/hopper/instantiations/flash_fwd_hdim[0-9]*_bf16*_sm90.cu") | ||
| file(GLOB FA3_BF16_GEN_SRCS_ | ||
| "${repo-flash-attention_SOURCE_DIR}/hopper/instantiations/flash_fwd_hdimdiff_bf16*_sm90.cu") | ||
| list(APPEND FA3_BF16_GEN_SRCS ${FA3_BF16_GEN_SRCS_}) | ||
|
|
||
| # FP16 source files | ||
| # FP16 source files - use individual hdim files instead of hdimall to avoid ptxas crash | ||
| file(GLOB FA3_FP16_GEN_SRCS | ||
| "${repo-flash-attention_SOURCE_DIR}/hopper/instantiations/flash_fwd_hdimall_fp16*_sm90.cu") | ||
| "${repo-flash-attention_SOURCE_DIR}/hopper/instantiations/flash_fwd_hdim[0-9]*_fp16*_sm90.cu") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| file(GLOB FA3_FP16_GEN_SRCS_ | ||
| "${repo-flash-attention_SOURCE_DIR}/hopper/instantiations/flash_fwd_hdimdiff_fp16*_sm90.cu") | ||
| list(APPEND FA3_FP16_GEN_SRCS ${FA3_FP16_GEN_SRCS_}) | ||
|
|
||
| # FP8 source files | ||
| file(GLOB FA3_FP8_GEN_SRCS | ||
| "${repo-flash-attention_SOURCE_DIR}/hopper/instantiations/flash_fwd_hdimall_e4m3*_sm90.cu") | ||
| "${repo-flash-attention_SOURCE_DIR}/hopper/instantiations/flash_fwd_hdim[0-9]*_e4m3*_sm90.cu") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| file(GLOB FA3_FP8_GEN_SRCS_ | ||
| "${repo-flash-attention_SOURCE_DIR}/hopper/instantiations/flash_fwd_hdimdiff_e4m3*_sm90.cu") | ||
| list(APPEND FA3_FP8_GEN_SRCS ${FA3_FP8_GEN_SRCS_}) | ||
|
|
||
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.
The glob pattern
[0-9]*can match an empty string, which might lead to unintended files being included if, for example, a file namedflash_fwd_hdim_bf16_sm90.cuexists. To ensure that you only match files with at least one digit in the head dimension, it's safer to use[0-9][0-9]*.