Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
f232ba40
P
Paddle-Lite
项目概览
PaddlePaddle
/
Paddle-Lite
通知
331
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
271
列表
看板
标记
里程碑
合并请求
78
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle-Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
271
Issue
271
列表
看板
标记
里程碑
合并请求
78
合并请求
78
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
f232ba40
编写于
3月 24, 2020
作者:
H
huzhiqiang
提交者:
GitHub
3月 24, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CI][OPENCL] add opencl test CI (#3195)
上级
7055d414
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
48 addition
and
5 deletion
+48
-5
lite/tools/ci_build.sh
lite/tools/ci_build.sh
+48
-5
未找到文件。
lite/tools/ci_build.sh
浏览文件 @
f232ba40
...
...
@@ -184,7 +184,7 @@ function build_opencl {
return
0
fi
build_dir
=
$cur_dir
/build.lite.
${
os
}
.
${
abi
}
.
${
lang
}
.opencl
build_dir
=
$cur_dir
/build.lite.
${
os
}
.
${
abi
}
.
${
lang
}
mkdir
-p
$build_dir
cd
$build_dir
...
...
@@ -193,11 +193,10 @@ function build_opencl {
cmake_opencl
${
os
}
${
abi
}
${
lang
}
make opencl_clhpp
-j
$NUM_CORES_FOR_COMPILE
build
$TESTS_FILE
# test publish inference lib
make publish_inference
-j
$NUM_CORES_FOR_COMPILE
}
# This method is only called in CI.
function
cmake_x86_for_CI
{
prepare_workspace
# fake an empty __generated_code__.cc to pass cmake.
...
...
@@ -387,7 +386,7 @@ function test_arm_android {
echo
"test name:
${
test_name
}
"
adb_work_dir
=
"/data/local/tmp"
skip_list
=(
"test_model_parser"
"test_mobilenetv1"
"test_mobilenetv2"
"test_resnet50"
"test_inceptionv4"
"test_light_api"
"test_apis"
"test_paddle_api"
"test_cxx_api"
"test_gen_code"
"test_mobilenetv1_int8"
"test_subgraph_pass"
)
skip_list
=(
"test_model_parser"
"test_mobilenetv1"
"test_mobilenetv2"
"test_resnet50"
"test_inceptionv4"
"test_light_api"
"test_apis"
"test_paddle_api"
"test_cxx_api"
"test_gen_code"
"test_mobilenetv1_int8"
"test_subgraph_pass"
"test_grid_sampler_image_opencl"
"test_lrn_image_opencl"
"test_pad2d_image_opencl"
)
for
skip_name
in
${
skip_list
[@]
}
;
do
[[
$skip_name
=
~
(
^|[[:space:]]
)
$test_name
(
$|
[[
:space:]]
)
]]
&&
echo
"skip
$test_name
"
&&
return
done
...
...
@@ -755,16 +754,58 @@ function arm_push_necessary_file {
adb
-s
${
device
}
push
${
testpath
}
${
adb_work_dir
}
}
function
test_opencl
{
os
=
$1
abi
=
$2
lang
=
$3
device
=
$4
if
[[
${
os
}
==
"armlinux"
]]
;
then
# TODO(hongming): enable test armlinux on armv8, armv7 and armv7hf
echo
"Skip test arm linux yet. armlinux must in another docker"
return
0
fi
if
[[
${
os
}
==
"android"
&&
${
abi
}
==
"armv7hf"
]]
;
then
echo
"android do not need armv7hf"
return
0
fi
# prepare for CXXApi test
local
adb
=
"adb -s
${
device
}
"
$adb
shell
mkdir
-p
/data/local/tmp/lite_naive_model_opt
# opencl test should be marked with `opencl`
opencl_test_mark
=
"opencl"
for
_test
in
$(
cat
$TESTS_FILE
)
;
do
# tell if this test is marked with `opencl`
if
[[
$_test
==
*
$opencl_test_mark
*
]]
;
then
test_arm_android
$_test
$device
fi
done
}
function
build_test_arm_opencl
{
########################################################################
cur
=
$PWD
# job 1-4 must be in one runner
prepare_adb_devices
# job 1
build_opencl
"android"
"armv8"
"gcc"
adb
-s
$device_armv8
shell
'rm -rf /data/local/tmp/*'
run_gen_code_test
${
device_armv8
}
test_opencl
"android"
"armv8"
"gcc"
${
device_armv8
}
cd
$cur
# job 2
build_opencl
"android"
"armv7"
"gcc"
adb
-s
$device_armv7
shell
'rm -rf /data/local/tmp/*'
run_gen_code_test
${
device_armv7
}
test_opencl
"android"
"armv7"
"gcc"
${
device_armv7
}
cd
$cur
echo
"Done"
...
...
@@ -1099,6 +1140,8 @@ function main {
;;
build_test_arm_opencl
)
build_test_arm_opencl
# build_test_arm_subtask_model test_mobilenetv1 mobilenet_v1
# build_test_arm_subtask_model test_mobilenetv2 mobilenet_v2_relu
shift
;;
build_test_arm_subtask_android
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录