Skip to content

[WebGPU] Automate Dawn updates - #33396

Open
Yang Gu (gyagp) wants to merge 10 commits into
microsoft:mainfrom
gyagp:upgrade-dawn
Open

Yang Gu (gyagp) wants to merge 10 commits into
microsoft:mainfrom
gyagp:upgrade-dawn

Conversation

@gyagp

@gyagp Yang Gu (gyagp) commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Dawn updates currently require coordinating the archive pin, dependency hashes, SwiftShader revision, and local patches. Add a single command to prepare, apply, and validate these changes together:

python plugin-ep-webgpu/tools/dawn/update_dawn.py

The command defaults to the newest dated Dawn tag. Use --revision <tag-or-full-commit> to select a specific version. It records the concrete revision and checksum, updates the reviewed dependency manifest and Linux test SwiftShader pin, and refreshes active patches in CMake order.

Refreshed patches must reproduce the expected source with zero fuzz or offsets. The command verifies written contents and automatically validates the manifest against the selected checkout. Unresolved patches or dependency changes needing classification stop the update; writing or final-validation failures restore the affected files. Reports and a diff are saved under build/dawn-upgrade/, and repeating the same update makes no further edits.

Dependency classifications and the independently packaged DXC release are preserved. DXIL handling is outside the scope. A manifest-only updater remains available for focused maintenance.

This PR contains eight tooling, test, and documentation files. Build-inventory generation and packaging-pipeline integration are in #33448. Dawn version updates generated during local validation are separate from this PR.

Validation:

  • 47 tests and 29 subtests passed, including real GNU patch application, latest-tag resolution, metadata preservation, repeat runs, and rollback on write or validation failure.
  • Ruff lint/format and Git whitespace checks passed.
  • An isolated update from v20261013.193955 to v20261016.190333 changed nine files and passed automatic manifest and strict patch validation. A second invocation changed zero files.
  • Earlier pinned comparisons reproduced [WebGPU] Upgrade Dawn to the latest version #33390's two changed files exactly and [WebGPU] Upgrade Dawn to the latest #32686's dependency identities and revisions.

The command automates source updates and metadata/patch validation. Build, package, and GPU tests remain necessary to establish runtime compatibility for each Dawn update.

Keep the maintained manifest and validator required by the upgrade tool. Add fetched build-input inventory generation to plugin packaging and document the distinct scopes of the two manifests.
Remove the completed DXIL migration recipe and its command-line option.
Keep archive pin/checksum generation, reviewed dependency registrations,
SwiftShader synchronization, and ordered patch refreshes in one workflow.

Write a Markdown review report alongside the JSON report and patch. Report
existing manifest drift and preserve patch-inspection errors as blockers
without applying partial edits. Match fetched dependencies by repository
and commit so one revision cannot stand in for another checkout.

Document the distinction between reviewed manifests and fetched build
inventories. Preserve independent DXC release/package metadata.

Validation: 49 tests and 24 subtests pass; Ruff and whitespace checks pass.
Replaying microsoft#33390 generates both changed files exactly. Both microsoft#32686 and
microsoft#33390 replays reproduce all dependency identities/pins and final patched
source, with idempotent apply/check. No dependency roll is applied here.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Select the newest vYYYYMMDD.HHMMSS Git tag for --revision latest, then use the existing exact-tag resolution and archive checks. Record the requested selector separately from the concrete tag and commit; never write a floating latest pin. Keep omitted --revision on the current pin.

Document using the resolved tag when applying a reviewed plan. Cover selection order, non-release refs, concrete manifest/archive pins, resolution failures, and unchanged explicit/default behavior. Validation: 54 tests and 29 subtests passed; a live latest dry run resolved v20261016.190333 with no blockers. No dependency roll applied.
Keep the upgrade command, reviewed manifest maintenance, tests and documentation in this PR. Move fetched-source inventory generation and packaging scan integration to the independent webgpu-build-inventory branch.

Validation: upgrade suite 42 tests and 29 subtests passed; independent inventory snapshot 12 tests passed. Lint and post-roll consistency checks pass. Preserve all nine local roll files outside this commit.
@gyagp Yang Gu (gyagp) changed the title [WebGPU] Automate Dawn upgrades and component inventories [WebGPU] Automate Dawn upgrades Oct 19, 2026
Make the default command resolve the latest dated release, apply the source update, and validate the resulting files. Remove separate apply/check modes. Reuse the existing manifest validator against the selected checkout and roll back updates if file verification or metadata validation fails.

Verify regenerated patches reproduce the expected source with strict context before applying them. Simplify the README to one command, with an optional exact revision. Builds and GPU tests remain platform-specific.

Validation: 47 tests and 29 subtests passed, plus lint. A real default invocation updated nine files to v20261016.190333; the repeat invocation changed zero files. Existing local roll files were preserved and excluded from the commit.
@gyagp Yang Gu (gyagp) changed the title [WebGPU] Automate Dawn upgrades [WebGPU] Automate Dawn updates Oct 19, 2026
@gyagp
Yang Gu (gyagp) marked this pull request as ready for review October 19, 2026 07:55
@gyagp

Copy link
Copy Markdown
Contributor Author

/run bots

@gyagp

Copy link
Copy Markdown
Contributor Author

Jiajia Qin (@qjia7) Please review

@qjia7

Copy link
Copy Markdown
Contributor

The request was received. Approve workflow runs. Thanks.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants