Created by: wojtuss
We add cpu_quantize_squash_pass
, which squashes dequantize + quantize
operator pairs in a model quantized using the cpu_quantize_pass
(https://github.com/PaddlePaddle/Paddle/pull/16127). After the pass, dequantize + quantize
pairs are removed or changed into requantize
ops.
This pass works with the C-API quantization core (https://github.com/PaddlePaddle/Paddle/pull/15987) and cpu_quantize_pass
(https://github.com/PaddlePaddle/Paddle/pull/16127),
and is the second pass in a series of quantization passes.
The two passes are enough for quantization of ResNet50 and MobileNet-v1.