Missing optimization of DequantizeLinear ∘ Flatten ∘ QuantizeLinear? #21167
mcollinswisc
started this conversation in
Ideas / Feature Requests
Replies: 1 comment 3 replies
-
Perhaps a matter of including Flatten here: |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It looks like ONNXRuntime will optimize DequantizeLinear ∘ Reshape ∘ QuantizeLinear to only the Reshape, eliminating the quantization/de-quantization, if the scales & zero points are the same.
However, an equivalent Flatten is not optimized. Is this likely to be just a missing optimization, or is there some reason the qdq would be preserved in this case?
Tested out in:
https://gist.github.com/mcollinswisc/d1cd9d13b4e5fbad01c75dca5c9ca576
with ONNXRuntime 1.18.0
Beta Was this translation helpful? Give feedback.
All reactions