Skip to content

Commit 8da4a6e

Browse files
authored
Arm backend: Refactor compile spec handling (Try 2) (#14191)
Summary: Redoing #14111 with additional fixes Differential Revision: D82171193 cc @digantdesai @freddan80 @per @zingo @oscarandersson8218
1 parent 323a9e8 commit 8da4a6e

35 files changed

+735
-667
lines changed

backends/arm/TARGETS

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,6 @@
66
# @noautodeps
77
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
88

9-
runtime.python_library(
10-
name = "ethosu_partitioner",
11-
srcs = [
12-
"ethosu/__init__.py",
13-
"ethosu/backend.py",
14-
"ethosu/partitioner.py"
15-
],
16-
deps = [
17-
":arm_vela",
18-
"//executorch/backends/arm/tosa:arm_partitioner",
19-
]
20-
)
21-
runtime.python_library(
22-
name = "vgf_partitioner",
23-
srcs = [
24-
"vgf/__init__.py",
25-
"vgf/backend.py",
26-
"vgf/partitioner.py"
27-
],
28-
deps = [
29-
"//executorch/backends/arm/tosa:arm_partitioner",
30-
]
31-
)
329
runtime.python_library(
3310
name = "constants",
3411
srcs = [
@@ -51,10 +28,11 @@ runtime.python_library(
5128
"//executorch/exir:lib",
5229
],
5330
)
31+
5432
runtime.python_library(
55-
name = "arm_backend",
33+
name = "arm_compile_spec",
5634
srcs = [
57-
"arm_backend.py",
35+
"common/arm_compile_spec.py",
5836
],
5937
deps = [
6038
"fbsource//third-party/pypi/flatbuffers:flatbuffers",
@@ -64,11 +42,43 @@ runtime.python_library(
6442
"fbsource//third-party/tosa_tools/v0.80/serialization_lib/python/tosa:tosa",
6543
"fbsource//third-party/tosa_tools/v1.00/serialization_lib/python/tosa:tosa",
6644
":process_node",
45+
"//executorch/exir/backend:compile_spec_schema",
6746
"//executorch/backends/arm/operators:lib",
6847
"//executorch/backends/arm/operators:node_visitor",
6948
"//executorch/backends/arm/_passes:passes",
7049
],
7150
)
51+
runtime.python_library(
52+
name = "ethosu",
53+
srcs = [
54+
"ethosu/__init__.py",
55+
"ethosu/backend.py",
56+
"ethosu/compile_spec.py",
57+
"ethosu/partitioner.py",
58+
],
59+
deps = [
60+
":arm_compile_spec",
61+
":arm_vela",
62+
"//executorch/backends/arm/tosa:specification",
63+
"//executorch/backends/arm/tosa:partitioner",
64+
],
65+
)
66+
67+
runtime.python_library(
68+
name = "vgf",
69+
srcs = [
70+
"vgf/__init__.py",
71+
"vgf/backend.py",
72+
"vgf/compile_spec.py",
73+
"vgf/partitioner.py",
74+
],
75+
deps = [
76+
":arm_compile_spec",
77+
"//executorch/backends/arm/tosa:specification",
78+
"//executorch/backends/arm/tosa:partitioner",
79+
],
80+
)
81+
7282
runtime.python_library(
7383
name = "process_node",
7484
srcs = ["process_node.py"],

backends/arm/arm_backend.py

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

0 commit comments

Comments
 (0)