Repository navigation
[executorch][cuda] Describe a planned call by the implementations that can run it - #25276
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25276
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 29 PendingAs of commit 83dd011 with merge base fe24cf5 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…t can run it A planner of the Triton replacement pass classified each call as required, optional or unsupported. The three routes encode one question indirectly: which implementations, the regular lowering (Inductor) or the family's replacement, can run the call, and which one is preferred. The next change needs that list explicitly, to pick among implementations by measuring them. This diff replaces the routes with candidates. A planner returns a `ReplacementPlan` listing the regular lowering and the replacement, each with the reason it cannot run the call (None if it can), plus its static choice and the reason for it. The pass fails the export with every reason when no candidate can run the call, uses the only one that can, and otherwise takes the static choice. A failed rewrite keeps the node if the regular lowering can run it and raises otherwise, as before. A plan is validated when built: it lists the regular lowering and one differently named replacement, a replacement that can run the call carries its kernel and arguments, and the static choice must be a legal candidate. The conv planner is converted with its decisions unchanged (`regular_lowering_gap` marks the regular lowering unavailable; `worth_routing` makes the static choice), except that a convolution nothing can run now fails at the replacement pass with both reasons instead of later in the AOTI compile. Tests cover each candidate combination, plan validation and the failure contract; the conv routing tests now assert the candidates. This diff was authored with Claude Code. Differential Revision: [D130871520](https://our.internmc.facebook.com/intern/diff/D130871520/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D130871520/)! ghstack-source-id: 477683762 Pull-Request: #25244
032a7f0 to
83dd011
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: #25244 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/127/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/127/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/126/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/Gasoonjia/127/orig
Differential Revision: D130871520
@diff-train-skip-merge