From d3594cc1bf475447430d23986acb5e609b333893 Mon Sep 17 00:00:00 2001 From: peterjc123 Date: Mon, 2 Dec 2024 06:12:50 +0000 Subject: [PATCH] [quantizer] fix logic for new_indices --- tinynn/graph/quantization/quantizer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinynn/graph/quantization/quantizer.py b/tinynn/graph/quantization/quantizer.py index c21e631..6204348 100644 --- a/tinynn/graph/quantization/quantizer.py +++ b/tinynn/graph/quantization/quantizer.py @@ -2949,9 +2949,9 @@ def _is_broadcastable_binary_quantized_op_node(node: TraceNode, custom_data) -> if node.prev_indices[i] is None: new_indices.append(i) elif isinstance(node.prev_indices[i], (tuple, list)): - new_indices.push(node.prev_indices[i] + [i]) + new_indices.append(node.prev_indices[i] + [i]) else: - new_indices.push([node.prev_indices[i], i]) + new_indices.append([node.prev_indices[i], i]) with override_current_trace_graph(graph): trace_func = TraceFunction('torch.broadcast_tensors', False, prefix='fuse_').parse_args( node.prev_tensors[0], node.prev_tensors[1]