Skip to content

[ET-VK][runtime][1/3] Prepare linear shaders for 2D dispatch - #22288

Merged
SS-JIA merged 4 commits into
mainfrom
gh/SS-JIA/603/orig
Aug 29, 2026
Merged

[ET-VK][runtime][1/3] Prepare linear shaders for 2D dispatch#22288
SS-JIA merged 4 commits into
mainfrom
gh/SS-JIA/603/orig

Conversation

@pytorchbot

Copy link
Copy Markdown
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #22223 by @SS-JIA
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/603/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/603/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/602/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/603/orig
Differential Revision: D117706349
@diff-train-skip-merge

@pytorchbot
pytorchbot requested a review from SS-JIA as a code owner August 28, 2026 23:03
@pytorch-bot

pytorch-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

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 28, 2026
Base automatically changed from gh/SS-JIA/602/orig to main August 28, 2026 23:06
@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.

SS-JIA added 4 commits August 28, 2026 20:53
Pull Request resolved: #22223

Add `dispatch.glslh` with `linear_idx_from_gid()`, which flattens two-dimensional global invocation IDs. Migrate shaders whose global X coordinate represents a linear logical index. Existing one-dimensional dispatch geometry remains unchanged, making this a behavior-neutral preparation for centralized dispatch wrapping.

Authored with Codex.
ghstack-source-id: 421281480
@exported-using-ghexport

Differential Revision: [D117706349](https://our.internmc.facebook.com/intern/diff/D117706349/)
Pull Request resolved: #22224

Introduce `LocalWorkGroup`, `LwgShape`, `GlobalWorkGrid`, and
`DispatchGridIntent` in `runtime/vk_api/DispatchGrid`. Remove legacy
`WorkgroupSize`.

Model local shapes as power-of-two exponents, support fitting against global
extents, and validate local dimensions against device limits. Track dispatch
intent independently from optional required local workgroup geometry.

Authored with Codex.
ghstack-source-id: 421281484
@exported-using-ghexport

Differential Revision: [D117706351](https://our.internmc.facebook.com/intern/diff/D117706351/)
Pull Request resolved: #22225

Migrate dispatch, prepack, profiling, and workgroup picker interfaces to
`GlobalWorkGrid` and `LocalWorkGroup`. Wrap oversized linear grids using device
limits and validate final geometry before `vkCmdDispatch`.

Carry exact local geometry as `GlobalWorkGrid` metadata. Cooperative and
reduction grid pickers set it explicitly, while `pick_required_lwg` validates
and returns it. Preserve elongated Conv1d depthwise workgroups where the
default shape would regress GPU latency. Add end-to-end oversized linear
dispatch coverage.

Authored with Codex.
ghstack-source-id: 421281492
@exported-using-ghexport

Differential Revision: [D117706355](https://our.internmc.facebook.com/intern/diff/D117706355/)
Add batch-aware direct, pointwise, depthwise, and im2col q8ta convolution dispatch. Batched im2col uses an NCHW scratch tensor and batch-strided shader indexing, with conservative groups=1 high-K/small-spatial routing bounded by a 32 MiB scratch cap. Grouped and large-spatial convolutions stay on the direct path. Authored with Codex.

Differential Revision: [D117869783](https://our.internmc.facebook.com/intern/diff/D117869783/)


ghstack-source-id: 421281491
Pull-Request: #22254
@SS-JIA
SS-JIA force-pushed the gh/SS-JIA/603/orig branch from fe09df5 to 5ea9967 Compare August 29, 2026 00:53
@SS-JIA
SS-JIA merged commit 16d3b9f into main Aug 29, 2026
185 of 187 checks passed
@SS-JIA
SS-JIA deleted the gh/SS-JIA/603/orig branch August 29, 2026 00:56
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants