Skip to content

Conversation

JacobSzwejbka
Copy link
Contributor

Summary: We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Differential Revision: D81466391

Copy link

pytorch-bot bot commented Sep 2, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit feebc19 with merge base 18263c2 (image):

NEW FAILURE - The following job has failed:

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

This pull request was exported from Phabricator. Differential Revision: D81466391

Copy link

github-actions bot commented Sep 2, 2025

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.

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 2, 2025
…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: hsharma35

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

This pull request was exported from Phabricator. Differential Revision: D81466391

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 2, 2025
…torch#13856)

Summary:
Pull Request resolved: pytorch#13856

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: hsharma35

Differential Revision: D81466391
@@ -32,6 +32,9 @@ class PreprocessResult:
# but retrieveable by delegates via the NamedDataMap at runtime.
data_store_output: Optional[NamedDataStoreOutput] = None

# Optional delegate-specific information that will be added to the lowered_module's metadata.
delegate_info: Optional[Any] = None
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems a little unstructured, but OK I guess. How about delegate_info_meta just to discourage people to put flatbuffers in here :p

Copy link
Contributor

Choose a reason for hiding this comment

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

How is it different than having it as part of the delegated blob? From the logic it looks like we just have this information as part of the preprocess result (the meaningful part if just the blob) and put it as part of the lowered module (which again still just the blob)

Copy link
Contributor

Choose a reason for hiding this comment

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

Doing anything with delegated blob means we need to disassemble - modify - assemble the blob again. This is not expected to be trivial for backends.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems a little unstructured, but OK I guess.

Intentionally so. Even ignoring the current motivation around shared memory planning, I think it is generically useful to let us have a mechanism to experiment with tightly coupled passes before promoting things to the backend api which we expect to be composable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How is it different than having it as part of the delegated blob?

Some delegate blobs are not trivial to unpack is the main motivation. AOTI for instance would just be compiled code iiuc.

Copy link
Contributor

Choose a reason for hiding this comment

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

@JacobSzwejbka

This is a meta information that won't be serialized as part of the PTE file, right?

If that's the case, can you document it here?

Also I'd like to rename delegate_info to be something like _delegate_info_meta or _delegate_info_internal or just _meta?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes it just gets added to the fxGraph. Updated the name and comment

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 3, 2025
…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: hsharma35

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

This pull request was exported from Phabricator. Differential Revision: D81466391

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 3, 2025
…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: hsharma35

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

This pull request was exported from Phabricator. Differential Revision: D81466391

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 3, 2025
…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: mergennachin, hsharma35

Differential Revision: D81466391
JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 3, 2025
…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: mergennachin, hsharma35

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

This pull request was exported from Phabricator. Differential Revision: D81466391

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81466391

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 3, 2025
…torch#13856)

Summary:
Pull Request resolved: pytorch#13856

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: mergennachin, hsharma35

Differential Revision: D81466391
JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 3, 2025
…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: mergennachin, hsharma35

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

This pull request was exported from Phabricator. Differential Revision: D81466391

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 3, 2025
…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: mergennachin, hsharma35

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

This pull request was exported from Phabricator. Differential Revision: D81466391

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 3, 2025
…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: mergennachin, hsharma35

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

This pull request was exported from Phabricator. Differential Revision: D81466391

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 3, 2025
…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: mergennachin, hsharma35

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

This pull request was exported from Phabricator. Differential Revision: D81466391

JacobSzwejbka added a commit to JacobSzwejbka/executorch-1 that referenced this pull request Sep 3, 2025
…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: mergennachin, hsharma35

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

This pull request was exported from Phabricator. Differential Revision: D81466391

…torch#13856)

Summary:

We want some delegates to be able to test experimental features that interact with the core runtime. Typically when doing this there is an expectation of tight coupling in the full lowering process so we arent super concerned about UX. The backend api is pretty hard to change because the code is mostly owned by 3rd parties, so we want to be really sure when we change it that its correct. By exposing this module.meta hookup we can test things in a controled maner without changing the blessed api before we are ready.

Reviewed By: mergennachin, hsharma35

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

This pull request was exported from Phabricator. Differential Revision: D81466391

@facebook-github-bot facebook-github-bot merged commit 32e82bc into pytorch:main Sep 4, 2025
115 of 118 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants