Skip to content

Commit dcd46a8

Browse files
mergennachinfacebook-github-bot
authored andcommitted
Arm backend: Refactor compile spec handling (Try 2) (#14191)
Summary: Pull Request resolved: #14191 Redoing #14111 with additional fixes Differential Revision: D82171193
1 parent 56d5186 commit dcd46a8

35 files changed

+748
-657
lines changed

backends/arm/TARGETS

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ python_library(
1414
"ethosu/partitioner.py"
1515
],
1616
deps = [
17-
":arm_partitioner",
17+
":arm_vela",
18+
":ethosu_compile_spec",
19+
"//executorch/backends/arm/tosa:partitioner",
1820
]
1921
)
2022
python_library(
@@ -25,7 +27,8 @@ python_library(
2527
"vgf/partitioner.py"
2628
],
2729
deps = [
28-
":arm_partitioner",
30+
":vgf_compile_spec",
31+
"//executorch/backends/arm/tosa:partitioner",
2932
]
3033
)
3134
python_library(
@@ -50,25 +53,11 @@ python_library(
5053
"//executorch/exir:lib",
5154
],
5255
)
56+
5357
python_library(
54-
name = "arm_partitioner",
55-
srcs = [
56-
"tosa/backend.py",
57-
"tosa/partitioner.py",
58-
],
59-
deps = [
60-
":arm_backend",
61-
":constants",
62-
"//executorch/backends/arm/debug:schema",
63-
"//executorch/backends/arm/operator_support:operator_support",
64-
"//executorch/backends/arm/_passes:passes",
65-
"//executorch/exir:lib",
66-
],
67-
)
68-
python_library(
69-
name = "arm_backend",
58+
name = "arm_compile_spec",
7059
srcs = [
71-
"arm_backend.py",
60+
"common/arm_compile_spec.py",
7261
],
7362
deps = [
7463
"fbsource//third-party/pypi/flatbuffers:flatbuffers",
@@ -79,11 +68,49 @@ python_library(
7968
"fbsource//third-party/tosa_tools/v1.00/serialization_lib/python/tosa:tosa",
8069
":arm_vela",
8170
":process_node",
71+
"//executorch/exir/backend:compile_spec_schema",
8272
"//executorch/backends/arm/operators:lib",
8373
"//executorch/backends/arm/operators:node_visitor",
8474
"//executorch/backends/arm/_passes:passes",
8575
],
8676
)
77+
78+
python_library(
79+
name = "ethosu_compile_spec",
80+
srcs = [
81+
"ethos/__init__.py",
82+
"ethosu/compile_spec.py",
83+
],
84+
deps = [
85+
":arm_compile_spec",
86+
"//executorch/backends/arm/tosa:specification",
87+
],
88+
)
89+
90+
python_library(
91+
name = "tosa_compile_spec",
92+
srcs = [
93+
"tosa/__init__.py",
94+
"tosa/compile_spec.py",
95+
],
96+
deps = [
97+
":arm_compile_spec",
98+
"//executorch/backends/arm/tosa:specification",
99+
],
100+
)
101+
102+
python_library(
103+
name = "vgf_compile_spec",
104+
srcs = [
105+
"vgf/__init__.py",
106+
"vgf/compile_spec.py",
107+
],
108+
deps = [
109+
":arm_compile_spec",
110+
"//executorch/backends/arm/tosa:specification",
111+
],
112+
)
113+
87114
python_library(
88115
name = "process_node",
89116
srcs = ["process_node.py"],

backends/arm/arm_backend.py

Lines changed: 0 additions & 245 deletions
This file was deleted.

0 commit comments

Comments
 (0)