Quant2 procedure not working properly on Quant1 ResNet50/101 models
Created by: wojtuss
When applying the Qat2Int8MkldnnPass
to the Qat1 ResNet50/101 model, INT8 accuracy of the first iteration is correct, but iterations > 1 give broken (usually 0.0) accuracy.
FP32 accuracy of all the iterations on the same data is correct.
INT8 accuracy for MobileNetV1/2 is fine.
This suggest some oneDNN (MKL-DNN, DNNL) caching problem, possibly with conv2d's residual data.
System information -PaddlePaddle version: feba1318 -CPU -oneDNN: from Paddle -OS Platform: Ubuntu 16.04.5 LTS -Python version: from Paddle
To Reproduce
- build Paddle with tests,
- run the command in the build directory:
ctest -R test_qat2_int8_resnet50_mkldnn -V
- get the test command from the beginning of the output of the above command and change the
--qat_model
option value to a path to the ResNet50 QAT1 model (build/third_party/inference_demo/qat/ResNet50_QAT/model/
) - run the modified command.
Describe your current behavior INT8 accuracy of the first iteration is correct, the second iteration gives wrong accuracy (close to 0.0).