Browse Source

fix Segmentation fault of resnext50 at Samsung phone

pull/15632/head
wangyanling 4 years ago
parent
commit
1e3ef98a2d
2 changed files with 9 additions and 6 deletions
  1. +2
    -1
      mindspore/lite/test/models_compatibility.cfg
  2. +7
    -5
      mindspore/lite/test/run_benchmark_nets.sh

+ 2
- 1
mindspore/lite/test/models_compatibility.cfg View File

@@ -1,3 +1,4 @@
inception_v4_ms_r1.0
mobilenet_v2_1.0_224_ms_r1.0
resnext50_ms_r1.0
# Add input shapes to fix Segmentation fault at Samsung phone
resnext50_ms_r1.0;1,224,224,3

+ 7
- 5
mindspore/lite/test/run_benchmark_nets.sh View File

@@ -1285,14 +1285,16 @@ function Run_arm64() {

# Run compatibility test models:
while read line; do
model_name=${line}
model_name=${line%;*}
length=${#model_name}
input_shapes=${line:length+1}
if [[ $model_name == \#* ]]; then
continue
fi
echo ${model_name} >> "${run_arm64_fp32_log_file}"
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 --modelFile='${model_name}'.ms' >> "${run_arm64_fp32_log_file}"
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelFile='${model_name}'.ms' >> adb_run_cmd.txt
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelFile='${model_name}'.ms --inputShapes='${input_shapes} >> "${run_arm64_fp32_log_file}"
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelFile='${model_name}'.ms --inputShapes='${input_shapes} >> adb_run_cmd.txt
adb -s ${device_id} shell < adb_run_cmd.txt >> "${run_arm64_fp32_log_file}"
if [ $? = 0 ]; then
run_result='arm64: '${model_name}' pass'; echo ${run_result} >> ${run_benchmark_result_file}
@@ -1301,8 +1303,8 @@ function Run_arm64() {
fi
# run benchmark test without clib data
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 --modelFile='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2' >> "${run_arm64_fp32_log_file}"
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelFile='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2' >> adb_run_cmd.txt
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelFile='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2 --inputShapes='${input_shapes} >> "${run_arm64_fp32_log_file}"
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelFile='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2 --inputShapes='${input_shapes} >> adb_run_cmd.txt
adb -s ${device_id} shell < adb_run_cmd.txt >> "${run_arm64_fp32_log_file}"
if [ $? = 0 ]; then
run_result='arm64: '${model_name}' pass'; echo ${run_result} >> ${run_benchmark_result_file}


Loading…
Cancel
Save