Skip to content

Commit 1a086f0

Browse files
committed
Arm backend: Add experimental support for TOSA 1.1 serialiasation
Note: In order to serialize to TOSA 1.1 the main branch of the tosa-tools needs to be installed. Signed-off-by: Per Åstrand <per.astrand@arm.com> Change-Id: I112a101c8a92c9d9bae3df9099d88faf0916b597
1 parent fad6c6e commit 1a086f0

45 files changed

Lines changed: 6 additions & 169 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

backends/arm/operators/op_abs.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,13 @@
1717
validate_valid_dtype,
1818
)
1919
from executorch.backends.arm.tosa.mapping import TosaArg
20-
from executorch.backends.arm.tosa.specification import TosaSpecification
2120
from torch.fx import Node
2221

2322

2423
@register_node_visitor
2524
class AbsVisitor(NodeVisitor):
2625
target = "aten.abs.default"
2726

28-
tosa_specs = [
29-
TosaSpecification.create_from_string("TOSA-1.0+INT"),
30-
TosaSpecification.create_from_string("TOSA-1.0+FP"),
31-
]
32-
3327
def define_node(
3428
self,
3529
node: Node,

backends/arm/operators/op_add.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
class AddVisitor(NodeVisitor):
2626
target = "aten.add.Tensor"
2727

28-
tosa_specs = NodeVisitor.tosa_specs
29-
3028
def define_node(
3129
self,
3230
node: Node,

backends/arm/operators/op_amax.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
class MaxVisitor(NodeVisitor):
2525
target = "aten.amax.default"
2626

27-
tosa_specs = NodeVisitor.tosa_specs
28-
2927
def __init__(self, *args):
3028
super().__init__(*args)
3129

backends/arm/operators/op_amin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
class MinVisitor(NodeVisitor):
2525
target = "aten.amin.default"
2626

27-
tosa_specs = NodeVisitor.tosa_specs
28-
2927
def __init__(self, *args):
3028
super().__init__(*args)
3129

backends/arm/operators/op_any.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
class AnyVisitor(NodeVisitor):
2626
target = "aten.any.dim"
2727

28-
tosa_specs = NodeVisitor.tosa_specs
29-
3028
def define_node(
3129
self,
3230
node: Node,

backends/arm/operators/op_avg_pool2d.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,13 @@
2323
validate_same_dtype,
2424
validate_valid_dtype,
2525
)
26-
from executorch.backends.arm.tosa import TosaSpecification
2726
from executorch.backends.arm.tosa.mapping import TosaArg
2827

2928

3029
@register_node_visitor
3130
class AvgPool2dVisitor(NodeVisitor):
3231
target = "aten.avg_pool2d.default"
3332

34-
tosa_specs = [
35-
TosaSpecification.create_from_string("TOSA-1.0+INT"),
36-
TosaSpecification.create_from_string("TOSA-1.0+FP"),
37-
]
38-
3933
def __init__(self, *args):
4034
super().__init__(*args)
4135

backends/arm/operators/op_cat.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
class CatVisitor(NodeVisitor):
2626
target = "aten.cat.default"
2727

28-
tosa_specs = NodeVisitor.tosa_specs
29-
3028
def __init__(self, *args):
3129
super().__init__(*args)
3230

backends/arm/operators/op_clamp.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
validate_same_dtype,
1919
validate_valid_dtype,
2020
)
21-
from executorch.backends.arm.tosa import TosaSpecification
2221

2322
from executorch.backends.arm.tosa.mapping import TosaArg
2423
from torch.fx import Node
@@ -28,11 +27,6 @@
2827
class ClampVisitor(NodeVisitor):
2928
target = "aten.clamp.default"
3029

31-
tosa_specs = [
32-
TosaSpecification.create_from_string("TOSA-1.0+INT"),
33-
TosaSpecification.create_from_string("TOSA-1.0+FP"),
34-
]
35-
3630
def __init__(self, *args):
3731
super().__init__(*args)
3832

backends/arm/operators/op_cond_if.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2025 Arm Limited and/or its affiliates.
1+
# Copyright 2025-2026 Arm Limited and/or its affiliates.
22
#
33
# This source code is licensed under the BSD-style license found in the
44
# LICENSE file in the root directory of this source tree.
@@ -25,8 +25,6 @@
2525
class CondVisitor(NodeVisitor):
2626
target = "cond"
2727

28-
tosa_specs = NodeVisitor.tosa_specs
29-
3028
def define_node(
3129
self,
3230
node: Node,

backends/arm/operators/op_constant_pad_nd.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
validate_same_dtype,
2323
validate_valid_dtype,
2424
)
25-
from executorch.backends.arm.tosa import TosaSpecification
2625
from executorch.backends.arm.tosa.mapping import TosaArg
2726

2827

@@ -31,11 +30,6 @@ class ConstantPadNDVisitor(NodeVisitor):
3130

3231
target = "aten.constant_pad_nd.default"
3332

34-
tosa_specs = [
35-
TosaSpecification.create_from_string("TOSA-1.0+INT"),
36-
TosaSpecification.create_from_string("TOSA-1.0+FP"),
37-
]
38-
3933
def define_node(
4034
self,
4135
node: torch.fx.Node,

0 commit comments

Comments
 (0)