[ET-VK][qconv] Add layout-agnostic general shader for quantized conv#17265
Merged
[ET-VK][qconv] Add layout-agnostic general shader for quantized conv#17265
Conversation
🔗 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. |
013230f to
9f3ac65
Compare
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/)
a1e4685 to
23849ec
Compare
SS-JIA
approved these changes
Feb 6, 2026
This PR needs a
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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