Skip to content

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: #17108 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/401/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/401/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/400/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/401/orig
Differential Revision: D92061368
@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/17263

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/400/orig branch from abfeb88 to f310d2e Compare February 6, 2026 00:07
Base automatically changed from gh/SS-JIA/400/orig to main February 6, 2026 00:19
Pull Request resolved: #17108

Adds a new layout-agnostic quantized depthwise convolution operator
`etvk.q8ta_conv2d_dw` that uses BufferMetadata and layout specialization
constants to support arbitrary memory layouts (contiguous, channels-last,
4W4C block-packed, etc.).

Key changes:

1. New shader `q8ta_conv2d_dw.glsl`:
   - Uses BufferMetadata for input/output tensor addressing
   - Layout-aware via `inp_layout`/`outp_layout` specialization constants
   - Processes 4 adjacent width positions × 4 channels per thread (4Wx4C tile)
   - Includes optimized paths for simple layouts (outer_block_size == 1)

2. New indexing utilities in `indexing.glslh`:
   - `texel_idx_to_tensor4d_idx()`: converts linear texel index to 4D tensor coords
   - `tensor4d_idx_to_texel_idx()`: converts 4D tensor index to texel index

3. Code refactoring:
   - Extract `Conv2DParams` struct and `create_conv2d_params()` to ConvolutionUtils.h
   - Create Q8taConv2dDW.cpp with new operator implementation
   - Add Q8taConv2d.h with public API declarations
   - Move `prepack_quantized_conv2d_dw_weight()` to new implementation file

4. New workgroup size helpers:
   - `pick_q8ta_conv2d_dw_global_wg_size()`: computes {W4, H, C4} dispatch size
   - `pick_q8ta_conv2d_dw_local_wg_size()`: adaptive local size based on tensor dims

5. Test updates:
   - Rename test to `test_q8_conv2d_dw.cpp`
   - Add `TestQ8taConv2d.cpp` with shared test utilities
ghstack-source-id: 338638549
@exported-using-ghexport

Differential Revision: [D92061368](https://our.internmc.facebook.com/intern/diff/D92061368/)
@SS-JIA SS-JIA force-pushed the gh/SS-JIA/401/orig branch from cb35c3e to b91589c Compare February 6, 2026 00:21
@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.

@SS-JIA SS-JIA merged commit 5bf5931 into main Feb 6, 2026
121 of 128 checks passed
@SS-JIA SS-JIA deleted the gh/SS-JIA/401/orig branch February 6, 2026 00:28
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