[ExecuTorch][WebGPU] SymInt live-scalar mechanism + et_vk.select_as_symint#20085
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20085
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 1 Cancelled Job, 15 Pending, 1 Unrelated FailureAs of commit a496796 with merge base f0dff03 ( NEW FAILURES - The following jobs have 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
|
|
@claude review |
|
Claude finished @JulianCloudNTH's task in 1m 50s —— View job Code ReviewReviewed the SymInt live-scalar mechanism and 1. Uncaught exceptions in the
|
3caca1c
into
gh/JulianCloudNTH/18/base
…ymint Pull Request resolved: #20085 Adds the dynamic-scalar (SymInt) mechanism to the WebGPU graph as a standalone enabler, ahead of the SDPA op that consumes it. Mirrors the Vulkan delegate's SymInt = live uniform-buffer design: a `ValueType::SymInt` backed by a 16-byte `Uniform|CopyDst` buffer, `set_symint`/`read_symint`/`symint_buffer` accessors with dirty-tracking, a `SymIntSource` + `add_symint_source`/`update_symints_from_inputs` host-read path, and an `add_resize_hook`/`propagate_resize`/`dispatch_at` recompute plumbing. `WebGPUBackend::execute` calls `propagate_resize` after refreshing the SymInts from the runtime inputs. The `et_vk.select_as_symint` op handler records `out SymInt = x[index]` along a dim at build time. This diff has no in-graph consumer yet — the SDPA op (stacked above) reads the SymInt value via `read_symint()` for dynamic `input_pos`. Building it as its own diff keeps the enabler separate from the op, matching the update_cache → mechanism → SDPA layering. Authored with assistance from Claude. ghstack-source-id: 391979584 @exported-using-ghexport Differential Revision: [D107584280](https://our.internmc.facebook.com/intern/diff/D107584280/)
…ymint Pull Request resolved: #20085 Adds the dynamic-scalar (SymInt) mechanism to the WebGPU graph as a standalone enabler, ahead of the SDPA op that consumes it. Mirrors the Vulkan delegate's SymInt = live uniform-buffer design: a `ValueType::SymInt` backed by a 16-byte `Uniform|CopyDst` buffer, `set_symint`/`read_symint`/`symint_buffer` accessors with dirty-tracking, a `SymIntSource` + `add_symint_source`/`update_symints_from_inputs` host-read path, and an `add_resize_hook`/`propagate_resize`/`dispatch_at` recompute plumbing. `WebGPUBackend::execute` calls `propagate_resize` after refreshing the SymInts from the runtime inputs. The `et_vk.select_as_symint` op handler records `out SymInt = x[index]` along a dim at build time. This diff has no in-graph consumer yet — the SDPA op (stacked above) reads the SymInt value via `read_symint()` for dynamic `input_pos`. Building it as its own diff keeps the enabler separate from the op, matching the update_cache → mechanism → SDPA layering. Authored with assistance from Claude. ghstack-source-id: 391979584 @exported-using-ghexport Differential Revision: [D107584280](https://our.internmc.facebook.com/intern/diff/D107584280/)
…ymint Pull Request resolved: #20085 Adds the dynamic-scalar (SymInt) mechanism to the WebGPU graph as a standalone enabler, ahead of the SDPA op that consumes it. Mirrors the Vulkan delegate's SymInt = live uniform-buffer design: a `ValueType::SymInt` backed by a 16-byte `Uniform|CopyDst` buffer, `set_symint`/`read_symint`/`symint_buffer` accessors with dirty-tracking, a `SymIntSource` + `add_symint_source`/`update_symints_from_inputs` host-read path, and an `add_resize_hook`/`propagate_resize`/`dispatch_at` recompute plumbing. `WebGPUBackend::execute` calls `propagate_resize` after refreshing the SymInts from the runtime inputs. The `et_vk.select_as_symint` op handler records `out SymInt = x[index]` along a dim at build time. This diff has no in-graph consumer yet — the SDPA op (stacked above) reads the SymInt value via `read_symint()` for dynamic `input_pos`. Building it as its own diff keeps the enabler separate from the op, matching the update_cache → mechanism → SDPA layering. Authored with assistance from Claude. ghstack-source-id: 391979584 @exported-using-ghexport Differential Revision: [D107584280](https://our.internmc.facebook.com/intern/diff/D107584280/)
Stack from ghstack (oldest at bottom):
Adds the dynamic-scalar (SymInt) mechanism to the WebGPU graph as a standalone enabler, ahead of the SDPA op that consumes it. Mirrors the Vulkan delegate's SymInt = live uniform-buffer design: a
ValueType::SymIntbacked by a 16-byteUniform|CopyDstbuffer,set_symint/read_symint/symint_bufferaccessors with dirty-tracking, aSymIntSource+add_symint_source/update_symints_from_inputshost-read path, and anadd_resize_hook/propagate_resize/dispatch_atrecompute plumbing.WebGPUBackend::executecallspropagate_resizeafter refreshing the SymInts from the runtime inputs. Theet_vk.select_as_symintop handler recordsout SymInt = x[index]along a dim at build time.This diff has no in-graph consumer yet — the SDPA op (stacked above) reads the SymInt value via
read_symint()for dynamicinput_pos. Building it as its own diff keeps the enabler separate from the op, matching the update_cache → mechanism → SDPA layering.Authored with assistance from Claude.
@exported-using-ghexport
Differential Revision: D107584280
Differential Revision: D107584280