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: 1 addition & 1 deletion docs/source/compiler-custom-compiler-passes.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ Args:
* `graph_module (fx.GraphModule)`: Module that we want to partition
* `patterns (List[torch.fx.Graph])`: A list of patterns in the form of
torch.fx.Graph. These graphs can be obtained through the `graph` field from a
GraphModule obtained by exir.capture (recommended) or symbolic tracing (which
GraphModule obtained by torch.export (recommended) or symbolic tracing (which
might not result in an accurate edge dialect graph), or by manual crafting a
graph module.
* `op_support (OperatorSupportBase)`: A OperatorSupportBase that can be created
Expand Down
13 changes: 1 addition & 12 deletions exir/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@

from typing import Any

from executorch.exir.capture import (
_capture_legacy_do_not_use,
CallSpec,
capture,
CaptureConfig,
EdgeCompileConfig,
ExecutorchBackendConfig,
)
from executorch.exir.capture import EdgeCompileConfig, ExecutorchBackendConfig
from executorch.exir.emit import emit_program, EmitterOutput
from executorch.exir.program import (
_to_edge,
Expand All @@ -34,9 +27,6 @@
__all__ = [
"emit_program",
"EmitterOutput",
"capture",
"_capture_legacy_do_not_use",
"CallSpec",
"ExportedProgram",
"ExirExportedProgram",
"ExecutorchProgram",
Expand All @@ -47,7 +37,6 @@
"EdgeProgramManager",
"ExecutorchProgramManager",
"edge_to_executorch_passes",
"CaptureConfig",
"EdgeCompileConfig",
"ExecutorchBackendConfig",
"Value",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def generate_pattern_op_partitions(
graph_module: Module that we want to partition
patterns: A list of patterns in the form of torch.fx.Graph. These graphs
can be obtained through the `graph` field from a GraphModule obtained by
exir.capture (recommended) or symbolic tracing (which might not result
torch.export (recommended) or symbolic tracing (which might not result
in an accurate edge dialect graph), or by manual crafting a graph
module.
partitions_list: A list of node lists whose nodes are intended to be tagged
Expand Down
13 changes: 3 additions & 10 deletions exir/capture/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,18 @@ fbcode_target(_kind = runtime.python_library,
"__init__.py",
],
deps = [
":capture",
":config",
":utils",
],
)

fbcode_target(_kind = runtime.python_library,
name = "capture",
name = "utils",
srcs = [
"_capture.py",
"_utils.py",
],
deps = [
":config",
"//caffe2:torch",
"//executorch/exir:error",
"//executorch/exir:tracer",
"//executorch/exir/program:lib",
"//executorch/exir/program:program",
"//executorch/exir/verification:verifier",
],
)

Expand All @@ -45,7 +39,6 @@ fbcode_target(_kind = runtime.python_library,
"//caffe2:torch",
"//executorch/exir:dynamic_shape",
"//executorch/exir:pass_manager",
"//executorch/exir:tracer",
"//executorch/exir/passes:lib",
"//executorch/exir/passes:propagate_device_config",
"//executorch/exir/passes:sym_shape_eval_pass",
Expand Down
16 changes: 1 addition & 15 deletions exir/capture/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,9 @@

# pyre-strict

from executorch.exir.capture._capture import (
_capture_legacy_do_not_use,
CallSpec,
capture,
)

from executorch.exir.capture._config import (
CaptureConfig,
EdgeCompileConfig,
ExecutorchBackendConfig,
)
from executorch.exir.capture._config import EdgeCompileConfig, ExecutorchBackendConfig

__all__ = [
"CallSpec",
"capture",
"_capture_legacy_do_not_use",
"CaptureConfig",
"EdgeCompileConfig",
"ExecutorchBackendConfig",
]
Loading