|
|
|
@ -310,6 +310,42 @@ function Run_arm64() {
|
|
|
|
|
fi
|
|
|
|
|
#sleep 1
|
|
|
|
|
done < ${models_tflite_awaretraining_config}
|
|
|
|
|
|
|
|
|
|
# Run gpu tflite converted models:
|
|
|
|
|
while read line; do
|
|
|
|
|
model_name=${line}
|
|
|
|
|
if [[ $model_name == \#* ]]; then
|
|
|
|
|
continue
|
|
|
|
|
fi
|
|
|
|
|
echo ${model_name} >> "${run_benchmark_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 --device=GPU --modelPath='${model_name}'.ms --inDataPath=/data/local/tmp/input_output/input/'${model_name}'.ms.bin --calibDataPath=/data/local/tmp/input_output/output/'${model_name}'.ms.out --warmUpLoopCount=1 --loopCount=1' >> "${run_benchmark_log_file}"
|
|
|
|
|
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --device=GPU --modelPath='${model_name}'.ms --inDataPath=/data/local/tmp/input_output/input/'${model_name}'.ms.bin --calibDataPath=/data/local/tmp/input_output/output/'${model_name}'.ms.out --warmUpLoopCount=1 --loopCount=1' >> adb_run_cmd.txt
|
|
|
|
|
adb -s ${device_id} shell < adb_run_cmd.txt >> "${run_benchmark_log_file}"
|
|
|
|
|
if [ $? = 0 ]; then
|
|
|
|
|
run_result='arm64_gpu: '${model_name}' pass'
|
|
|
|
|
echo ${run_result} >> ${run_benchmark_result_file}
|
|
|
|
|
else
|
|
|
|
|
run_result='arm64_gpu: '${model_name}' failed'
|
|
|
|
|
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 --device=GPU --modelPath='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2' >> "${run_benchmark_log_file}"
|
|
|
|
|
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --device=GPU --modelPath='${model_name}'.ms --warmUpLoopCount=1 --loopCount=2' >> adb_run_cmd.txt
|
|
|
|
|
adb -s ${device_id} shell < adb_run_cmd.txt >> "${run_benchmark_log_file}"
|
|
|
|
|
if [ $? = 0 ]; then
|
|
|
|
|
run_result='arm64_gpu: '${model_name}' pass'
|
|
|
|
|
echo ${run_result} >> ${run_benchmark_result_file}
|
|
|
|
|
else
|
|
|
|
|
run_result='arm64_gpu: '${model_name}' failed'
|
|
|
|
|
echo ${run_result} >> ${run_benchmark_result_file}
|
|
|
|
|
return 1
|
|
|
|
|
fi
|
|
|
|
|
#sleep 1
|
|
|
|
|
done < ${models_tflite_gpu_config}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Print start msg before run testcase
|
|
|
|
@ -397,6 +433,7 @@ models_tflite_posttraining_config=${basepath}/models_tflite_posttraining.cfg
|
|
|
|
|
models_onnx_config=${basepath}/models_onnx.cfg
|
|
|
|
|
models_fp16_config=${basepath}/models_fp16.cfg
|
|
|
|
|
models_mindspore_config=${basepath}/models_mindspore.cfg
|
|
|
|
|
models_tflite_gpu_config=${basepath}/models_tflite_gpu.cfg
|
|
|
|
|
Convert_status=0
|
|
|
|
|
|
|
|
|
|
rm -rf ${basepath}/ms_models
|
|
|
|
|