You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[executorch][cuda] Add triton::convolution and the conv routing framework - #25084
The backend's Triton kernels have no convolution entry point. ATen spreads convolutions over many overloads whose arguments cannot express asymmetric or "same" padding once lowered, and Inductor's templates cannot compile some convolutions at all (dilated, most transposed and 1-D ones).
This diff adds triton::convolution, one canonical op with explicit padding_before/padding_after and separately defined forward and transposed semantics. bind_conv maps every ATen convolution overload of both lowering APIs to it, filling defaults and validating the arguments. out_shape_and_stride computes the output layout ATen's CUDA convolution returns; the op body and its fake share it, so the output is allocated once and templates only write into it. Templates declare supports(), worth_routing() and schedules, and force_conv_candidate lets tests run one schedule. conv.routing.plan is the planner for every convolution overload: it refuses symbolic shapes, non-CUDA inputs, ROCm and calls whose output layout differs from the node's, and marks calls Inductor cannot compile as REQUIRED. No template is registered yet, so lowering is unchanged.
test_conv_binding.py checks the binding, canonical arguments and output layouts against ATen; test_conv_routing.py checks the routing gates and failure contract on graphs from both lowering APIs, without a GPU.
meta-claBot
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 14, 2026
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"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.meta-exported
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
The backend's Triton kernels have no convolution entry point. ATen spreads convolutions over many overloads whose arguments cannot express asymmetric or "same" padding once lowered, and Inductor's templates cannot compile some convolutions at all (dilated, most transposed and 1-D ones).
This diff adds
triton::convolution, one canonical op with explicitpadding_before/padding_afterand separately defined forward and transposed semantics.bind_convmaps every ATen convolution overload of both lowering APIs to it, filling defaults and validating the arguments.out_shape_and_stridecomputes the output layout ATen's CUDA convolution returns; the op body and its fake share it, so the output is allocated once and templates only write into it. Templates declaresupports(),worth_routing()and schedules, andforce_conv_candidatelets tests run one schedule.conv.routing.planis the planner for every convolution overload: it refuses symbolic shapes, non-CUDA inputs, ROCm and calls whose output layout differs from the node's, and marks calls Inductor cannot compile as REQUIRED. No template is registered yet, so lowering is unchanged.test_conv_binding.pychecks the binding, canonical arguments and output layouts against ATen;test_conv_routing.pychecks the routing gates and failure contract on graphs from both lowering APIs, without a GPU.This diff was authored with Claude Code.
Differential Revision: D129595183
NOTE FOR REVIEWERS: This PR has internal Meta-specific changes or comments, please review them on Phabricator!