Skip to content

Commit d71c083

Browse files
[ExecuTorch][Export][1/N] Export API pipeline re-architecture, making it composable
Differential Revision: D79120574 Pull Request resolved: #12936
1 parent 8b98e8b commit d71c083

File tree

9 files changed

+1174
-911
lines changed

9 files changed

+1174
-911
lines changed

export/TARGETS

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ runtime.python_library(
1515
"//caffe2:torch",
1616
"//executorch/exir/backend:backend_api",
1717
"//executorch/exir:pass_manager",
18-
"//executorch/devtools/backend_debug:delegation_info",
1918
"//executorch/extension/export_util:export_util",
2019
]
2120
)
@@ -31,11 +30,35 @@ runtime.python_library(
3130
],
3231
deps = [
3332
":recipe",
33+
":stages",
34+
":types",
3435
"//executorch/runtime:runtime",
3536
":recipe_registry"
3637
]
3738
)
3839

40+
41+
runtime.python_library(
42+
name = "stages",
43+
srcs = [
44+
"stages.py",
45+
],
46+
visibility = [
47+
"//executorch/...",
48+
"@EXECUTORCH_CLIENTS",
49+
],
50+
deps = [
51+
":recipe",
52+
":types",
53+
"//executorch/devtools/backend_debug:delegation_info",
54+
"//executorch/exir/backend:backend_api",
55+
"//executorch/exir:pass_manager",
56+
"//caffe2:torch",
57+
"//executorch/devtools/backend_debug:delegation_info",
58+
]
59+
)
60+
61+
3962
runtime.python_library(
4063
name = "lib",
4164
srcs = [
@@ -48,8 +71,10 @@ runtime.python_library(
4871
deps = [
4972
":export",
5073
":recipe",
74+
":stages",
5175
":recipe_registry",
52-
":recipe_provider"
76+
":recipe_provider",
77+
":types",
5378
],
5479
)
5580

@@ -78,3 +103,10 @@ runtime.python_library(
78103
":recipe",
79104
]
80105
)
106+
107+
runtime.python_library(
108+
name = "types",
109+
srcs = [
110+
"types.py",
111+
],
112+
)

export/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
from .recipe import ExportRecipe, QuantizationRecipe, RecipeType
1919
from .recipe_provider import BackendRecipeProvider
2020
from .recipe_registry import recipe_registry
21-
21+
from .types import StageType
2222

2323
__all__ = [
24+
"StageType",
2425
"ExportRecipe",
2526
"QuantizationRecipe",
2627
"ExportSession",

0 commit comments

Comments
 (0)