-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[WebGPU] Support models with opset 24 ops and KV-shared decoder layers (Gemma 4) #28501
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
30 commits
Select commit
Hold shift + click to select a range
a3b0e64
[WebGPU] Add opset 24 kernel registrations for Cast and Shape ops
feich-ms b6c0c5d
Address review: fix dummy-K buffer size and add const_cast safety guard
feich-ms 000c9d1
Fix MHA CrossAttention regression: use num_heads_ for non-GQA paths
feich-ms b943678
Add ORT_ENFORCE for past KV non-null in kv_empty path
feich-ms bf017c8
[WebGPU] Optimize GQA kv_empty path: Q-only extraction and rotary
feich-ms 8b65eea
Apply suggestion from @qjia7
feich-ms e57dee1
Skip wasteful present_key/value allocation for kv_empty path
feich-ms 194cc08
update comments
feich-ms c3f727d
Apply suggestion from @github-actions[bot]
feich-ms 9ecffd4
Remove model-specific references from code comments
feich-ms 334c3d5
Simplify WebGPU shared KV tests and error message
feich-ms 587a177
Fix CI: add use_webgpu parameter to shared KV test helpers
feich-ms e98641e
Optimize Q-only extraction dispatch size for shared KV layers
feich-ms a7c5929
Remove unused ExtractQFromPackedQKV and q_only shader path
feich-ms 2097f03
simplify RunRotaryEmbeddingQOnly impl
feich-ms 8624ea1
Fix kv_empty layers failing with sliding window on long sequences
feich-ms fc0bf73
update comments
feich-ms dcb6c64
Replace RunRotaryEmbeddingQOnly with standalone RotaryEmbeddingWithOf…
feich-ms ae1c542
Add rotary prefill and multi-batch tests for RotaryEmbeddingWithOffse…
feich-ms 1644ba9
Fix code formatting per linter suggestions
feich-ms 3e25e15
Reuse RotaryEmbeddingProgram for GQA kv_empty rotary path
feich-ms 182f689
Compute rotary position in shader via position_offset uniform
feich-ms 4234919
Fix missing position_offset uniform in contrib RotaryEmbedding caller
feich-ms e56f00a
Revert GenerateShaderCode to single if-else structure
feich-ms 9f3383c
fix white spaces issue
feich-ms 08240cb
reshape the code structure of GenerateShaderCode
feich-ms 33057d4
fix CI failures
feich-ms 9363e77
fix lint error
feich-ms e1a64e1
Fix shader input order in RotaryEmbeddingProgram
feich-ms c5f5f8b
Refactor RotaryEmbedding: share RunRotaryEmbedding across GQA and ONN…
feich-ms 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
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
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
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.