Repository navigation
[executorch][cuda] Weight-streaming schedule for 1-D convolutions with few output rows - #25274
Conversation
🔗 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 PendingAs of commit e1cf5ee with merge base fe24cf5 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…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
9d21044 to
e1cf5ee
Compare
This PR needs a
|
This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #25242 by @Gasoonjia
^ 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/Gasoonjia/125/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/125/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/124/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/125/orig
Differential Revision: D130148517
@diff-train-skip-merge