Skip to content

Commit

Permalink
Support QDQ GatherElements in quantization tool
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlizarraga committed Aug 12, 2024
1 parent d5264c6 commit 20be096
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion onnxruntime/python/tools/quantization/operators/gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(self, onnx_quantizer, onnx_node):

def quantize(self):
node = self.node
assert node.op_type == "Gather"
assert node.op_type == "Gather" or node.op_type == "GatherElements"

if self.quantizer.is_valid_quantize_weight(node.input[0]) or self.quantizer.force_quantize_no_input_check:
self.quantizer.quantize_activation_tensor(node.input[0])
Expand Down
1 change: 1 addition & 0 deletions onnxruntime/python/tools/quantization/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"MatMul": QDQMatMul,
"Split": QDQSplit,
"Gather": QDQGather,
"GatherElements": QDQGather,
"Where": QDQWhere,
"InstanceNormalization": QDQNormalization,
"LayerNormalization": QDQNormalization,
Expand Down

0 comments on commit 20be096

Please sign in to comment.