Skip to content

Commit

Permalink
[quantizer] fix logic for new_indices (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc123 authored Dec 2, 2024
1 parent 19e5f6d commit 2d7f919
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tinynn/graph/quantization/quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 2d7f919

Please sign in to comment.