[Feature Request] Missing optimization of DequantizeLinear ∘ Flatten ∘ QuantizeLinear? #21375
Labels
feature request
request for unsupported feature or enhancement
quantization
issues related to quantization
Discussed in #21167
Originally posted by mcollinswisc June 25, 2024
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
The text was updated successfully, but these errors were encountered: