Skip to content

Commit 90153fa

Browse files
authored
Arm backend: Move vgf files to own folder (#13862)
Follow structure in ethosu folder. Signed-off-by: Erik Lundell <[email protected]>
1 parent 6c12956 commit 90153fa

File tree

8 files changed

+35
-7
lines changed

8 files changed

+35
-7
lines changed

backends/arm/TARGETS

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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+
16
# @noautodeps
27
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")
38

@@ -12,6 +17,17 @@ python_library(
1217
":arm_partitioner",
1318
]
1419
)
20+
python_library(
21+
name = "vgf_partitioner",
22+
srcs = [
23+
"vgf/__init__.py",
24+
"vgf/backend.py",
25+
"vgf/partitioner.py"
26+
],
27+
deps = [
28+
":arm_partitioner",
29+
]
30+
)
1531
python_library(
1632
name = "constants",
1733
srcs = [
@@ -39,8 +55,6 @@ python_library(
3955
srcs = [
4056
"tosa/backend.py",
4157
"tosa/partitioner.py",
42-
"vgf_backend.py",
43-
"vgf_partitioner.py",
4458
],
4559
deps = [
4660
":arm_backend",

backends/arm/test/misc/test_extract_io_params_tosa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from executorch.backends.arm.test.common import SkipIfNoModelConverter
1818
from executorch.backends.arm.tosa import TosaSpecification
1919
from executorch.backends.arm.tosa.partitioner import TOSAPartitioner
20-
from executorch.backends.arm.vgf_partitioner import VgfPartitioner
20+
from executorch.backends.arm.vgf import VgfPartitioner
2121
from executorch.exir import to_edge_transform_and_lower
2222
from executorch.exir.passes.quantize_io_pass import extract_io_quant_params
2323
from torchao.quantization.pt2e.quantize_pt2e import convert_pt2e, prepare_pt2e

backends/arm/test/tester/arm_tester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
from executorch.backends.arm.tosa.partitioner import TOSAPartitioner
6464
from executorch.backends.arm.tosa.specification import get_tosa_spec
6565

66-
from executorch.backends.arm.vgf_partitioner import VgfPartitioner
66+
from executorch.backends.arm.vgf import VgfPartitioner
6767

6868
from executorch.backends.test.harness.stages import Stage, StageType
6969
from executorch.backends.xnnpack.test.tester import Tester

backends/arm/vgf/__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 VgfBackend # noqa: F401
9+
from .partitioner import VgfPartitioner # noqa: F401
10+
11+
__all__ = [
12+
"VgfBackend",
13+
"VgfPartitioner",
14+
]
File renamed without changes.

backends/arm/vgf_partitioner.py renamed to backends/arm/vgf/partitioner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
is_vgf,
1212
) # usort: skip
1313
from executorch.backends.arm.tosa.partitioner import TOSAPartitioner
14-
from executorch.backends.arm.vgf_backend import VgfBackend
14+
from executorch.backends.arm.vgf import VgfBackend
1515
from executorch.exir.backend.compile_spec_schema import CompileSpec
1616
from executorch.exir.backend.partitioner import DelegationSpec
1717
from torch.fx.passes.operator_support import OperatorSupportBase

examples/arm/aot_arm_compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
MobileNetV2Evaluator,
4141
)
4242

43-
from executorch.backends.arm.vgf_partitioner import VgfPartitioner
43+
from executorch.backends.arm.vgf import VgfPartitioner
4444

4545
# To use Cortex-M backend
4646
from executorch.backends.cortex_m.passes.quantized_op_fusion_pass import (

examples/arm/vgf_minimal_example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
"outputs": [],
182182
"source": [
183183
"import os\n",
184-
"from executorch.backends.arm.vgf_partitioner import VgfPartitioner\n",
184+
"from executorch.backends.arm.vgf import VgfPartitioner\n",
185185
"from executorch.exir import (\n",
186186
" EdgeCompileConfig,\n",
187187
" ExecutorchBackendConfig,\n",

0 commit comments

Comments
 (0)