Skip to content

Added Pybindings for Method.h/cpp #12158

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Conarnar
Copy link
Contributor

@Conarnar Conarnar commented Jul 2, 2025

Summary:
Continuing with migrating the pybindings API to expose the lower level ET API rather than just the Module level. The next step of that is to add pybindings for Method.

Bindings for the class Method and its methods set_inputs, execute, get_outputs, get_attribute, and method_meta were added along with call and __call__ in order to easily call set_inputs, execute, and get_outputs all at once.

The method_meta method for Program was also added.

The MethodMeta binding was modified to include a shared reference to Program instead of Module if the Module API isn't used.

The Program and Method classes in __init__.py were modified to hold their pybinding equivalent rather than Module.

Differential Revision: D77565018

Copy link

pytorch-bot bot commented Jul 2, 2025

🔗 Helpful Links

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

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

❌ 2 Cancelled Jobs

As of commit c891798 with merge base ae9d1eb (image):

CANCELLED JOBS - The following jobs were cancelled. Please retry:

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

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

@Conarnar Conarnar requested a review from GregoryComer July 2, 2025 07:39
Conarnar added a commit to Conarnar/executorch that referenced this pull request Jul 2, 2025
Summary:

Continuing with migrating the pybindings API to expose the lower level ET API rather than just the `Module` level. The next step of that is to add pybindings for `Method`.

Bindings for the class Method and its methods `set_inputs`, `execute, get_outputs`, `get_attribute`, and `method_meta` were added along with `call` and `__call__` in order to easily call `set_inputs`, `execute`, and `get_outputs` all at once.

The `method_meta` method for `Program` was also added.

The `MethodMeta` binding was modified to include a shared reference to `Program` instead of `Module` if the `Module` API isn't used.

The `Program` and `Method` classes in `__init__.py` were modified to hold their pybinding equivalent rather than Module.

Differential Revision: D77565018
@Conarnar Conarnar force-pushed the export-D77565018 branch from e5148d6 to 27cd708 Compare July 2, 2025 18:47
@facebook-github-bot
Copy link
Contributor

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

Summary:

Continuing with migrating the pybindings API to expose the lower level ET API rather than just the `Module` level. The next step of that is to add pybindings for `Method`.

Bindings for the class Method and its methods `set_inputs`, `execute, get_outputs`, `get_attribute`, and `method_meta` were added along with `call` and `__call__` in order to easily call `set_inputs`, `execute`, and `get_outputs` all at once.

The `method_meta` method for `Program` was also added.

The `MethodMeta` binding was modified to include a shared reference to `Program` instead of `Module` if the `Module` API isn't used.

The `Program` and `Method` classes in `__init__.py` were modified to hold their pybinding equivalent rather than Module.

Differential Revision: D77565018
@Conarnar Conarnar force-pushed the export-D77565018 branch from 27cd708 to c891798 Compare July 2, 2025 21:27
@facebook-github-bot
Copy link
Contributor

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

@Conarnar Conarnar added release notes: none Do not include this in the release notes release notes: api Changes to public facing apis (any interfaces, pybinded runtime methods, etc.) and removed release notes: none Do not include this in the release notes labels Jul 2, 2025
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 release notes: api Changes to public facing apis (any interfaces, pybinded runtime methods, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants