Skip to content

[executorch][cuda] Describe a planned call by the implementations that can run it - #25276

Merged
Gasoonjia merged 1 commit into
gh/Gasoonjia/126/origfrom
gh/Gasoonjia/127/orig
Nov 19, 2026
Merged

Gasoonjia merged 1 commit into
gh/Gasoonjia/126/origfrom
gh/Gasoonjia/127/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/25276

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

⏳ No Failures, 29 Pending

As of commit 83dd011 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
@Gasoonjia
Gasoonjia added this pull request to stack #25281 November 19, 2026 06:45
…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
@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 e14cc36 into main Nov 19, 2026
@Gasoonjia
Gasoonjia deleted the gh/Gasoonjia/127/orig branch November 19, 2026 07:26
@Gasoonjia
Gasoonjia temporarily deployed to upload-benchmark-results November 19, 2026 08:26 — with GitHub Actions Inactive
@Gasoonjia
Gasoonjia temporarily deployed to upload-benchmark-results November 19, 2026 11:45 — with GitHub Actions Inactive

This branch was previously deployed

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