Skip to content

Commit 27cd708

Browse files
Conarnarfacebook-github-bot
authored andcommitted
Added Pybindings for Method.h/cpp (#12158)
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
1 parent 22b9e59 commit 27cd708

File tree

4 files changed

+940
-45
lines changed

4 files changed

+940
-45
lines changed

extension/pybindings/portable_lib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
_reset_profile_results, # noqa: F401
5050
_unsafe_reset_threadpool, # noqa: F401
5151
BundledModule, # noqa: F401
52+
ExecuTorchMethod, # noqa: F401
5253
ExecuTorchModule, # noqa: F401
5354
ExecuTorchProgram, # noqa: F401
5455
MethodMeta, # noqa: F401

0 commit comments

Comments
 (0)