Repository navigation
Make shared WebGPU data transfers stateless - #33208
Merged
Mustapha Jaber (mustjab) merged 1 commit intoOct 9, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The stateless lifecycle and routing changes are internally consistent and covered by existing multi-context transfer validation.
0 open findings
What changed in this PR
Makes shared WebGPU transfers stateless while preserving context-correct routing and lifecycle behavior.
Changes:
- Routes session copies through their WebGPU streams.
- Retains tensor-selected contexts only during streamless copies and flushes GPU-to-GPU copies.
- Documents external-context registration requirements.
No actionable findings identified.
| File | Description |
|---|---|
webgpu_provider_factory.cc |
Removes cached transfer context and implements per-copy routing. |
webgpu_provider_factory_creator.h |
Updates the internal transfer creator contract. |
ep/factory.cc |
Adopts the context-free creator. |
WebGPU_External_Dawn.md |
Documents memory identity and context registration constraints. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Mustapha Jaber (mustjab)
marked this pull request as ready for review
October 8, 2026 18:46
Jiajia Qin (qjia7)
approved these changes
Oct 9, 2026
Mustapha Jaber (mustjab)
deleted the
fix/webgpu-stateless-shared-transfer
branch
October 9, 2026 04:19
Edward Chen (edgchen1)
added a commit
that referenced
this pull request
Oct 14, 2026
### Description <!-- Describe your changes. --> This cherry-picks the following commits for the release: | Commit ID | PR Number | Commit Title | |-----------|-----------|-------------| | ac44e16 | #33208 | Make shared WebGPU data transfers stateless | | 6e0f154 | #33082 | [WebGPU] Restore ORT 1.24.4 compatibility with per-Session recording and serialized execution | ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> WebGPU EP 0.5.0 release preparation. --------- Co-authored-by: Mustapha Jaber <mustjab@users.noreply.github.com> Co-authored-by: Xiaofei Han <xiaofeihan@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b6fbaacb-9846-4330-8fb3-2f0b13737d48 Copilot-Session: 8ca4e5fc-8c08-46bd-82a9-5cff5108efed
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.
Summary
Follow-up to the review of #33110.
The shared WebGPU data-transfer wrapper does not need to own a context. A session stream already supplies its owning execution provider's transfer state, while a streamless copy can select its registered context from the GPU tensor's memory-device ID.
Allocator/session context IDs and the public C API are unchanged. This does not add pre-session external-context registration.
Validation
864d87126864c64651f58a9b51d9006ad71b2c78passed.