[ExecuTorch][WebGPU] Upload named-data constants in WebGPUGraph#19962
Conversation
🔗 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 FailureAs of commit 05cf3c0 with merge base 915a82d ( 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. |
This PR needs a
|
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
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
8da7936
into
gh/JulianCloudNTH/7/base
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
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_MAXand anamed_key, rather than inline in the VK00 blob.WebGPUGraph::buildpreviously handled only inline constants, so a delegated op's constant weights were never uploaded and the op produced all zeros.buildnow also fetches named-data constants viaNamedDataMap::get_data, mirroring the pathVulkanBackendalready uses.aten.addwas unaffected since it has no constant tensors; the first consumer is therms_normop in the child diff.Differential Revision: D107288998