Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
正统之独孤求败
mindspore
提交
20b11e6c
M
mindspore
项目概览
正统之独孤求败
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
20b11e6c
编写于
8月 13, 2020
作者:
A
andy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mod sh
上级
dfe65b9b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
9 deletion
+9
-9
mindspore/lite/test/run_benchmark_nets.sh
mindspore/lite/test/run_benchmark_nets.sh
+9
-9
未找到文件。
mindspore/lite/test/run_benchmark_nets.sh
浏览文件 @
20b11e6c
...
@@ -7,7 +7,7 @@ function Run_x86() {
...
@@ -7,7 +7,7 @@ function Run_x86() {
model_name
=
${
line
}
model_name
=
${
line
}
echo
${
model_name
}
echo
${
model_name
}
echo
'cd '
${
convertor_path
}
'/MSLite-*-linux_x86_64'
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
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
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
if
[
$?
=
0
]
;
then
...
@@ -25,7 +25,7 @@ function Run_x86() {
...
@@ -25,7 +25,7 @@ function Run_x86() {
model_name
=
${
line
}
model_name
=
${
line
}
echo
${
model_name
}
echo
${
model_name
}
echo
'cd '
${
convertor_path
}
'/MSLite-*-linux_x86_64'
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
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
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
if
[
$?
=
0
]
;
then
...
@@ -124,18 +124,18 @@ while getopts "a:c:m:d:" opt; do
...
@@ -124,18 +124,18 @@ while getopts "a:c:m:d:" opt; do
done
done
# Unzip arm
# Unzip arm
cd
${
arm_path
}
cd
${
arm_path
}
||
exit
1
tar
-zxf
MSLite-
*
-linux_arm64
.tar.gz
||
exit
1
tar
-zxf
MSLite-
*
-linux_arm64
.tar.gz
||
exit
1
# Unzip convertor
# Unzip convertor
cd
${
convertor_path
}
cd
${
convertor_path
}
||
exit
1
tar
-zxf
MSLite-
*
-linux_x86_64
.tar.gz
||
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
cp
converter/converter_lite ./
||
exit
1
export
LD_LIBRARY_PATH
=
${
LD_LIBRARY_PATH
}
:./lib/:./third_party/protobuf/lib
export
LD_LIBRARY_PATH
=
${
LD_LIBRARY_PATH
}
:./lib/:./third_party/protobuf/lib
# Convert the models
# Convert the models
cd
${
convertor_path
}
/MSLite-
*
-linux_x86_64
cd
${
convertor_path
}
/MSLite-
*
-linux_x86_64
||
exit
1
# Set models config filepath
# Set models config filepath
models_tflite_config
=
${
basepath
}
/models_tflite.cfg
models_tflite_config
=
${
basepath
}
/models_tflite.cfg
...
@@ -167,7 +167,7 @@ done < ${models_caffe_config}
...
@@ -167,7 +167,7 @@ done < ${models_caffe_config}
rm
-rf
${
basepath
}
/benchmark_test
rm
-rf
${
basepath
}
/benchmark_test
mkdir
-p
${
basepath
}
/benchmark_test
mkdir
-p
${
basepath
}
/benchmark_test
benchmark_test_path
=
${
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
/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
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
...
@@ -184,8 +184,8 @@ echo 'chmod 777 benchmark' >> adb_cmd.txt
adb
-s
${
device_id
}
shell < adb_cmd.txt
adb
-s
${
device_id
}
shell < adb_cmd.txt
run_x86_result
=
0
run_x86_result
=
0
||
exit
1
run_arm64_result
=
0
run_arm64_result
=
0
||
exit
1
# Write resulte to temp file
# Write resulte to temp file
run_benchmark_result_file
=
${
basepath
}
/run_benchmark_result.txt
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录