Skip to content

[ExecuTorch][WebGPU] Lift FastVLM dispatch limits and harden graph construction - #21602

Open
JCNTH wants to merge 2 commits into
gh/JCNTH/209/basefrom
gh/JCNTH/209/head
Open

[ExecuTorch][WebGPU] Lift FastVLM dispatch limits and harden graph construction#21602
JCNTH wants to merge 2 commits into
gh/JCNTH/209/basefrom
gh/JCNTH/209/head

Conversation

@JCNTH

@JCNTH JCNTH commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Run production FastVLM shapes with exception-safe WebGPU graph construction

Production FastVLM tensors exceeded WebGPU one-dimensional dispatch limits, while several parameter buffers were not graph-owned before fallible pipeline construction. The runtime now folds flat dispatches across x/y, owns parameters immediately, rejects ambiguous BOOL/byte-integer casts, and compiles timestamp validation only in profiling builds.

Key changes:

  • GELU and expand_copy use overflow-safe folded dispatch and live resize updates.
  • Compare, expand_copy, and to_copy create graph-owned parameter buffers before pipeline construction, mirroring Vulkan ComputeGraph ownership.
  • to_copy rejects BOOL-to/from-INT8 or UINT8 before same-width flat-copy routing.
  • Production builds exclude timestamp-query validation and symbols.
  • Boundary, failure, and real FastVLM encoder coverage exercise the final combined behavior.

Kernel math and below-limit one-dimensional dispatch behavior are unchanged.

Co-authored-with: Claude Code.

Differential Revision: D114936147

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit ab3d0de with merge base ad3a71f (image):

NEW FAILURE - The following job has failed:

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 Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

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]
JCNTH added a commit that referenced this pull request Aug 5, 2026
…nstruction

Pull Request resolved: #21602

**Run production FastVLM shapes with exception-safe WebGPU graph construction**

Production FastVLM tensors exceeded WebGPU one-dimensional dispatch limits, while several parameter buffers were not graph-owned before fallible pipeline construction. The runtime now folds flat dispatches across x/y, owns parameters immediately, rejects ambiguous `BOOL`/byte-integer casts, and compiles timestamp validation only in profiling builds.

Key changes:

- `GELU` and `expand_copy` use overflow-safe folded dispatch and live resize updates.
- `Compare`, `expand_copy`, and `to_copy` create graph-owned parameter buffers before pipeline construction, mirroring Vulkan `ComputeGraph` ownership.
- `to_copy` rejects `BOOL`-to/from-`INT8` or `UINT8` before same-width flat-copy routing.
- Production builds exclude timestamp-query validation and symbols.
- Boundary, failure, and real FastVLM encoder coverage exercise the final combined behavior.

Kernel math and below-limit one-dimensional dispatch behavior are unchanged.

Co-authored-with: Claude Code.
ghstack-source-id: 411059172
@exported-using-ghexport

Differential Revision: [D114936147](https://our.internmc.facebook.com/intern/diff/D114936147/)
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.

2 participants