Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle-Lite
提交
0a197583
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看板
提交
0a197583
编写于
8月 30, 2019
作者:
X
Xiaoyang LI
提交者:
Yan Chunwei
8月 30, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support ios tiny publish (#1910) (#1919)
上级
3a28a80b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
58 addition
and
35 deletion
+58
-35
lite/CMakeLists.txt
lite/CMakeLists.txt
+11
-0
lite/tools/build.sh
lite/tools/build.sh
+47
-5
lite/tools/build_ios_armv7_arm64.sh
lite/tools/build_ios_armv7_arm64.sh
+0
-30
未找到文件。
lite/CMakeLists.txt
浏览文件 @
0a197583
...
...
@@ -89,6 +89,17 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM)
add_custom_command
(
TARGET publish_inference_cxx_lib POST_BUILD
COMMAND
${
CMAKE_STRIP
}
"--strip-debug"
${
INFER_LITE_PUBLISH_ROOT
}
/cxx/lib/*.a
)
endif
()
else
()
if
(
IOS
)
add_custom_target
(
tiny_publish_lib
${
TARGET
}
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/lib"
COMMAND mkdir -p
"
${
INFER_LITE_PUBLISH_ROOT
}
/include"
COMMAND cp
"
${
CMAKE_SOURCE_DIR
}
/lite/api/paddle_*.h"
"
${
INFER_LITE_PUBLISH_ROOT
}
/include"
COMMAND cp
"
${
CMAKE_BINARY_DIR
}
/libpaddle_api_light_bundled.a"
"
${
INFER_LITE_PUBLISH_ROOT
}
/lib"
)
add_dependencies
(
tiny_publish_lib bundle_light_api
)
add_dependencies
(
publish_inference tiny_publish_lib
)
endif
()
endif
()
...
...
lite/tools/build.sh
浏览文件 @
0a197583
...
...
@@ -135,6 +135,41 @@ function make_all_tests {
cd
-
>
/dev/null
}
function
make_ios
{
local
os
=
$1
local
abi
=
$2
build_dir
=
build.ios.
${
os
}
.
${
abi
}
echo
"building ios target into
$build_dir
"
echo
"target os:
$os
"
echo
"target abi:
$abi
"
mkdir
-p
${
build_dir
}
cd
${
build_dir
}
GEN_CODE_PATH_PREFIX
=
lite/gen_code
mkdir
-p
./
${
GEN_CODE_PATH_PREFIX
}
touch
./
${
GEN_CODE_PATH_PREFIX
}
/__generated_code__.cc
cmake ..
\
-DWITH_GPU
=
OFF
\
-DWITH_MKL
=
OFF
\
-DWITH_LITE
=
ON
\
-DLITE_WITH_CUDA
=
OFF
\
-DLITE_WITH_X86
=
OFF
\
-DLITE_WITH_ARM
=
ON
\
-DWITH_TESTING
=
OFF
\
-DLITE_WITH_JAVA
=
OFF
\
-DLITE_SHUTDOWN_LOG
=
ON
\
-DLITE_ON_TINY_PUBLISH
=
ON
\
-DLITE_WITH_OPENMP
=
OFF
\
-DWITH_ARM_DOTPROD
=
OFF
\
-DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK
=
ON
\
-DARM_TARGET_ARCH_ABI
=
$abi
\
-DLITE_BUILD_EXTRA
=
$BUILD_EXTRA
\
-DARM_TARGET_OS
=
$os
make
-j4
publish_inference
cd
-
}
function
print_usage
{
set
+x
...
...
@@ -142,22 +177,25 @@ function print_usage {
echo
echo
"----------------------------------------"
echo
-e
"compile tiny publish so lib:"
echo
-e
"for android:"
echo
-e
" ./build.sh --arm_os=<os> --arm_abi=<abi> --arm_lang=<lang> --android_stl=<stl> tiny_publish"
echo
-e
"for ios:"
echo
-e
" ./build.sh --arm_os=<os> --arm_abi=<abi> ios"
echo
echo
-e
"compile full publish so lib:"
echo
-e
"compile full publish so lib
(ios not support)
:"
echo
-e
" ./build.sh --arm_os=<os> --arm_abi=<abi> --arm_lang=<lang> --android_stl=<stl> full_publish"
echo
echo
-e
"compile all arm tests:"
echo
-e
"compile all arm tests
(ios not support)
:"
echo
-e
" ./build.sh --arm_os=<os> --arm_abi=<abi> --arm_lang=<lang> test"
echo
echo
-e
"optional argument:"
echo
-e
"--build_extra: (OFF|ON); controls whether to publish extra operators and kernels for (sequence-related model such as OCR or NLP)"
echo
echo
-e
"argument choices:"
echo
-e
"--arm_os:
\t
android"
echo
-e
"--arm_os:
\t
android
|ios|ios64
"
echo
-e
"--arm_abi:
\t
armv8|armv7"
echo
-e
"--arm_lang:
\t
gcc|clang"
echo
-e
"--android_stl:
\t
c++_static|c++_shared"
echo
-e
"--arm_lang:
\t
gcc|clang
(for android)
"
echo
-e
"--android_stl:
\t
c++_static|c++_shared
(for android)
"
echo
echo
-e
"tasks:"
echo
...
...
@@ -209,6 +247,10 @@ function main {
make_all_tests
$ARM_OS
$ARM_ABI
$ARM_LANG
shift
;;
ios
)
make_ios
$ARM_OS
$ARM_ABI
shift
;;
*
)
# unknown option
print_usage
...
...
lite/tools/build_ios_armv7_arm64.sh
已删除
100755 → 0
浏览文件 @
3a28a80b
#!/bin/bash
set
-e
build_dir
=
build.ios.armv7.arm64
mkdir
-p
${
build_dir
}
cd
${
build_dir
}
GEN_CODE_PATH_PREFIX
=
lite/gen_code
mkdir
-p
./
${
GEN_CODE_PATH_PREFIX
}
touch
./
${
GEN_CODE_PATH_PREFIX
}
/__generated_code__.cc
cmake ..
\
-DWITH_GPU
=
OFF
\
-DWITH_MKL
=
OFF
\
-DWITH_LITE
=
ON
\
-DLITE_WITH_CUDA
=
OFF
\
-DLITE_WITH_X86
=
OFF
\
-DLITE_WITH_ARM
=
ON
\
-DWITH_TESTING
=
OFF
\
-DLITE_WITH_JAVA
=
OFF
\
-DLITE_SHUTDOWN_LOG
=
ON
\
-DLITE_ON_TINY_PUBLISH
=
ON
\
-DLITE_WITH_OPENMP
=
OFF
\
-DWITH_ARM_DOTPROD
=
OFF
\
-DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK
=
ON
\
-DARM_TARGET_OS
=
ios
make
-j4
cd
-
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录