Repository navigation
Isolate bundled Dawn implementation from WebGPU context - #32964
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
π’ Approval recommended
The implementation preserves behavior and build isolation; only minor missing license headers remain.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Isolates bundled Dawn dependencies from the common WebGPU context while preserving existing behavior.
Changes:
- Moves native Dawn platform, proc-table, instance, and adapter logic into dedicated helpers.
- Excludes bundled-only implementation from external-Dawn and Emscripten builds.
- Updates context creation and adapter enumeration to use the helpers.
| File | Description |
|---|---|
webgpu_context.cc |
Uses bundled-Dawn helper APIs. |
webgpu_context_dawn_platform.h |
Declares internal helper APIs. |
webgpu_context_dawn_platform.cc |
Implements bundled Dawn integration. |
onnxruntime_providers_webgpu.cmake |
Excludes bundled implementation where unsupported. |
π‘ Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Mustapha Jaber (mustjab)
marked this pull request as ready for review
September 30, 2026 04:10
Mustapha Jaber (mustjab)
enabled auto-merge (squash)
September 30, 2026 04:26
Jiajia Qin (qjia7)
approved these changes
Sep 30, 2026
Mustapha Jaber (mustjab)
deleted the
fix/webgpu-bundled-dawn-boundary
branch
September 30, 2026 12:21
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
The common WebGPU context handles both bundled and host-provided Dawn, but it also includes Dawn native/platform headers and implements the bundled worker pool. Move the implementation-dependent code into a bundled-only translation unit so that the common context no longer depends on
dawn::nativeordawn::platform.Validation
onnxruntime_provider_test; ranWebGpuContextTest.*, with 27 passed and one expected skip (AdapterIndexRejectsUnsupportedBuild). This includes physical adapter selection and device operations.--use_webgpu --use_external_dawn: configured and builtonnxruntime_providers_webgpu. The bundled-only translation unit is excluded from the generated project.lintrunnerandgit diff --cached --checkpassed.External-host runtime and Emscripten execution were not tested locally.