Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix subgraph quantization regression in onnxruntime 1.17 #19421

Merged
merged 4 commits into from
Feb 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
precise comment
  • Loading branch information
fxmarty committed Feb 5, 2024
commit f01260ae07045b506173d500663b48ca3a609cec
2 changes: 1 addition & 1 deletion onnxruntime/python/tools/quantization/onnx_quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ def _dequantize_value(self, value_name):

scale_init = find_by_name(quantized_value.scale_name, self.model.initializer())

# In case we are working with subgraphs, the graph `producer_name` is set to `"onnx-quantizer"` in the `quantize_subgraph` method. In this case, the scale initializer may be on the top level graph, so this check can not be done.
# In case we are working with subgraphs, the graph `producer_name` is set to `"onnx-quantizer"` in the `quantize_subgraph` method. In this case, the scale initializer may be on the top level graph, so the check below can not be done.
if (
self.model.model.producer_name != "onnx-quantizer"
or (self.model.model.producer_name == "onnx-quantizer" and scale_init is not None)
Expand Down