Skip to content

Add method variants in dynamic shim to use core tensor/evalue/result types #7834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

GregoryComer
Copy link
Member

Summary:
This change adds forward and execute methods to the dynamic shim interface that make use of the core executorch tensor, evalue, and result types. The intent is to allow users to use the "real" ET types, rather than TensorWrapper/EValueWrapper. There are several reasons to do this:

  1. Wrapper types are limited in functionality compared to the core types.
  2. We need to add more functionality to the wrappers as we support more models, leading to duplicated effort.
  3. API surface is inconsistent with ET documentation, which uses the core types.

This change should not introduce significant binary size changes, as these new methods are not currently used and are thus optimized out in release builds. When updating call sites to use the new methods and core ET types, impact is <= 5kB (see diffs in this stack). The ET core runtime is designed to be small, so directly including these types should not carry significant size overhead.

Differential Revision: D67650320

Copy link

pytorch-bot bot commented Jan 22, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 095e826 with merge base 6332238 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

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

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

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Feb 23, 2025
…types (pytorch#7834)

Summary:

This change adds forward and execute methods to the dynamic shim interface that make use of the core executorch tensor, evalue, and result types. The intent is to allow users to use the "real" ET types, rather than TensorWrapper/EValueWrapper. There are several reasons to do this:

1) Wrapper types are limited in functionality compared to the core types.
2) We need to add more functionality to the wrappers as we support more models, leading to duplicated effort.
3) API surface is inconsistent with ET documentation, which uses the core types.

This change should not introduce significant binary size changes, as these new methods are not currently used and are thus optimized out in release builds. When updating call sites to use the new methods and core ET types, impact is <= 5kB (see diffs in this stack). The ET core runtime is designed to be small, so directly including these types should not carry significant size overhead.

Reviewed By: digantdesai

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

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

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Mar 26, 2025
…types (pytorch#7834)

Summary:

This change adds forward and execute methods to the dynamic shim interface that make use of the core executorch tensor, evalue, and result types. The intent is to allow users to use the "real" ET types, rather than TensorWrapper/EValueWrapper. There are several reasons to do this:

1) Wrapper types are limited in functionality compared to the core types.
2) We need to add more functionality to the wrappers as we support more models, leading to duplicated effort.
3) API surface is inconsistent with ET documentation, which uses the core types.

This change should not introduce significant binary size changes, as these new methods are not currently used and are thus optimized out in release builds. When updating call sites to use the new methods and core ET types, impact is <= 5kB (see diffs in this stack). The ET core runtime is designed to be small, so directly including these types should not carry significant size overhead.

Reviewed By: digantdesai

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

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

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Mar 26, 2025
…types (pytorch#7834)

Summary:

This change adds forward and execute methods to the dynamic shim interface that make use of the core executorch tensor, evalue, and result types. The intent is to allow users to use the "real" ET types, rather than TensorWrapper/EValueWrapper. There are several reasons to do this:

1) Wrapper types are limited in functionality compared to the core types.
2) We need to add more functionality to the wrappers as we support more models, leading to duplicated effort.
3) API surface is inconsistent with ET documentation, which uses the core types.

This change should not introduce significant binary size changes, as these new methods are not currently used and are thus optimized out in release builds. When updating call sites to use the new methods and core ET types, impact is <= 5kB (see diffs in this stack). The ET core runtime is designed to be small, so directly including these types should not carry significant size overhead.

Reviewed By: digantdesai

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

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

@facebook-github-bot
Copy link
Contributor

@GregoryComer has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Mar 26, 2025
…types (pytorch#7834)

Summary:
This change adds forward and execute methods to the dynamic shim interface that make use of the core executorch tensor, evalue, and result types. The intent is to allow users to use the "real" ET types, rather than TensorWrapper/EValueWrapper. There are several reasons to do this:

1) Wrapper types are limited in functionality compared to the core types.
2) We need to add more functionality to the wrappers as we support more models, leading to duplicated effort.
3) API surface is inconsistent with ET documentation, which uses the core types.

This change should not introduce significant binary size changes, as these new methods are not currently used and are thus optimized out in release builds. When updating call sites to use the new methods and core ET types, impact is <= 5kB (see diffs in this stack). The ET core runtime is designed to be small, so directly including these types should not carry significant size overhead.


Reviewed By: metascroy

Differential Revision: D67650320

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

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

GregoryComer added a commit to GregoryComer/executorch that referenced this pull request Mar 26, 2025
…types (pytorch#7834)

Summary:
This change adds forward and execute methods to the dynamic shim interface that make use of the core executorch tensor, evalue, and result types. The intent is to allow users to use the "real" ET types, rather than TensorWrapper/EValueWrapper. There are several reasons to do this:

1) Wrapper types are limited in functionality compared to the core types.
2) We need to add more functionality to the wrappers as we support more models, leading to duplicated effort.
3) API surface is inconsistent with ET documentation, which uses the core types.

This change should not introduce significant binary size changes, as these new methods are not currently used and are thus optimized out in release builds. When updating call sites to use the new methods and core ET types, impact is <= 5kB (see diffs in this stack). The ET core runtime is designed to be small, so directly including these types should not carry significant size overhead.


Reviewed By: metascroy

Differential Revision: D67650320

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

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

…types (pytorch#7834)

Summary:
This change adds forward and execute methods to the dynamic shim interface that make use of the core executorch tensor, evalue, and result types. The intent is to allow users to use the "real" ET types, rather than TensorWrapper/EValueWrapper. There are several reasons to do this:

1) Wrapper types are limited in functionality compared to the core types.
2) We need to add more functionality to the wrappers as we support more models, leading to duplicated effort.
3) API surface is inconsistent with ET documentation, which uses the core types.

This change should not introduce significant binary size changes, as these new methods are not currently used and are thus optimized out in release builds. When updating call sites to use the new methods and core ET types, impact is <= 5kB (see diffs in this stack). The ET core runtime is designed to be small, so directly including these types should not carry significant size overhead.


Reviewed By: metascroy

Differential Revision: D67650320

Pulled By: GregoryComer
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot merged commit 976fe48 into pytorch:main Mar 27, 2025
82 of 83 checks passed
kirklandsign pushed a commit that referenced this pull request Apr 11, 2025
…types

Differential Revision: D67650320

Pull Request resolved: #7834
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 topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants