Skip to content

[ExecuTorch][WebGPU] Upload named-data constants in WebGPUGraph#19962

Merged
meta-codesync[bot] merged 1 commit into
gh/JulianCloudNTH/7/basefrom
gh/JulianCloudNTH/7/head
Jun 3, 2026
Merged

[ExecuTorch][WebGPU] Upload named-data constants in WebGPUGraph#19962
meta-codesync[bot] merged 1 commit into
gh/JulianCloudNTH/7/basefrom
gh/JulianCloudNTH/7/head

Conversation

@JulianCloudNTH
Copy link
Copy Markdown
Contributor

@JulianCloudNTH JulianCloudNTH commented Jun 2, 2026

Stack from ghstack (oldest at bottom):

The Vulkan serializer that the WebGPU backend reuses stores every non-empty constant in the PTE's named-data map with offset == UINT64_MAX and a named_key, rather than inline in the VK00 blob. WebGPUGraph::build previously handled only inline constants, so a delegated op's constant weights were never uploaded and the op produced all zeros. build now also fetches named-data constants via NamedDataMap::get_data, mirroring the path VulkanBackend already uses. aten.add was unaffected since it has no constant tensors; the first consumer is the rms_norm op in the child diff.

Differential Revision: D107288998

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Jun 2, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19962

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 1 Cancelled Job, 1 Unrelated Failure

As of commit 05cf3c0 with merge base 915a82d (image):

NEW FAILURE - The following job has failed:

CANCELLED JOB - The following job was cancelled. Please retry:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

JulianCloudNTH added a commit to JulianCloudNTH/executorch that referenced this pull request Jun 3, 2026
Summary:

The Vulkan serializer that the WebGPU backend reuses stores every non-empty constant in the PTE's named-data map with `offset == UINT64_MAX` and a `named_key`, rather than inline in the VK00 blob. `WebGPUGraph::build` previously handled only inline constants, so a delegated op's constant weights were never uploaded and the op produced all zeros. `build` now also fetches named-data constants via `NamedDataMap::get_data`, mirroring the path `VulkanBackend` already uses. `aten.add` was unaffected since it has no constant tensors; the first consumer is the `rms_norm` op in the child diff.
ghstack-source-id: 389182397
exported-using-ghexport

Reviewed By: SS-JIA

Differential Revision: D107288998
JulianCloudNTH added a commit to JulianCloudNTH/executorch that referenced this pull request Jun 3, 2026
Summary:
Pull Request resolved: pytorch#19962

The Vulkan serializer that the WebGPU backend reuses stores every non-empty constant in the PTE's named-data map with `offset == UINT64_MAX` and a `named_key`, rather than inline in the VK00 blob. `WebGPUGraph::build` previously handled only inline constants, so a delegated op's constant weights were never uploaded and the op produced all zeros. `build` now also fetches named-data constants via `NamedDataMap::get_data`, mirroring the path `VulkanBackend` already uses. `aten.add` was unaffected since it has no constant tensors; the first consumer is the `rms_norm` op in the child diff.
ghstack-source-id: 389182397
exported-using-ghexport

Differential Revision: D107288998
@meta-codesync meta-codesync Bot merged commit 8da7936 into gh/JulianCloudNTH/7/base Jun 3, 2026
170 of 176 checks passed
@meta-codesync meta-codesync Bot deleted the gh/JulianCloudNTH/7/head branch June 3, 2026 23:47
@meta-codesync meta-codesync Bot temporarily deployed to cherry-pick-bot June 3, 2026 23:47 Inactive
JulianCloudNTH added a commit that referenced this pull request Jun 4, 2026
The Vulkan serializer that the WebGPU backend reuses stores every non-empty constant in the PTE's named-data map with `offset == UINT64_MAX` and a `named_key`, rather than inline in the VK00 blob. `WebGPUGraph::build` previously handled only inline constants, so a delegated op's constant weights were never uploaded and the op produced all zeros. `build` now also fetches named-data constants via `NamedDataMap::get_data`, mirroring the path `VulkanBackend` already uses. `aten.add` was unaffected since it has no constant tensors; the first consumer is the `rms_norm` op in the child diff.

Differential Revision: [D107288998](https://our.internmc.facebook.com/intern/diff/D107288998/)


ghstack-source-id: 389182397
Pull-Request: #19962
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants