Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions exir/backend/backend_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,8 @@ def to_backend(
fake_edge_program = copy.deepcopy(edge_program)
partitioner_result = partitioner_instance(fake_edge_program)
tagged_exported_program = partitioner_result.tagged_exported_program
tagged_exported_program.example_inputs = edge_program.example_inputs

method_to_tagged_exported_program[method_name] = tagged_exported_program

# Check that the partitioner did not modify the original graph
Expand Down
18 changes: 18 additions & 0 deletions exir/backend/test/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,21 @@ python_unittest(
"//executorch/exir/backend/canonical_partitioners:group_partitioner_lib",
],
)

python_unittest(
name = "test_example_input_of_submodule",
srcs = [
"test_submodule_example_inputs.py",
],
deps = [
"//caffe2:torch",
"//executorch/exir:lib",
"//executorch/exir:lowered_backend_module",
"//executorch/exir/backend:backend_details",
"//executorch/exir/backend:compile_spec_schema",
"//executorch/exir/backend:partitioner",
"//executorch/exir/backend/test/demos/rpc:executor_backend_preprocess",
"//executorch/exir/backend:utils",
"//executorch/exir/dialects:lib",
],
)
Loading
Loading