Skip to content

Commit 6df6a43

Browse files
committed
Add searching qparams to op_tanh
Signed-off-by: Erik Lundell <[email protected]> Change-Id: I029d95ecdfa85f5cdc63997ad1eb7515a016bae4
1 parent 6588655 commit 6df6a43

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

backends/arm/operators/op_tanh.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717

1818
from executorch.backends.arm.tosa_quant_utils import (
1919
dequantize_value,
20-
get_quant_node_args,
2120
QuantArgs,
2221
quantize_value,
22+
search_quant_arg_downstream,
23+
search_quant_arg_upstream,
2324
)
2425
from serializer.tosa_serializer import TosaOp
2526
from torch.fx import Node
@@ -49,9 +50,9 @@ def define_node(
4950

5051
# Create attribute for 8 bit table lookup.
5152
input_node = node.all_input_nodes[0]
52-
in_quantargs = get_quant_node_args(input_node)
53+
in_quantargs = search_quant_arg_upstream(input_node)
5354
output_node = list(node.users)[0]
54-
out_quantargs = get_quant_node_args(output_node)
55+
out_quantargs = search_quant_arg_downstream(output_node)
5556

5657
table = tanh_table_8bit(in_quantargs, out_quantargs)
5758
table_attr = ts.TosaSerializerAttribute()

0 commit comments

Comments
 (0)