Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
b067ce50
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看板
提交
b067ce50
编写于
6月 25, 2019
作者:
C
Chunwei
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'chunwei/enhance-api-test' into 'incubate/lite'
enhance api test See merge request inference/paddlelite!60
上级
48f9ae36
49d285b9
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
29 addition
and
8 deletion
+29
-8
paddle/fluid/lite/api/CMakeLists.txt
paddle/fluid/lite/api/CMakeLists.txt
+4
-1
paddle/fluid/lite/api/paddle_api_test.cc
paddle/fluid/lite/api/paddle_api_test.cc
+4
-1
paddle/fluid/lite/tools/build.sh
paddle/fluid/lite/tools/build.sh
+21
-6
未找到文件。
paddle/fluid/lite/api/CMakeLists.txt
浏览文件 @
b067ce50
...
...
@@ -108,9 +108,12 @@ lite_cc_library(paddle_api_light SRCS paddle_api.cc DEPS light_api_impl_lite)
lite_cc_test
(
test_paddle_api_lite SRCS paddle_api_test.cc DEPS cxx_api_lite light_api_lite paddle_api_full
${
ops_lite
}
ARM_DEPS
${
arm_kernels
}
X86_DEPS
${
x86_kernels
}
ARGS --model_dir=
${
LITE_MODEL_DIR
}
/lite_naive_model SERIAL
)
if
(
WITH_TESTING
)
add_dependencies
(
test_paddle_api_lite
test_apis_lite
)
add_dependencies
(
test_paddle_api_lite
extern_lite_download_lite_naive_model_tar_gz
)
endif
()
#lite_cc_binary(cxx_api_lite_bin SRCS cxx_api_bin.cc
...
...
paddle/fluid/lite/api/paddle_api_test.cc
浏览文件 @
b067ce50
...
...
@@ -29,7 +29,10 @@ TEST(CxxApi, run) {
lite_api
::
CxxConfig
config
;
config
.
set_model_dir
(
FLAGS_model_dir
);
config
.
set_preferred_place
(
Place
{
TARGET
(
kX86
),
PRECISION
(
kFloat
)});
config
.
set_valid_places
({
Place
{
TARGET
(
kX86
),
PRECISION
(
kFloat
)}});
config
.
set_valid_places
({
Place
{
TARGET
(
kX86
),
PRECISION
(
kFloat
)},
Place
{
TARGET
(
kARM
),
PRECISION
(
kFloat
)},
});
auto
predictor
=
lite_api
::
CreatePaddlePredictor
(
config
);
...
...
paddle/fluid/lite/tools/build.sh
浏览文件 @
b067ce50
...
...
@@ -134,14 +134,26 @@ function test_arm_android {
local
testpath
=
$(
find ./paddle/fluid
-name
${
test_name
}
)
# if [[ "$test_name" == "test_light_api" ]]; then
# local model_path=$(find . -name "lite_naive_model")
# arm_push_necessary_file $port $model_path $adb_work_dir
# fi
adb
-s
emulator-
${
port
}
push
${
testpath
}
${
adb_work_dir
}
adb
-s
emulator-
${
port
}
shell
"
${
adb_work_dir
}
/
${
test_name
}
"
}
# test the inference high level api
function
test_arm_api
{
local
port
=
$1
local
test_name
=
"test_paddle_api_lite"
make
$test_name
-j
$NUM_CORES_FOR_COMPILE
local
model_path
=
$(
find
.
-name
"lite_naive_model"
)
local
remote_model
=
${
adb_work_dir
}
/paddle_api
local
testpath
=
$(
find ./paddle/fluid
-name
${
test_name
}
)
arm_push_necessary_file
$port
$model_path
$remote_model
adb
-s
emulator-
${
port
}
shell
mkdir
-p
$remote_model
adb
-s
emulator-
${
port
}
push
${
testpath
}
${
adb_work_dir
}
adb
-s
emulator-
${
port
}
shell
chmod
+x
"
${
adb_work_dir
}
/
${
test_name
}
"
adb
-s
emulator-
${
port
}
shell
"
./
${
adb_work_dir
}
/
${
test_name
}
"
adb
-s
emulator-
${
port
}
shell
"
${
adb_work_dir
}
/
${
test_name
}
--model_dir
$remote_model
"
}
function
test_arm_model
{
...
...
@@ -258,6 +270,9 @@ function test_arm {
for
_test
in
$(
cat
$TESTS_FILE
)
;
do
test_arm_android
$_test
$port
done
# test finally
test_arm_api
$port
}
function
prepare_emulator
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录