|
|
|
@@ -479,6 +479,42 @@ function Run_arm64() { |
|
|
|
fi |
|
|
|
done < ${models_tflite_gpu_config} |
|
|
|
|
|
|
|
# Run GPU fp16 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 --fp16Priority=true --accuracyThreshold=5' >> "${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 --fp16Priority=true --accuracyThreshold=5' >> adb_run_cmd.txt |
|
|
|
adb -s ${device_id} shell < adb_run_cmd.txt >> "${run_benchmark_log_file}" |
|
|
|
if [ $? = 0 ]; then |
|
|
|
run_result='arm64_gpu_fp16: '${model_name}' pass' |
|
|
|
echo ${run_result} >> ${run_benchmark_result_file} |
|
|
|
else |
|
|
|
run_result='arm64_gpu_fp16: '${model_name}' failed' |
|
|
|
echo ${run_result} >> ${run_benchmark_result_file} |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
# run benchmark test without clib data |
|
|
|
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 --warmUpLoopCount=1 --loopCount=2 --fp16Priority=true --accuracyThreshold=5' >> "${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 --fp16Priority=true --accuracyThreshold=5' >> adb_run_cmd.txt |
|
|
|
adb -s ${device_id} shell < adb_run_cmd.txt >> "${run_benchmark_log_file}" |
|
|
|
if [ $? = 0 ]; then |
|
|
|
run_result='arm64_gpu_fp16: '${model_name}' pass' |
|
|
|
echo ${run_result} >> ${run_benchmark_result_file} |
|
|
|
else |
|
|
|
run_result='arm64_gpu_fp16: '${model_name}' failed' |
|
|
|
echo ${run_result} >> ${run_benchmark_result_file} |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
#sleep 1 |
|
|
|
done < ${models_fp16_gpu_config} |
|
|
|
|
|
|
|
# Run mindir converted models: |
|
|
|
while read line; do |
|
|
|
model_name=${line} |
|
|
|
@@ -580,6 +616,7 @@ 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 |
|
|
|
models_fp16_gpu_config=${basepath}/models_fp16_gpu.cfg |
|
|
|
|
|
|
|
ms_models_path=${basepath}/ms_models |
|
|
|
|
|
|
|
|