Skip to content

Conversation

Gasoonjia
Copy link
Contributor

Summary:
This diff introduce partitioner for cuda delegated, which driven by aoti library.

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Differential Revision: D82987193

Copy link

pytorch-bot bot commented Sep 22, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14477

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

❌ 1 New Failure, 3 Unrelated Failures

As of commit e8a30b0 with merge base 7b33035 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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 Sep 22, 2025
@facebook-github-bot
Copy link
Contributor

@Gasoonjia has exported this pull request. If you are a Meta employee, you can view the originating diff in D82987193.

Gasoonjia added a commit to Gasoonjia/executorch-1 that referenced this pull request Sep 22, 2025
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Differential Revision: D82987193
Copy link

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 added a commit to Gasoonjia/executorch-1 that referenced this pull request Sep 22, 2025
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Differential Revision: D82987193
@facebook-github-bot
Copy link
Contributor

@Gasoonjia has exported this pull request. If you are a Meta employee, you can view the originating diff in D82987193.

Gasoonjia added a commit to Gasoonjia/executorch-1 that referenced this pull request Sep 22, 2025
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Reviewed By: larryliu0820

Differential Revision: D82987193
Gasoonjia added a commit to Gasoonjia/executorch-1 that referenced this pull request Sep 22, 2025
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Reviewed By: larryliu0820

Differential Revision: D82987193
@facebook-github-bot
Copy link
Contributor

@Gasoonjia has exported this pull request. If you are a Meta employee, you can view the originating diff in D82987193.

Gasoonjia added a commit to Gasoonjia/executorch-1 that referenced this pull request Sep 22, 2025
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Reviewed By: larryliu0820

Differential Revision: D82987193


@final
class CudaPartitioner(Partitioner):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark as experimental

do_not_decompose = set()

for node in ep.graph.nodes:
if node.op == "call_function" and isinstance(
Copy link
Contributor

@JacobSzwejbka JacobSzwejbka Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can aoti eat control flow hops?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't test that. Let me add a test later.

Gasoonjia added a commit to Gasoonjia/executorch-1 that referenced this pull request Sep 23, 2025
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Reviewed By: larryliu0820

Differential Revision: D82987193
Gasoonjia added a commit to Gasoonjia/executorch-1 that referenced this pull request Sep 23, 2025
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Reviewed By: larryliu0820

Differential Revision: D82987193
Gasoonjia added a commit to Gasoonjia/executorch-1 that referenced this pull request Sep 23, 2025
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Reviewed By: larryliu0820

Differential Revision: D82987193
@facebook-github-bot
Copy link
Contributor

@Gasoonjia has exported this pull request. If you are a Meta employee, you can view the originating diff in D82987193.

Gasoonjia added a commit to Gasoonjia/executorch-1 that referenced this pull request Sep 23, 2025
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Reviewed By: larryliu0820

Differential Revision: D82987193
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Reviewed By: larryliu0820

Differential Revision: D82987193
@facebook-github-bot
Copy link
Contributor

@Gasoonjia has exported this pull request. If you are a Meta employee, you can view the originating diff in D82987193.

Gasoonjia added a commit to Gasoonjia/executorch-1 that referenced this pull request Sep 23, 2025
Summary:

This diff introduce partitioner for cuda delegated, which driven by aoti library. 

The partitioner will partition the input into exactly one partitioned graph that contains all operators from the input graph, also will keep all operators (except the ops that couldn't handled by aoti-cuda lib) away from executorch operator decomposition. Operator will be decomposed in the cuda backend using aoti-cuda specific decomposition table.

Reviewed By: larryliu0820

Differential Revision: D82987193
@facebook-github-bot facebook-github-bot merged commit 44f3740 into pytorch:main Sep 24, 2025
126 of 132 checks passed
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. fb-exported meta-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants