Skip to content

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

@pytorch-bot
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.

❌ 1 New Failure, 2 Cancelled Jobs

As of commit 71a28f8 with merge base 6da7bde (image):

NEW FAILURE - The following job has failed:

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

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 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
@Conarnar Conarnar force-pushed the export-D77565018 branch from c891798 to b2a1132 Compare July 3, 2025 21:16
Conarnar added a commit to Conarnar/executorch that referenced this pull request Jul 3, 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 added a commit to Conarnar/executorch that referenced this pull request Jul 3, 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 b2a1132 to 366eb51 Compare July 3, 2025 21:17
@facebook-github-bot
Copy link
Contributor

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

Summary:
Pull Request resolved: pytorch#12158

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

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

@Conarnar Conarnar force-pushed the export-D77565018 branch from 366eb51 to 71a28f8 Compare July 3, 2025 21:21
Copy link
Contributor

@lucylq lucylq left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for fixing the memory issues and the thorough testing!

@facebook-github-bot facebook-github-bot merged commit 2f55193 into pytorch:main Jul 4, 2025
94 of 99 checks passed
Tanish2101 pushed a commit to Tanish2101/executorch that referenced this pull request Jul 9, 2025
Differential Revision: D77565018

Pull Request resolved: pytorch#12158
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.

3 participants