Skip to content

[executorch][cuda] Route strict-FP32 1-D convolutions with few output rows to the implicit-GEMM template - #25273

Merged
Gasoonjia merged 1 commit into
gh/Gasoonjia/123/origfrom
gh/Gasoonjia/124/orig
Nov 19, 2026
Merged

Gasoonjia merged 1 commit into
gh/Gasoonjia/123/origfrom
gh/Gasoonjia/124/orig

Conversation

@pytorchbot

Copy link
Copy Markdown
Collaborator

@pytorch-bot

pytorch-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 38 Pending

As of commit 99279c2 with merge base fe24cf5 (image):
💚 Looks good so far! There are no failures yet. 💚

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 Nov 19, 2026
… rows to the implicit-GEMM template

Strict-FP32 1-D convolutions over short sequences with many channels read each weight for only a few outputs, so their cost is streaming the weights. Inductor's template, given the 2-D form the backend lowers them to, has a handful of output tiles for such a call and leaves most of the GPU idle: a 2048-channel kernel-5 convolution over 4 positions takes 690 us for 84 MB of weights.

`worth_routing` gains a 1-D range for the existing schedules, whose split-K spreads the weight reads over the GPU: strict FP32, kernel 5 or 3 with stride 1 and "same" padding, kernel 3 with stride 2 and padding 1, and transposed kernel 4 with stride 2 and padding 1, with 512 to 4096 input and 64 to 2048 output channels, 4 to 64 output rows (batch times output length) and contiguous layouts. Kernel-1 convolutions keep the regular lowering. The new `conv1d_boundary` suite measures its 64 corners: all are significantly faster than Inductor on an A100 (1.42-28.6x), reading the weights in their native layout.

`test_conv_routing.py` routes every corner and keeps one step past each limit, other geometries, TF32, BF16 and sliced inputs, and checks the 1-D and transposed 1-D rows through both lowering APIs.

This diff was authored with Claude Code.

Differential Revision: [D130068466](https://our.internmc.facebook.com/intern/diff/D130068466/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D130068466/)!


ghstack-source-id: 477683746
Pull-Request: #25241
@github-actions

Copy link
Copy Markdown

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.

@Gasoonjia
Gasoonjia merged commit 24f2fe9 into main Nov 19, 2026
@Gasoonjia
Gasoonjia deleted the gh/Gasoonjia/124/orig branch November 19, 2026 07:26
@Gasoonjia
Gasoonjia temporarily deployed to upload-benchmark-results November 19, 2026 09:14 — with GitHub Actions Inactive
@Gasoonjia
Gasoonjia temporarily deployed to upload-benchmark-results November 19, 2026 12:01 — with GitHub Actions Inactive

This branch was previously deployed

2 inactive deployments
upload-benchmark-results — 99279c27 Deployed Nov 19, 2026 by Gasoonjia
cadence — 99279c27 Deployed Nov 19, 2026 by Gasoonjia
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