Browse Source

!4828 revise guard and add modules

Merge pull request !4828 from gongdaguo/revise_guard_and_add_modules
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
9628a71dec
2 changed files with 45 additions and 1 deletions
  1. +2
    -0
      mindspore/lite/test/models_tflite.cfg
  2. +43
    -1
      mindspore/lite/test/run_benchmark_nets.sh

+ 2
- 0
mindspore/lite/test/models_tflite.cfg View File

@@ -57,6 +57,8 @@ model_emotions_0727_nosoftmax.tflite
inception_resnet_v2.tflite
ml_ocr_latin.tflite
hiai_ssd_mobilenetv2_object.tflite
hiai_cv_focusShootOCRModel_02.tflite
hiai_cv_poseEstimation.tflite
inception_v4.tflite
mtk_model_normalize_object_scene_ps_20200519_f16.tflite
mtk_age_gender_fp16.tflite


+ 43
- 1
mindspore/lite/test/run_benchmark_nets.sh View File

@@ -150,6 +150,20 @@ function Run_arm64() {
echo ${run_result} >> ${run_benchmark_result_file}
return 1
fi
# run benchmark test without clib data
echo ${model_name}
echo 'cd /data/local/tmp/benchmark_test' > adb_run_cmd.txt
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2'
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2' >> adb_run_cmd.txt
adb -s ${device_id} shell < adb_run_cmd.txt
if [ $? = 0 ]; then
run_result='Run_arm64: '${model_name}' pass'
echo ${run_result} >> ${run_benchmark_result_file}
else
run_result='Run_arm64:'${model_name}' fail <<===========================this is the failed case'
echo ${run_result} >> ${run_benchmark_result_file}
return 1
fi
#sleep 1
done < ${models_tflite_config}

@@ -172,10 +186,24 @@ function Run_arm64() {
echo ${run_result} >> ${run_benchmark_result_file}
return 1
fi
# run benchmark test without clib data
echo ${model_name}
echo 'cd /data/local/tmp/benchmark_test' > adb_run_cmd.txt
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2'
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2' >> adb_run_cmd.txt
adb -s ${device_id} shell < adb_run_cmd.txt
if [ $? = 0 ]; then
run_result='Run_arm64:'${model_name}' pass'
echo ${run_result} >> ${run_benchmark_result_file}
else
run_result='Run_arm64:'${model_name}' fail <<===========================this is the failed case'
echo ${run_result} >> ${run_benchmark_result_file}
return 1
fi
#sleep 1
done < ${models_caffe_config}

# Run caffe converted models:
# Run onnx converted models:
while read line; do
model_name=${line}
if [[ $model_name == \#* ]]; then
@@ -194,6 +222,20 @@ function Run_arm64() {
echo ${run_result} >> ${run_benchmark_result_file}
return 1
fi
# run benchmark test without clib data
echo ${model_name}
echo 'cd /data/local/tmp/benchmark_test' > adb_run_cmd.txt
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2'
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2' >> adb_run_cmd.txt
adb -s ${device_id} shell < adb_run_cmd.txt
if [ $? = 0 ]; then
run_result='Run_arm64:'${model_name}' pass'
echo ${run_result} >> ${run_benchmark_result_file}
else
run_result='Run_arm64:'${model_name}' fail <<===========================this is the failed case'
echo ${run_result} >> ${run_benchmark_result_file}
return 1
fi
#sleep 1
done < ${models_onnx_config}
}


Loading…
Cancel
Save