diff --git a/mindspore/lite/test/codegen/models_tflite.cfg b/mindspore/lite/test/codegen/models_codegen.cfg similarity index 99% rename from mindspore/lite/test/codegen/models_tflite.cfg rename to mindspore/lite/test/codegen/models_codegen.cfg index 92adcfb176..05243b0d5c 100644 --- a/mindspore/lite/test/codegen/models_tflite.cfg +++ b/mindspore/lite/test/codegen/models_codegen.cfg @@ -169,3 +169,4 @@ Q_AADB_HADB_MBV2_model.tflite # text_classification.tflite # Q_detect_fpn_add_inception-1448650.tflite # Q_hand_0812_pb2tflite.tflite +simple_IPS_model_4D_input.onnx diff --git a/mindspore/lite/test/models_onnx.cfg b/mindspore/lite/test/models_onnx.cfg index 91b2316350..c0878f2bf3 100644 --- a/mindspore/lite/test/models_onnx.cfg +++ b/mindspore/lite/test/models_onnx.cfg @@ -78,3 +78,4 @@ bloom_hongmo_detection_tmp.onnx Q_face_recognition.onnx Q888_face_recognition.onnx Q888_iris_detect.onnx +simple_IPS_model_4D_input.onnx diff --git a/mindspore/lite/test/run_benchmark_nets.sh b/mindspore/lite/test/run_benchmark_nets.sh index 0b57f3bc38..7885229d27 100644 --- a/mindspore/lite/test/run_benchmark_nets.sh +++ b/mindspore/lite/test/run_benchmark_nets.sh @@ -2333,21 +2333,27 @@ function Run_x86_codegen() { continue fi echo ${model_name} >> "${run_x86_codegen_log_file}" - ${CODEGEN_PATH}/codegen --codePath=${build_path} --modelPath=${ms_models_path}/${model_name}.ms >> ${run_x86_codegen_log_file} + local PARALLEL=$1 + ${CODEGEN_PATH}/codegen --codePath=${build_path} --modelPath=${ms_models_path}/${model_name}.ms --supportParallel=${PARALLEL} >> ${run_x86_codegen_log_file} # 1. build benchmark mkdir -p ${build_path}/${model_name}/build && cd ${build_path}/${model_name}/build || exit 1 cmake -DPKG_PATH=${x86_path}/mindspore-lite-${version}-inference-linux-x64 ${build_path}/${model_name} >> ${run_x86_codegen_log_file} make >> ${run_x86_codegen_log_file} # 2. run benchmark echo "net file: ${build_path}/${model_name}/src/net.bin" >> ${run_x86_codegen_log_file} - echo "./benchmark ${models_path}/input_output/input/${model_name}.ms.bin ${build_path}/${model_name}/src/net.bin 1 ${models_path}/input_output/output/${model_name}.ms.out" >> ${run_x86_codegen_log_file} - ./benchmark ${models_path}/input_output/input/${model_name}.ms.bin ${build_path}/${model_name}/src/net.bin 1 ${models_path}/input_output/output/${model_name}.ms.out >> ${run_x86_codegen_log_file} + if [[ "${PARALLEL}" == "false" ]]; then + echo "./benchmark ${models_path}/input_output/input/${model_name}.ms.bin ${build_path}/${model_name}/src/net.bin 1 ${models_path}/input_output/output/${model_name}.ms.out" >> ${run_x86_codegen_log_file} + ./benchmark ${models_path}/input_output/input/${model_name}.ms.bin ${build_path}/${model_name}/src/net.bin 1 ${models_path}/input_output/output/${model_name}.ms.out >> ${run_x86_codegen_log_file} + else + echo "./benchmark ${models_path}/input_output/input/${model_name}.ms.bin ${build_path}/${model_name}/src/net.bin 1 ${models_path}/input_output/output/${model_name}.ms.out 4 0" >> ${run_x86_codegen_log_file} + ./benchmark ${models_path}/input_output/input/${model_name}.ms.bin ${build_path}/${model_name}/src/net.bin 1 ${models_path}/input_output/output/${model_name}.ms.out 4 0 >> ${run_x86_codegen_log_file} + fi if [ $? = 0 ]; then run_result='x86_codegen: '${model_name}' pass'; echo ${run_result} >> ${run_benchmark_result_file} else run_result='x86_codegen: '${model_name}' failed'; echo ${run_result} >> ${run_benchmark_result_file}; return 1 fi - done < ${codegen_models_tflite_config} + done < ${models_codegen_config} rm -rf ${build_path} } @@ -2446,7 +2452,7 @@ models_compatibility_config=${basepath}/models_compatibility.cfg models_with_multiple_inputs_config=${basepath}/models_with_multiple_inputs.cfg models_for_process_only_config=${basepath}/models_for_process_only.cfg models_tf_weightquant_config=${basepath}/models_tf_weightquant.cfg -codegen_models_tflite_config=${basepath}/codegen/models_tflite.cfg +models_codegen_config=${basepath}/codegen/models_codegen.cfg ms_models_path=${basepath}/ms_models build_path=${basepath}/codegen_build @@ -2561,7 +2567,7 @@ fi if [[ $backend == "all" || $backend == "x86-all" || $backend == "x86-codegen" ]]; then # Run on x86-java echo "start Run x86 codegen ..." - Run_x86_codegen`` & + Run_x86_codegen "false" & Run_x86_codegen_PID=$! sleep 1 fi