Skip to content

[executorch][cuda] Weight-streaming schedule for 1-D convolutions with few output rows - #25274

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

Gasoonjia merged 1 commit into
gh/Gasoonjia/124/origfrom
gh/Gasoonjia/125/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/25274

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

⏳ No Failures, 46 Pending

As of commit e1cf5ee 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
…h few output rows

Strict-FP32 1-D convolutions with few output rows are bound by reading their weights, but the implicit-GEMM schedules read them at 110-250 GB/s on an A100: `tl.dot` needs at least 16 rows per tile, and an FMA tile spends its time staging operands rather than streaming weights. A 2048-channel kernel-5 convolution over 4 positions took 502 us for 84 MB of weights.

The implicit-GEMM template gains `stream_ffma`, one more compile-time candidate for forward 1-D convolutions with at most 64 output rows and a contiguous weight. Each program reads blocks of the native `[C_out, C_in * taps]` weight along its contiguous axis, multiplies them in FP32 with the im2col block of all rows held in registers, and accumulates without `tl.dot`; K is split over a second grid axis and a reduction kernel adds the partial sums in split order before adding the bias and storing. Block sizes and the split count are autotune configs. The 2048-channel convolution now takes 96 us. With it, the 1-D range also takes 2049 to 4096 output channels: the `conv1d_boundary` suite's 64 corners are all significantly faster than Inductor (1.70-51.6x).

`test_conv_implicit_gemm.py` runs `stream_ffma` wherever it is legal, with every config, deep and shallow reductions, the most rows, strided inputs and output layouts, and checks the calls it refuses.

This diff was authored with Claude Code.

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

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


ghstack-source-id: 477683769
Pull-Request: #25242
@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 d9ab059 into main Nov 19, 2026
@Gasoonjia
Gasoonjia deleted the gh/Gasoonjia/125/orig branch November 19, 2026 07:26
@Gasoonjia
Gasoonjia temporarily deployed to upload-benchmark-results November 19, 2026 09:09 — with GitHub Actions Inactive
@Gasoonjia
Gasoonjia temporarily deployed to upload-benchmark-results November 19, 2026 11:54 — with GitHub Actions Inactive

This branch was previously deployed

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