Skip to content

Commit 439bb6c

Browse files
authored
Arm backend: Create ethosu directory (#11849)
Differential Revision: D77349641 Pull Request resolved: #12338
1 parent cf92b51 commit 439bb6c

File tree

9 files changed

+32
-8
lines changed

9 files changed

+32
-8
lines changed

backends/arm/TARGETS

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
# @noautodeps
22
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
3+
4+
python_library(
5+
name = "ethosu_partitioner",
6+
srcs = [
7+
"ethosu/__init__.py",
8+
"ethosu/backend.py",
9+
"ethosu/partitioner.py"
10+
],
11+
deps = [
12+
":arm_partitioner",
13+
]
14+
)
315
python_library(
416
name = "arm_partitioner",
517
srcs = [
6-
"ethosu_backend.py",
7-
"ethosu_partitioner.py",
818
"tosa_backend.py",
919
"tosa_partitioner.py",
1020
"vgf_backend.py",

backends/arm/ethosu/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2025 Arm Limited and/or its affiliates.
2+
#
3+
# This source code is licensed under the BSD-style license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
#
6+
# pyre-unsafe
7+
8+
from .backend import EthosUBackend # noqa: F401
9+
from .partitioner import EthosUPartitioner # noqa: F401
10+
11+
__all__ = [
12+
"EthosUBackend",
13+
"EthosUPartitioner",
14+
]
File renamed without changes.

backends/arm/ethosu_partitioner.py renamed to backends/arm/ethosu/partitioner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from executorch.backends.arm.arm_backend import (
1111
is_ethosu,
1212
) # usort: skip
13-
from executorch.backends.arm.ethosu_backend import EthosUBackend
13+
from executorch.backends.arm.ethosu import EthosUBackend
1414
from executorch.backends.arm.tosa_partitioner import TOSAPartitioner
1515
from executorch.exir.backend.compile_spec_schema import CompileSpec
1616
from executorch.exir.backend.partitioner import DelegationSpec

backends/arm/test/TARGETS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ python_library(
4141
deps = [
4242
":common",
4343
"//executorch/backends/xnnpack/test/tester:tester",
44-
"//executorch/backends/arm:arm_partitioner",
44+
"//executorch/backends/arm:ethosu_partitioner",
4545
"//executorch/backends/arm/quantizer:lib",
4646
"//executorch/backends/arm:tosa_mapping",
4747
"//executorch/devtools/backend_debug:delegation_info",

backends/arm/test/tester/arm_tester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
is_tosa,
4040
is_vgf,
4141
)
42-
from executorch.backends.arm.ethosu_partitioner import EthosUPartitioner
42+
from executorch.backends.arm.ethosu import EthosUPartitioner
4343
from executorch.backends.arm.quantizer import (
4444
EthosUQuantizer,
4545
get_symmetric_quantization_config,

docs/source/backends-arm-ethos-u.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The example below demonstrates the lowering processs of a MobileNet V2 model fro
2323
```python
2424
import torch
2525
from executorch.backends.arm.arm_backend import ArmCompileSpecBuilder
26-
from executorch.backends.arm.ethosu_partitioner import EthosUPartitioner
26+
from executorch.backends.arm.ethosu import EthosUPartitioner
2727
from executorch.backends.arm.quantizer.arm_quantizer import (
2828
EthosUQuantizer,
2929
get_symmetric_quantization_config,

examples/arm/aot_arm_compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
is_tosa,
2525
is_vgf,
2626
)
27-
from executorch.backends.arm.ethosu_partitioner import EthosUPartitioner
27+
from executorch.backends.arm.ethosu import EthosUPartitioner
2828
from executorch.backends.arm.quantizer import (
2929
EthosUQuantizer,
3030
get_symmetric_quantization_config,

examples/arm/ethos_u_minimal_example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"outputs": [],
139139
"source": [
140140
"import os\n",
141-
"from executorch.backends.arm.ethosu_partitioner import EthosUPartitioner\n",
141+
"from executorch.backends.arm.ethosu import EthosUPartitioner\n",
142142
"from executorch.exir import (\n",
143143
" EdgeCompileConfig,\n",
144144
" ExecutorchBackendConfig,\n",

0 commit comments

Comments
 (0)