develop版本,transformer模型CPU-MKLDNN预测速度明显下降
Created by: OliverLPH
System information
-PaddlePaddle version: develop
, 6d8dcc7407
-CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
, mkldnn enabled
-GPU: None
-OS Platform (eg.Mac OS 10.14): Ubuntu1604
-Docker image: hub.baidubce.com/paddlepaddle/paddle:latest-gpu-cuda10.0-cudnn7-dev
-Python version: Python3.7
-Cmake orders
-C++version.txt: used python api
-API information: inference configuration
config.disable_gpu()
config.set_cpu_math_library_num_threads(8)
config.enable_mkldnn()
config.switch_ir_optim()
config.enable_profile()
To Reproduce
- run test without mkldnn
python test_transformer.py --model_dir="models/transformer" --data_dir=data/data.txt
- run test with mkldnn
python test_transformer.py --model_dir="models/transformer" --data_dir=data/data.txt --use_mkldnn
Describe your current behavior Speed of mkldnn inference is much slower than analysis inference and previous commit(e.g. 8002b2be or 1.7.2)
Code to reproduce the issue test_transformer.txt
Other info / logs