Skip to content

Use specialization constants for conv2d params in q8ta shaders#18178

Open
SS-JIA wants to merge 1 commit intopytorch:mainfrom
SS-JIA:export-D96503584
Open

Use specialization constants for conv2d params in q8ta shaders#18178
SS-JIA wants to merge 1 commit intopytorch:mainfrom
SS-JIA:export-D96503584

Conversation

@SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented Mar 13, 2026

Summary:
Replace Conv2DParams UBO with specialization constants in q8ta_conv2d,
q8ta_conv2d_dw, and q8ta_im2col shaders. This allows the GPU compiler to
treat conv params (kernel size, stride, padding, dilation, groups) as
compile-time constants, enabling loop unrolling, dead code elimination,
and constant folding.

Differential Revision: D96503584

Summary:
Replace Conv2DParams UBO with specialization constants in q8ta_conv2d,
q8ta_conv2d_dw, and q8ta_im2col shaders. This allows the GPU compiler to
treat conv params (kernel size, stride, padding, dilation, groups) as
compile-time constants, enabling loop unrolling, dead code elimination,
and constant folding.

Differential Revision: D96503584
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 13, 2026

🔗 Helpful Links

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

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

❌ 3 New Failures, 4 Pending, 1 Unrelated Failure

As of commit b194df5 with merge base 4f900b2 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

  • pull / test-binary-size-linux-gcc / linux-job (gh) (trunk failure)
    /pytorch/executorch/kernels/portable/cpu/op_convolution.cpp:175:41: error: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-codesync
Copy link
Contributor

meta-codesync bot commented Mar 13, 2026

@SS-JIA has exported this pull request. If you are a Meta employee, you can view the originating Diff in D96503584.

@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 Mar 13, 2026
@github-actions
Copy link

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. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant