[ExecuTorch][WebGPU] Repair dynamic SDPA routing, add attestation - #21134
[ExecuTorch][WebGPU] Repair dynamic SDPA routing, add attestation#21134JCNTH wants to merge 6 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21134
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 264c06d with merge base 8200b9e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
SS-JIA
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
Stack from ghstack (oldest at bottom):
With dynamic sequence positions, the backend could record only one SDPA route,
so a decode following a dynamic-position prefill could dispatch the wrong
kernel, and there was no way to confirm which kernel actually ran. This treats a
dynamic SymInt position (not just a dynamic sequence dimension) as sufficient to
record both SDPA routes, exposes active-kernel route attestation for correctness
and performance harnesses, and reads the timestamp-query gate per execution so
diagnostics can be enabled after module initialization. The attestation state
and query are compiled only under the WGPU_BACKEND_ENABLE_PROFILING build flag,
so production builds carry no additional state or cost, mirroring how the Vulkan
backend gates its QueryPool behind ET_EVENT_TRACER_ENABLED. No Vulkan analogue
for the routing fix (WebGPU runtime routing and observability).
Key changes:
behind WGPU_BACKEND_ENABLE_PROFILING) and read the timestamp-query gate per
execution.
sequence dimension) as sufficient to record both SDPA routes.
@exported-using-ghexport
Differential Revision: D113171745
Differential Revision: D113171745