Skip to content

Commit 5a961d4

Browse files
Remove is_quant_node from NodeVisitor.define_node
Signed-off-by: Oscar Andersson <[email protected]> Change-Id: Ibb17add461dc79e022a7f4accde29f9f9d61b16d
1 parent f360ec0 commit 5a961d4

39 files changed

+12
-57
lines changed

backends/arm/operators/node_visitor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def define_node(
3939
tosa_graph: ts.TosaSerializer,
4040
inputs: List[TosaArg],
4141
output: TosaArg,
42-
is_quant_node: bool,
4342
) -> None:
4443
raise NotImplementedError("NodeVisitor must be extended.")
4544

backends/arm/operators/op_add.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def define_node(
3838
tosa_graph: ts.TosaSerializer,
3939
inputs: List[TosaArg],
4040
output: TosaArg,
41-
is_quant_node: bool,
4241
) -> None:
4342
# Specification (0.80.0) states that input and output types
4443
# should all be the same
@@ -96,15 +95,14 @@ def define_node(
9695
tosa_graph: ts.TosaSerializer,
9796
inputs: List[TosaArg],
9897
output: TosaArg,
99-
is_quant_node: bool,
10098
) -> None:
10199
# Specification (0.80.0) states that input and output types
102100
# should all be the same
103101
assert inputs[0].dtype == inputs[1].dtype == output.dtype
104102

105103
if inputs[0].dtype in [ts.DType.INT8, ts.DType.INT32]:
106104
# Call the inherited define_node for handling integers
107-
super().define_node(node, tosa_graph, inputs, output, is_quant_node)
105+
super().define_node(node, tosa_graph, inputs, output)
108106
else:
109107
# FP32 Add lowering
110108
assert inputs[0].dtype == ts.DType.FP32

backends/arm/operators/op_avg_pool2d.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def define_node(
7373
tosa_graph: ts.TosaSerializer,
7474
inputs: List[TosaArg],
7575
output: TosaArg,
76-
is_quant_node: bool,
7776
) -> None:
7877
input_tensor = inputs[0]
7978
assert input_tensor.dtype == ts.DType.INT8
@@ -105,14 +104,13 @@ def define_node(
105104
tosa_graph: ts.TosaSerializer,
106105
inputs: List[TosaArg],
107106
output: TosaArg,
108-
is_quant_node: bool,
109107
) -> None:
110108
assert (
111109
inputs[0].dtype == ts.DType.INT8 or inputs[0].dtype == ts.DType.FP32
112110
), "Only FP32 and INT8 supported"
113111

114112
if inputs[0].dtype == ts.DType.INT8:
115-
super().define_node(node, tosa_graph, inputs, output, is_quant_node)
113+
super().define_node(node, tosa_graph, inputs, output)
116114

117115
if inputs[0].dtype == ts.DType.FP32:
118116
accumulator_type = ts.DType.FP32

backends/arm/operators/op_batch_norm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ def define_node(
4242
tosa_graph: ts.TosaSerializer,
4343
inputs: List[TosaArg],
4444
output: TosaArg,
45-
is_quant_node: bool,
4645
) -> None:
4746
# Decompose batch norm into sequence
4847
(activations, weights, bias, running_mean, running_var, momentum, epsilon) = (

backends/arm/operators/op_bmm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def define_node(
3535
tosa_graph: ts.TosaSerializer,
3636
inputs: List[TosaArg],
3737
output: TosaArg,
38-
is_quant_node: bool,
3938
) -> None:
4039

4140
assert inputs[0].dtype == inputs[1].dtype, "Both inputs must be of same type"

backends/arm/operators/op_cat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def define_node(
3030
tosa_graph: ts.TosaSerializer,
3131
inputs: List[TosaArg],
3232
output: TosaArg,
33-
is_quant_node: bool,
3433
) -> None:
3534

3635
tensors = inputs[0].special

backends/arm/operators/op_conv2d.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def define_node(
5353
tosa_graph: ts.TosaSerializer,
5454
inputs: List[TosaArg],
5555
output: TosaArg,
56-
is_quant_node: bool,
5756
) -> None:
5857
input, weight, bias, stride, pad, dilation, _, _, group = inputs
5958

backends/arm/operators/op_dequant.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Arm Limited and/or its affiliates.
1+
# Copyright 2023-2024 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.
@@ -29,7 +29,6 @@ def define_node(
2929
tosa_graph: ts.TosaSerializer,
3030
inputs: List[TosaArg],
3131
output: TosaArg,
32-
is_quant_node: bool,
3332
) -> None:
3433
item_name = inputs[0].name
3534
## Simply add an identityOp

backends/arm/operators/op_exp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def define_node(
3434
tosa_graph: ts.TosaSerializer,
3535
inputs: List[TosaArg],
3636
output: TosaArg,
37-
is_quant_node: bool,
3837
) -> None:
3938

4039
assert len(node.all_input_nodes) == 1

backends/arm/operators/op_full.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def define_node(
3131
tosa_graph: ts.TosaSerializer,
3232
inputs: List[TosaArg],
3333
output: TosaArg,
34-
is_quant_node: bool,
3534
) -> None:
3635

3736
shape = tosa_shape(inputs[0].special, output.dim_order)

0 commit comments

Comments
 (0)