diff --git a/mindspore/lite/test/run_benchmark_nets.sh b/mindspore/lite/test/run_benchmark_nets.sh index 7ad20e4b56..089dc21e9d 100644 --- a/mindspore/lite/test/run_benchmark_nets.sh +++ b/mindspore/lite/test/run_benchmark_nets.sh @@ -65,6 +65,27 @@ function Run_x86() { fi done < ${models_onnx_config} + # Run tflite post training quantization converted models: + while read line; do + model_name=${line} + if [[ $model_name == \#* ]]; then + continue + fi + echo ${model_name} + echo 'cd '${convertor_path}'/MSLite-*-linux_x86_64' + cd ${convertor_path}/MSLite-*-linux_x86_64 || return 1 + echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib;./benchmark/benchmark --modelPath='${ms_models_path}'/'${model_name}'_posttraining.ms --inDataPath=/home/workspace/mindspore_dataset/mslite/quantTraining/mnist_calibration_data/00099.bin --calibDataPath=/home/workspace/mindspore_dataset/mslite/models/hiai/input_output/output/'${model_name}'_posttraining.ms.out --warmUpLoopCount=1 --loopCount=1' || return 1 + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib;./benchmark/benchmark --modelPath=${ms_models_path}/${model_name}_posttraining.ms --inDataPath=/home/workspace/mindspore_dataset/mslite/quantTraining/mnist_calibration_data/00099.bin --calibDataPath=/home/workspace/mindspore_dataset/mslite/models/hiai/input_output/output/${model_name}_posttraining.ms.out --warmUpLoopCount=1 --loopCount=1 + if [ $? = 0 ]; then + run_result='Run_x86: '${model_name}'_posttraining pass' + echo ${run_result} >> ${run_benchmark_result_file} + else + run_result='Run_x86: '${model_name}'_posttraining fail <<===========================this is the failed case' + echo ${run_result} >> ${run_benchmark_result_file} + return 1 + fi + done < ${models_tflite_posttraining_config} + # Run mindspore converted models: while read line; do model_name=${line} @@ -257,8 +278,7 @@ while read line; do fi echo ${model_name} echo './converter_lite --fmk=TFLITE --modelFile='${models_path}'/'${model_name}' --outputFile='${ms_models_path}'/'${model_name}_posttraining' --quantType=PostTraining --config_file='${models_path}'/'${model_name}'_posttraining.config' - ###core dump 0815,after bugfix ,then add this convert: - ###./converter_lite --fmk=TFLITE --modelFile=$models_path/${model_name} --outputFile=${ms_models_path}/${model_name}_posttraining --quantType=PostTraining --config_file=${models_path}/${model_name}_posttraining.config || exit 1 + ./converter_lite --fmk=TFLITE --modelFile=$models_path/${model_name} --outputFile=${ms_models_path}/${model_name}_posttraining --quantType=PostTraining --config_file=${models_path}/${model_name}_posttraining.config || exit 1 done < ${models_tflite_posttraining_config} # Push to the arm and run benchmark: