From 9206114d5195afa6edcb54a22c4a0a82238917ba Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 6 Aug 2020 15:47:22 +0800 Subject: [PATCH 1/2] add nets --- mindspore/lite/test/run_benchmark_nets.sh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/mindspore/lite/test/run_benchmark_nets.sh b/mindspore/lite/test/run_benchmark_nets.sh index 571ae54bc3..b363f54d78 100644 --- a/mindspore/lite/test/run_benchmark_nets.sh +++ b/mindspore/lite/test/run_benchmark_nets.sh @@ -48,6 +48,13 @@ cd $convertor_path/MSLite-*-linux_x86_64 #model2: ./converter_lite --fmk=TFLITE --modelFile=$models_path/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.tflite --outputFile=$models_path/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite +./converter_lite --fmk=TFLITE --modelFile=$models_path/hiai_cn_recognize_modify_padv2.tflite --outputFile=$models_path/hiai_cn_recognize_modify_padv2 + +./converter_lite --fmk=TFLITE --modelFile=$models_path/hiai_detect_curve_model_float32.tflite --outputFile=$models_path/hiai_detect_curve_model_float32 + +./converter_lite --fmk=TFLITE --modelFile=$models_path/hiai_detectmodel_desnet_256_128_64_32.tflite --outputFile=$models_path/hiai_detectmodel_desnet_256_128_64_32 + +./converter_lite --fmk=TFLITE --modelFile=$models_path/mobilenet_v2_1_0_224.tflite --outputFile=$models_path/mobilenet_v2_1_0_224 #push to the arm and run benchmark: @@ -57,10 +64,12 @@ cp $arm_path/MSLite-0.6.0-linux_arm64/lib/libmindspore-lite.so ./benchmark_test cp $arm_path/MSLite-0.6.0-linux_arm64/benchmark/benchmark ./benchmark_test/benchmark #copy the models: +cp $models_path/*.ms ./benchmark_test/ #model1: -cp $models_path/test.ms ./benchmark_test/ +#cp $models_path/test.ms ./benchmark_test/ #model2: -cp $models_path/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.ms ./benchmark_test/ +#cp $models_path/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.ms ./benchmark_test/ +#cp $models_path/mobilenet_v2_1.0_224.tflite.ms ./benchmark_test/ #second:adb push to the phone adb -s $device_id push ./benchmark_test /data/local/tmp/ @@ -73,5 +82,14 @@ echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/;./benchmark --mod #model2: echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.ms' >> adb_cmd.txt +echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_cn_recognize_modify_padv2.ms' >> adb_cmd.txt + +echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_detect_curve_model_float32.ms' >> adb_cmd.txt + +echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_detectmodel_desnet_256_128_64_32.ms' >> adb_cmd.txt + + +echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=mobilenet_v2_1_0_224.ms' >> adb_cmd.txt + adb -s $device_id shell < adb_cmd.txt From e1eb70bf674f7619f93fa5214f7e9702054f0639 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 6 Aug 2020 17:12:36 +0800 Subject: [PATCH 2/2] add nets for cali --- mindspore/lite/test/run_benchmark_nets.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/mindspore/lite/test/run_benchmark_nets.sh b/mindspore/lite/test/run_benchmark_nets.sh index b363f54d78..f94c44cc1a 100644 --- a/mindspore/lite/test/run_benchmark_nets.sh +++ b/mindspore/lite/test/run_benchmark_nets.sh @@ -75,21 +75,30 @@ cp $models_path/*.ms ./benchmark_test/ adb -s $device_id push ./benchmark_test /data/local/tmp/ #third:run adb ,run session ,check the result: -echo 'cd /data/local/tmp/' > adb_cmd.txt +echo 'cd /data/local/tmp/benchmark_test' > adb_cmd.txt +echo 'cp /data/local/tmp/libc++_shared.so ./' >> adb_cmd.txt echo 'chmod 777 benchmark' >> adb_cmd.txt #model1: -echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/;./benchmark --modelPath=test.ms' >> adb_cmd.txt +echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=test.ms' >> adb_cmd.txt #model2: -echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.ms' >> adb_cmd.txt +#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.ms' >> adb_cmd.txt -echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_cn_recognize_modify_padv2.ms' >> adb_cmd.txt +echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.ms --inDataPath=/data/local/tmp/input_output/input/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.tflite.ms.bin --calibDataPath=/data/local/tmp/input_output/output/hiai_bigmodel_ghost_2_1_no_normalized_no_trans_tflite.tflite.ms.out' >> adb_cmd.txt -echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_detect_curve_model_float32.ms' >> adb_cmd.txt +#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_cn_recognize_modify_padv2.ms' >> adb_cmd.txt -echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_detectmodel_desnet_256_128_64_32.ms' >> adb_cmd.txt +echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_cn_recognize_modify_padv2.ms --inDataPath=/data/local/tmp/input_output/input/hiai_cn_recognize_modify_padv2.tflite.ms.bin --calibDataPath=/data/local/tmp/input_output/output/hiai_cn_recognize_modify_padv2.tflite.ms.out' >> adb_cmd.txt + +#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_detect_curve_model_float32.ms' >> adb_cmd.txt + +#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=hiai_detectmodel_desnet_256_128_64_32.ms' >> adb_cmd.txt + + +#echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=mobilenet_v2_1_0_224.ms' >> adb_cmd.txt + +echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=mobilenet_v2_1_0_224.ms --inDataPath=/data/local/tmp/input_output/input/mobilenet_v2_1.0_224.tflite.ms.bin --calibDataPath=/data/local/tmp/input_output/output/mobilenet_v2_1.0_224.tflite.ms.out' >> adb_cmd.txt -echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/data/local/tmp/benchmark_test;./benchmark --modelPath=mobilenet_v2_1_0_224.ms' >> adb_cmd.txt adb -s $device_id shell < adb_cmd.txt