Skip to content

Commit 24bf54c

Browse files
JacobSzwejbkafacebook-github-bot
authored andcommitted
Refactor exir/__init__.py
Summary: We had been just dumping everything in `__init__.py` which hurts readibility and makes it difficult to reason about what symbols we are exposing as public. This is the first pass effort to try and move things out. Im not 100% sold on capture/_config.py but I think its moving in the right direction which is good enough for me with this diff. Reviewed By: angelayi Differential Revision: D47604227 fbshipit-source-id: 8dd7c6d36d6992d0f09245d3d7fb624fce22dee0
1 parent 3607a3a commit 24bf54c

File tree

13 files changed

+1195
-1008
lines changed

13 files changed

+1195
-1008
lines changed

backends/test/test_backends_nested.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def __init__(self) -> None:
8585
self.partition_tags = {}
8686

8787
def partition(
88-
self, edge_graph_module: exir.torch.fx.GraphModule
89-
) -> exir.torch.fx.GraphModule:
88+
self, edge_graph_module: torch.fx.GraphModule
89+
) -> torch.fx.GraphModule:
9090
partition_list = generate_pattern_op_partitions(
9191
edge_graph_module, op_support=self.op_support
9292
)

exir/TARGETS

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -121,25 +121,12 @@ python_library(
121121
"__init__.py",
122122
],
123123
deps = [
124-
"fbsource//third-party/pypi/sympy:sympy",
125-
":common", # @manual
126-
":control_flow", # @manual
127-
":dynamic_shape",
128-
":error",
129-
":pass_base", # @manual
130-
":pass_manager",
131-
":schema",
132124
":tracer",
133125
"//caffe2:torch",
134-
"//caffe2/functorch:functorch_src",
135-
"//executorch/bundled_program/serialize:lib", # @manual
136-
"//executorch/exir/dialects:lib", # @manual
126+
"//executorch/exir/capture:lib",
137127
"//executorch/exir/emit:lib",
138-
"//executorch/exir/passes:lib",
139-
"//executorch/exir/passes:remove_assert_async_pass",
140-
"//executorch/exir/passes:spec_prop_pass",
128+
"//executorch/exir/program:lib",
141129
"//executorch/exir/serialize:lib",
142-
"//executorch/exir/verification:verifier",
143130
],
144131
)
145132

0 commit comments

Comments
 (0)