Skip to content

Commit b8343a2

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

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) 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) 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
@@ -75,7 +75,6 @@ def define_node(
7575
tosa_graph: ts.TosaSerializer,
7676
inputs: List[TosaArg],
7777
output: TosaArg,
78-
is_quant_node: bool,
7978
) -> None:
8079
input_tensor = inputs[0]
8180
assert input_tensor.dtype == ts.DType.INT8
@@ -107,14 +106,13 @@ def define_node(
107106
tosa_graph: ts.TosaSerializer,
108107
inputs: List[TosaArg],
109108
output: TosaArg,
110-
is_quant_node: bool,
111109
) -> None:
112110
assert (
113111
inputs[0].dtype == ts.DType.INT8 or inputs[0].dtype == ts.DType.FP32
114112
), "Only FP32 and INT8 supported"
115113

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

119117
if inputs[0].dtype == ts.DType.FP32:
120118
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
@@ -55,7 +55,6 @@ def define_node(
5555
tosa_graph: ts.TosaSerializer,
5656
inputs: List[TosaArg],
5757
output: TosaArg,
58-
is_quant_node: bool,
5958
) -> None:
6059
input, weight, bias, stride, pad, dilation, _, _, group = inputs
6160

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)