Repository navigation
[executorch][cuda] Route strict-FP32 1-D convolutions with few output rows to the implicit-GEMM template - #25273
Conversation
🔗 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 PendingAs of commit 99279c2 with merge base fe24cf5 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
… 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
f9e479b to
99279c2
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: #25241 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/124/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/124/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/123/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/124/orig
Differential Revision: D130068466
@diff-train-skip-merge