Repository navigation
Optimize WebGPU GatedDeltaNet recurrent execution - #32645
Merged
Merged
Conversation
Copilot created this pull request from a session on behalf of
kunal-vaishnavi
September 16, 2026 17:16
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
kunal-vaishnavi
changed the base branch from
main
to
copilot/implement-gated-delta-net-webgpu
September 16, 2026 17:17
kunal-vaishnavi
marked this pull request as ready for review
September 16, 2026 17:17
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new FP16 test does not reliably exercise vectorized value I/O on baseline WebGPU adapters.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Optimizes the WebGPU GatedDeltaNet recurrent path by reducing redundant gate work and vectorizing value I/O.
Changes:
- Shares gate computation across each workgroup.
- Adds vec4 value loads/output stores with scalar fallbacks.
- Corrects packed-parameter dispatch sizing and adds focused coverage.
File summaries
| File | Description |
|---|---|
onnxruntime/contrib_ops/webgpu/bert/gated_delta_net.cc |
Selects vectorized I/O and fixes dispatch sizing. |
onnxruntime/contrib_ops/webgpu/bert/gated_delta_net.h |
Tracks vectorized-I/O configuration. |
onnxruntime/contrib_ops/webgpu/bert/gated_delta_net.wgsl.template |
Implements shared gate computation and vec4 I/O. |
onnxruntime/core/providers/webgpu/program.h |
Clarifies packed buffer-view units. |
onnxruntime/test/contrib_ops/gated_delta_net_op_test.cc |
Adds recurrent optimization coverage. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
kunal-vaishnavi
force-pushed
the
copilot/32510-performance-optimizations
branch
from
September 16, 2026 17:54
3435187 to
f133c74
Compare
kunal-vaishnavi
force-pushed
the
copilot/32510-performance-optimizations
branch
2 times, most recently
from
September 16, 2026 18:27
3975a40 to
1174fc7
Compare
kunal-vaishnavi
force-pushed
the
copilot/32510-performance-optimizations
branch
from
September 17, 2026 10:07
521ba20 to
3967488
Compare
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Base automatically changed from
copilot/implement-gated-delta-net-webgpu
to
main
September 17, 2026 23:22
…ance-optimizations # Conflicts: # docs/ContribOperators.md # onnxruntime/contrib_ops/webgpu/bert/gated_delta_net.cc # onnxruntime/contrib_ops/webgpu/bert/gated_delta_net.h # onnxruntime/contrib_ops/webgpu/bert/gated_delta_net.wgsl.template # onnxruntime/core/graph/contrib_ops/bert_defs.cc # onnxruntime/core/providers/webgpu/program.h # onnxruntime/core/providers/webgpu/program_cache_key.cc # onnxruntime/core/providers/webgpu/shader_helper.cc # onnxruntime/core/providers/webgpu/shader_helper.h # onnxruntime/core/providers/webgpu/shader_variable.cc # onnxruntime/core/providers/webgpu/shader_variable.h # onnxruntime/test/contrib_ops/gated_delta_net_op_test.cc Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
…ance-optimizations # Conflicts: # onnxruntime/core/providers/webgpu/webgpu_context.h Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
…ance-optimizations Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
…ance-optimizations Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com>
Sayan Shaw (sayanshaw24)
approved these changes
Oct 1, 2026
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.
Description
Implements the remaining performance follow-ups from the GatedDeltaNet WebGPU review.
vec4value loads and output stores whenhead_size_vpermits.Motivation and Context
Reduce redundant computation, storage accesses, and dispatch overhead in the WebGPU GatedDeltaNet kernel introduced by PR #32510, while adding runtime coverage for the constrained-binding packed path requested during review.