Skip to content

Commit b8e242b

Browse files
committed
Update on "[ExecuTorch][#10447] Extend PyBundledModule with extension.BundledModule"
# Context This issue is a step of #9638. In #9638, we want to have `extension.Module` as the single source of implementation in `pybindings`, which means that `pybindings.PyModule` should use `extension.Module` rather than its own `pybindings.Module`. # Proposal Now that we have `extension.BundledModule` ready, we want to test it out by having our existing `PyBundledModule` to extend it, and let `verify_result_with_bundled_expected_output` to use it, so that we can test out the whole thing with https://github.com/pytorch/executorch/blob/fb45e19055a92d2a91a4d4b7008e135232cbb14b/devtools/bundled_program/test/test_end2end.py Differential Revision: [D73564127](https://our.internmc.facebook.com/intern/diff/D73564127/) [ghstack-poisoned]
2 parents f789337 + a3721e1 commit b8e242b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

extension/pybindings/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ CMAKE_ARGS="-DEXECUTORCH_BUILD_MPS=ON" ./install_executorch.sh
2727
- `_reset_profile_results()`: Reset profile results.
2828
## Classes
2929
### ExecuTorchModule
30-
- `load_bundled_input()`: Load bundled input.
31-
- `verify_result_with_bundled_expected_output(bundle: str, method_name: str, testset_idx: int, rtol: float = 1e-5, atol: float = 1e-8)`: Verify result with bundled expected output.
3230
- `plan_execute()`: Plan and execute.
3331
- `run_method()`: Run method.
3432
- `forward()`: Forward. This takes a pytree-flattend PyTorch-tensor-based input.
@@ -37,5 +35,6 @@ CMAKE_ARGS="-DEXECUTORCH_BUILD_MPS=ON" ./install_executorch.sh
3735
- `__call__()`: Call method.
3836
### BundledModule
3937
This class is currently empty and serves as a placeholder for future methods and attributes.
38+
- `verify_result_with_bundled_expected_output(method_name: str, testset_idx: int, rtol: float = 1e-5, atol: float = 1e-8)`: Verify result with bundled expected output.
4039
## Note
4140
All functions and methods are guarded by a call guard that redirects `cout` and `cerr` to the Python environment.

shim_et/xplat/executorch/extension/pybindings/pybindings.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ PORTABLE_MODULE_DEPS = [
1616
"//executorch/extension/data_loader:buffer_data_loader",
1717
"//executorch/extension/data_loader:mmap_data_loader",
1818
"//executorch/extension/memory_allocator:malloc_memory_allocator",
19+
"//executorch/extension/module:module",
1920
"//executorch/extension/module:bundled_module",
2021
"//executorch/runtime/executor/test:test_backend_compiler_lib",
2122
"//executorch/devtools/etdump:etdump_flatcc",
@@ -30,6 +31,7 @@ ATEN_MODULE_DEPS = [
3031
"//executorch/extension/data_loader:mmap_data_loader",
3132
"//executorch/extension/memory_allocator:malloc_memory_allocator",
3233
"//executorch/extension/module:bundled_module_aten",
34+
"//executorch/extension/module:module_aten",
3335
"//executorch/devtools/bundled_program:runtime_aten",
3436
"//executorch/runtime/executor/test:test_backend_compiler_lib_aten",
3537
"//executorch/devtools/etdump:etdump_flatcc",

0 commit comments

Comments
 (0)