Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
3fa9fff8
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3fa9fff8
编写于
6月 21, 2019
作者:
S
superjomn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
8310c8f9
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
10 deletion
+24
-10
paddle/fluid/lite/api/CMakeLists.txt
paddle/fluid/lite/api/CMakeLists.txt
+6
-8
paddle/fluid/lite/tools/build.sh
paddle/fluid/lite/tools/build.sh
+17
-1
paddle/fluid/lite/utils/io.h
paddle/fluid/lite/utils/io.h
+1
-1
未找到文件。
paddle/fluid/lite/api/CMakeLists.txt
浏览文件 @
3fa9fff8
...
...
@@ -74,18 +74,16 @@ endif()
# These tests needs CLI arguments, and is not supported in ARM CI.
# TODO(Superjomn) support latter.
lite_cc_test
(
test_light_api SRCS light_api_test.cc
lite_cc_test
(
test_light_api
_lite
SRCS light_api_test.cc
DEPS light_api_lite program_lite mir_passes
ARGS --optimized_model=
${
LITE_MODEL_DIR
}
/lite_naive_model_opt
SERIAL
)
if
(
NOT LITE_ON_MOBILE
)
lite_cc_test
(
test_apis_lite SRCS apis_test.cc
DEPS cxx_api_lite light_api_lite
${
ops_lite
}
X86_DEPS
${
x86_kernels
}
operator
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/lite_naive_model
--optimized_model=
${
LITE_MODEL_DIR
}
/lite_naive_model_opt SERIAL
)
endif
()
lite_cc_test
(
test_apis_lite SRCS apis_test.cc
DEPS cxx_api_lite light_api_lite
${
ops_lite
}
X86_DEPS
${
x86_kernels
}
operator
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/lite_naive_model
--optimized_model=
${
LITE_MODEL_DIR
}
/lite_naive_model_opt SERIAL
)
#lite_cc_binary(cxx_api_lite_bin SRCS cxx_api_bin.cc
#X86_DEPS operator
...
...
paddle/fluid/lite/tools/build.sh
浏览文件 @
3fa9fff8
...
...
@@ -99,7 +99,7 @@ function test_arm_android {
echo
"test name:
${
test_name
}
"
adb_work_dir
=
"/data/local/tmp"
skip_list
=(
"test_model_parser_lite"
"test_mobilenetv1_lite"
"test_mobilenetv2_lite"
"test_resnet50_lite"
"test_inceptionv4_lite"
"test_light_api"
)
skip_list
=(
"test_model_parser_lite"
"test_mobilenetv1_lite"
"test_mobilenetv2_lite"
"test_resnet50_lite"
"test_inceptionv4_lite"
"test_light_api
_lite"
"test_apis_lite
"
)
for
skip_name
in
${
skip_list
[@]
}
;
do
[[
$skip_name
=
~
(
^|[[:space:]]
)
$test_name
(
$|
[[
:space:]]
)
]]
&&
echo
"skip
$test_name
"
&&
return
done
...
...
@@ -351,6 +351,22 @@ function build_test_arm_subtask_model {
echo
"Done"
}
# this test load a model, optimize it and check the prediction result of both cxx and light APIS.
function
test_arm_predict_apis
{
local
port
=
$1
local
workspace
=
$2
local
naive_model_path
=
$3
local
api_test_path
=
$(
find
.
-name
"test_apis_lite"
)
# the model is pushed to ./lite_naive_model
adb
-s
emulator-
${
port
}
push
${
naive_model_path
}
${
workspace
}
adb
-s
emulator-
${
port
}
push
$api_test_path
${
workspace
}
# test cxx_api first to store the optimized model.
adb
-s
emulator-
${
port
}
shell ./test_apis_lite
--model_dir
./lite_naive_model
--optimized_model
./lite_naive_model_opt
}
# Build the code and run lite arm tests. This is executed in the CI system.
function
build_test_arm
{
########################################################################
...
...
paddle/fluid/lite/utils/io.h
浏览文件 @
3fa9fff8
...
...
@@ -38,7 +38,7 @@ static void MkDirRecur(const std::string& path) {
CHECK_EQ
(
system
(
string_format
(
"mkdir -p %s"
,
path
.
c_str
()).
c_str
()),
0
)
<<
"Cann't mkdir "
<<
path
;
#else // On ARM
CHECK_NE
(
mkd
d
ir
(
path
.
c_str
(),
S_IRWXU
),
-
1
)
<<
"Cann't mkdir "
<<
path
;
CHECK_NE
(
mkdir
(
path
.
c_str
(),
S_IRWXU
),
-
1
)
<<
"Cann't mkdir "
<<
path
;
#endif
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录