Skip to content

[ET-VK][qconv] Add layout-agnostic general shader for quantized conv#17265

Merged
SS-JIA merged 1 commit intomainfrom
gh/SS-JIA/408/orig
Feb 6, 2026
Merged

[ET-VK][qconv] Add layout-agnostic general shader for quantized conv#17265
SS-JIA merged 1 commit intomainfrom
gh/SS-JIA/408/orig

Conversation

@pytorchbot
Copy link
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #17219 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/408/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/408/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/406/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/408/orig
Differential Revision: D92307252
@diff-train-skip-merge

@pytorch-bot
Copy link

pytorch-bot bot commented Feb 5, 2026

🔗 Helpful Links

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

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 Feb 5, 2026
@SS-JIA SS-JIA force-pushed the gh/SS-JIA/406/orig branch from 013230f to 9f3ac65 Compare February 6, 2026 00:29
Base automatically changed from gh/SS-JIA/406/orig to main February 6, 2026 00:36
Pull Request resolved: #17219

The existing quantized conv2d implementation (`conv2d_q8ta_q8csw_q8to`) only
supports the 4W4C memory layout. This limits its use when models require
different tensor layouts. This change introduces a new general-purpose
quantized conv2d shader (`q8ta_conv2d`) that works with any memory layout
by using BufferMetadata for tensor indexing.

The routing logic determines which implementation to use based on input/output
layouts: when both are 4W4C, the existing optimized path is used; otherwise,
the new general shader handles the computation. This enables quantized conv2d
to work seamlessly across 4C1W, 4W4C, and 4C memory layouts.

Key changes:
- New GLSL shader `q8ta_conv2d.glsl` using layout specialization constants
- New `Q8taConv2d.cpp` with operator registration and workgroup size heuristics
- Refactored routing in QuantizedConvolution.cpp to dispatch based on layout
- Extended test coverage to validate all three memory layouts

Authored with Claude.
ghstack-source-id: 338638545
@exported-using-ghexport

Differential Revision: [D92307252](https://our.internmc.facebook.com/intern/diff/D92307252/)
@SS-JIA SS-JIA force-pushed the gh/SS-JIA/408/orig branch from a1e4685 to 23849ec Compare February 6, 2026 00:37
@SS-JIA SS-JIA merged commit 67ff1b8 into main Feb 6, 2026
27 of 28 checks passed
@SS-JIA SS-JIA deleted the gh/SS-JIA/408/orig branch February 6, 2026 00:37
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

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.

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