提交 20b11e6c 编写于 作者: A andy

mod sh

上级 dfe65b9b
......@@ -7,7 +7,7 @@ function Run_x86() {
model_name=${line}
echo ${model_name}
echo 'cd '${convertor_path}'/MSLite-*-linux_x86_64'
cd ${convertor_path}/MSLite-*-linux_x86_64
cd ${convertor_path}/MSLite-*-linux_x86_64 || return 1
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib;./benchmark/benchmark --modelPath='${ms_models_path}'/'${model_name}'.ms --inDataPath=/home/workspace/mindspore_dataset/mslite/models/hiai/input_output/input/'${model_name}'.ms.bin --calibDataPath=/home/workspace/mindspore_dataset/mslite/models/hiai/input_output/output/'${model_name}'.ms.out --warmUpLoopCount=1 --loopCount=1' || return 1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib;./benchmark/benchmark --modelPath=${ms_models_path}/${model_name}.ms --inDataPath=/home/workspace/mindspore_dataset/mslite/models/hiai/input_output/input/${model_name}.ms.bin --calibDataPath=/home/workspace/mindspore_dataset/mslite/models/hiai/input_output/output/${model_name}.ms.out --warmUpLoopCount=1 --loopCount=1
if [ $? = 0 ]; then
......@@ -25,7 +25,7 @@ function Run_x86() {
model_name=${line}
echo ${model_name}
echo 'cd '${convertor_path}'/MSLite-*-linux_x86_64'
cd ${convertor_path}/MSLite-*-linux_x86_64
cd ${convertor_path}/MSLite-*-linux_x86_64 || return 1
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib;./benchmark/benchmark --modelPath='${ms_models_path}'/'${model_name}'.ms --inDataPath=/home/workspace/mindspore_dataset/mslite/models/hiai/input_output/input/'${model_name}'.ms.bin --calibDataPath=/home/workspace/mindspore_dataset/mslite/models/hiai/input_output/output/'${model_name}'.ms.out --warmUpLoopCount=1 --loopCount=1' || return 1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib;./benchmark/benchmark --modelPath=${ms_models_path}/${model_name}.ms --inDataPath=/home/workspace/mindspore_dataset/mslite/models/hiai/input_output/input/${model_name}.ms.bin --calibDataPath=/home/workspace/mindspore_dataset/mslite/models/hiai/input_output/output/${model_name}.ms.out --warmUpLoopCount=1 --loopCount=1
if [ $? = 0 ]; then
......@@ -124,18 +124,18 @@ while getopts "a:c:m:d:" opt; do
done
# Unzip arm
cd ${arm_path}
cd ${arm_path} || exit 1
tar -zxf MSLite-*-linux_arm64.tar.gz || exit 1
# Unzip convertor
cd ${convertor_path}
cd ${convertor_path} || exit 1
tar -zxf MSLite-*-linux_x86_64.tar.gz || exit 1
cd ${convertor_path}/MSLite-*-linux_x86_64
cd ${convertor_path}/MSLite-*-linux_x86_64 || exit 1
cp converter/converter_lite ./ || exit 1
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:./lib/:./third_party/protobuf/lib
# Convert the models
cd ${convertor_path}/MSLite-*-linux_x86_64
cd ${convertor_path}/MSLite-*-linux_x86_64 || exit 1
# Set models config filepath
models_tflite_config=${basepath}/models_tflite.cfg
......@@ -167,7 +167,7 @@ done < ${models_caffe_config}
rm -rf ${basepath}/benchmark_test
mkdir -p ${basepath}/benchmark_test
benchmark_test_path=${basepath}/benchmark_test
cd ${benchmark_test_path}
cd ${benchmark_test_path} || exit 1
cp -a ${arm_path}/MSLite-*-linux_arm64/lib/libmindspore-lite.so ${benchmark_test_path}/libmindspore-lite.so || exit 1
cp -a ${arm_path}/MSLite-*-linux_arm64/benchmark/benchmark ${benchmark_test_path}/benchmark || exit 1
......@@ -184,8 +184,8 @@ echo 'chmod 777 benchmark' >> adb_cmd.txt
adb -s ${device_id} shell < adb_cmd.txt
run_x86_result=0
run_arm64_result=0
run_x86_result=0 || exit 1
run_arm64_result=0 || exit 1
# Write resulte to temp file
run_benchmark_result_file=${basepath}/run_benchmark_result.txt
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册