Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23492
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 2d2348a with merge base bdb489e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Oct 6, 2026
This PR needs a
|
This was referenced Oct 9, 2026
This branch was successfully deployed
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.
Stack from ghstack (oldest at bottom):
Ulterior Motive
Organize Vulkan operators by implementation family so operators with multiple routes can use clear, scalable directory layouts.
Rationale
What: Move convolution C++ implementations, GLSL templates, YAML variant definitions, and convolution-only shader headers under
convolution/in bothimpl/andglsl/, split intoconv1d/andconv2d/. Split the monolithicConvolution.cppandQ8taConv2d.{h,cpp}so each file holds either routing logic or a single implementation route.Why: Convolution is implemented through several routes (direct, depthwise, pointwise, im2col/GEMM, transposed), and the q8ta quantized family repeats most of them. In the flat directories their sources were interleaved by name, and single files mixed routing with several route implementations. This prepares for adding further routes such as Winograd.
Details
impl/andglsl/mirror each other)convolution/:Convolution.{h,cpp}registersaten.convolutionand dispatches to conv1d or conv2d by input rank; it also holdsprepack_biasesandcheck_conv_args, used by both.convolution/conv1d/:Conv1d.{h,cpp}(conv1d_implrouting),Conv1dDirect.{h,cpp},Conv1dDW.cpp,Conv1dPW.cpp, and the conv1d shaders.convolution/conv2d/:Conv2d.{h,cpp}(conv2d_implrouting,Conv2dMethod,resize_conv2d_node),Conv2dDirect.{h,cpp}(direct and transposed shader dispatch),Conv2dDW.cpp,Conv2dPW.cpp,ConvolutionUtils.h,conv2d_common.glslh, and the direct/depthwise/pointwise shaders.convolution/conv2d/{im2col,transposed}/: im2col/GEMM sources and shaders; transposed shaders.convolution/conv2d/q8ta/:Q8taConv2d.{h,cpp}(q8ta_conv2drouting and the im2col heuristic, formerlyQ8taConv2dRoute),Q8taConv2dCommon.{h,cpp}(ActivationType, packed-dim checks),Q8taConv2dDirect.{h,cpp}(general route),Q8taConv2dDW.{h,cpp},Q8taConv2dPW.{h,cpp}, plusim2col/andtransposed/. Each route has its own header; consumers include only what they use.convolution/conv2d/quantized_legacy/:QuantizedConvolution.{h,cpp}and its shaders and headers.pack_weights/subdirectories of the route that dispatches them (conv2d/,conv2d/im2col/,conv2d/q8ta/,conv2d/transposed/).DynamicDispatchNodeare namedadd_*_node(); functions that calladd_*_node()to implement an operator are named*_impl(). Registered operator names are unchanged.add_conv2d_nodeis folded intoconv2d_impl. Its test-onlyforce_directflag is removed; the conv2d test'sdirectselector callsconv2d_direct_impldirectly, which is equivalent for its sliding-window cases.conv2d_common.glslhunchanged through ancestor include resolution.quantize_and_pack_4w4candunpack_4w4c_and_dequantizeincludeconvolution/conv2d/conv2d_common.glslh.linear_*,conv2d_fp_input_tile_load.glslh, indexing headers) stay at the shader root.utils::safe_downcast<int32_t>for narrowing,(void)for unused parameters, an anonymous namespace for the file-localConv2dParams, and removal of an unusedShaderNameUtils.hinclude.Generated shader names and runtime dispatch behavior are unchanged.
Differential Revision: D123450342