-
Notifications
You must be signed in to change notification settings - Fork 4.1k
webgpu: Fuse FlashAttention decode kernels and extend to any sequence length #28389
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 4 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
435c445
webgpu: Extend FlashAttention decode path to support any sequence length
qjia7 39ffe45
webgpu: Add m_tile optimization and remove Subgroups requirement for …
qjia7 ecfc56a
webgpu: Fuse QKT and SplitVx into single QKV kernel for FlashAttentio…
qjia7 934ed2a
webgpu: Route between prefill and split-reduce paths in FlashAttention
qjia7 35b35f4
webgpu: Fix clang-format in FlashAttentionDecodeQKVProgram constructor
qjia7 9b8dadf
Merge branch 'main' into webgpu-flash-attention-relax-subgroups
qjia7 b7e6592
Remove subgroups feature check from use_split_reduce routing
qjia7 46fd59a
Merge branch 'main' into webgpu-flash-attention-relax-subgroups
qjia7 07ef10d
Remove use_seqlen_k extension from decode kernels, keep only use_indi…
qjia7 b690d0f
Extend indirect dispatch to support sequence_length > 1 in split-redu…
qjia7 4241a91
Extract shared write_indirect_dispatch WGSL function for dispatch nor…
qjia7 42419a6
Merge branch 'main' into webgpu-flash-attention-relax-subgroups
qjia7 a16023e
Merge branch 'main' into webgpu-flash-attention-relax-subgroups
qjia7 10ef54d
Tune flash attention split-reduce threshold to seq_len < 32
qjia7 b0dcedf
Use getByOffset/setByOffset helpers in flash attention decode shaders
qjia7 ea60286
Normalize indirect-dispatch helper to accept (x, y, z) and consolidat…
qjia7 13ea0e4
Simplify flash attention split-reduce routing to seq_len < 32
qjia7 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
203 changes: 84 additions & 119 deletions
203
onnxruntime/contrib_ops/webgpu/bert/flash_attention.cc
Large diffs are not rendered by default.
Oops, something went wrong.
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
118 changes: 0 additions & 118 deletions
118
onnxruntime/contrib_ops/webgpu/bert/flash_attention_decode_qkt.wgsl.template
This file was deleted.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.