Skip to content

[ExecuTorch][WebGPU] Add certified scoped output suppression#21127

Open
JCNTH wants to merge 3 commits into
gh/JCNTH/103/basefrom
gh/JCNTH/103/head
Open

[ExecuTorch][WebGPU] Add certified scoped output suppression#21127
JCNTH wants to merge 3 commits into
gh/JCNTH/103/basefrom
gh/JCNTH/103/head

Conversation

@JCNTH

@JCNTH JCNTH commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

When a caller discards a model's terminal output tensor, the backend still
dispatches the final quantized-linear range and reads it back, wasting a
dispatch and a device-to-host copy on every execution. This adds a default-off,
certificate-bound execution option that suppresses exactly one explicitly
certified terminal output dispatch range and its readback. The certificate must
bind the exact PTE and method and prove a single delegate, no portable nodes,
and a unique leaf output resolving to the caller's host buffer; anything
ambiguous, aliased, portable, or uncertified fails closed and executes
normally. No Vulkan analogue (WebGPU runtime output-contract change).

Key changes:

  • WebGPUExecutionOptions.{h,cpp}: certificate struct, RAII
    ScopedWebGPUExecutionOptions, and plan_webgpu_execution suppression planner.
  • WebGPUGraph.{cpp,h}: resolve the certified output ordinal and skip its
    dispatch range and readback when suppression is active.
  • WebGPUBackend.cpp: thread the scoped option through execution.
    @exported-using-ghexport

Differential Revision: D113171751

Differential Revision: D113171751

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ You can merge normally! (1 Unrelated Failure)

As of commit aaf3084 with merge base 86c3470 (image):

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 Jul 22, 2026
@github-actions

Copy link
Copy Markdown

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.

[ghstack-poisoned]
[ghstack-poisoned]
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. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant