Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
9df18b08
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
9df18b08
编写于
7月 21, 2020
作者:
Z
Zhaolong Xing
提交者:
GitHub
7月 21, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Disable windows static library generation (#25593)
* fix windows ci test=develop * fix ci error
上级
60da8854
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
14 deletion
+19
-14
cmake/inference_lib.cmake
cmake/inference_lib.cmake
+8
-8
paddle/fluid/inference/CMakeLists.txt
paddle/fluid/inference/CMakeLists.txt
+9
-4
paddle/fluid/inference/api/demo_ci/run.sh
paddle/fluid/inference/api/demo_ci/run.sh
+2
-2
未找到文件。
cmake/inference_lib.cmake
浏览文件 @
9df18b08
...
@@ -19,9 +19,12 @@ set(FLUID_INSTALL_DIR "${CMAKE_BINARY_DIR}/fluid_install_dir" CACHE STRING
...
@@ -19,9 +19,12 @@ set(FLUID_INSTALL_DIR "${CMAKE_BINARY_DIR}/fluid_install_dir" CACHE STRING
set
(
FLUID_INFERENCE_INSTALL_DIR
"
${
CMAKE_BINARY_DIR
}
/fluid_inference_install_dir"
CACHE STRING
set
(
FLUID_INFERENCE_INSTALL_DIR
"
${
CMAKE_BINARY_DIR
}
/fluid_inference_install_dir"
CACHE STRING
"A path setting fluid inference shared and static libraries"
)
"A path setting fluid inference shared and static libraries"
)
# TODO(zhaolong)
# At present, the size of static lib in Windows exceeds the system limit,
# so the generation of static lib is temporarily turned off.
if
(
WIN32
)
if
(
WIN32
)
#todo: remove the option
#todo: remove the option
option
(
WITH_STATIC_LIB
"Compile demo with static/shared library, default use static."
O
N
)
option
(
WITH_STATIC_LIB
"Compile demo with static/shared library, default use static."
O
FF
)
if
(
NOT PYTHON_EXECUTABLE
)
if
(
NOT PYTHON_EXECUTABLE
)
FIND_PACKAGE
(
PythonInterp REQUIRED
)
FIND_PACKAGE
(
PythonInterp REQUIRED
)
endif
()
endif
()
...
@@ -187,21 +190,18 @@ copy(inference_lib_dist
...
@@ -187,21 +190,18 @@ copy(inference_lib_dist
SRCS
${
CMAKE_BINARY_DIR
}
/../paddle/fluid/framework/io/crypto/cipher.h
SRCS
${
CMAKE_BINARY_DIR
}
/../paddle/fluid/framework/io/crypto/cipher.h
DSTS
${
FLUID_INFERENCE_INSTALL_DIR
}
/paddle/include/crypto/
)
DSTS
${
FLUID_INFERENCE_INSTALL_DIR
}
/paddle/include/crypto/
)
include_directories
(
${
CMAKE_BINARY_DIR
}
/../paddle/fluid/framework/io
)
include_directories
(
${
CMAKE_BINARY_DIR
}
/../paddle/fluid/framework/io
)
# CAPI inference library for only inference
# CAPI inference library for only inference
set
(
FLUID_INFERENCE_C_INSTALL_DIR
"
${
CMAKE_BINARY_DIR
}
/fluid_inference_c_install_dir"
CACHE STRING
set
(
FLUID_INFERENCE_C_INSTALL_DIR
"
${
CMAKE_BINARY_DIR
}
/fluid_inference_c_install_dir"
CACHE STRING
"A path setting CAPI fluid inference shared"
)
"A path setting CAPI fluid inference shared"
)
copy_part_of_thrid_party
(
inference_lib_dist
${
FLUID_INFERENCE_C_INSTALL_DIR
}
)
copy_part_of_thrid_party
(
inference_lib_dist
${
FLUID_INFERENCE_C_INSTALL_DIR
}
)
set
(
src_dir
"
${
PADDLE_SOURCE_DIR
}
/paddle/fluid"
)
set
(
src_dir
"
${
PADDLE_SOURCE_DIR
}
/paddle/fluid"
)
if
(
WIN32
)
set
(
paddle_fluid_c_lib
${
PADDLE_BINARY_DIR
}
/paddle/fluid/inference/capi/libpaddle_fluid_c.*
)
set
(
paddle_fluid_c_lib
${
PADDLE_BINARY_DIR
}
/paddle/fluid/inference/capi/
${
CMAKE_BUILD_TYPE
}
/paddle_fluid_c.*
)
else
(
WIN32
)
set
(
paddle_fluid_c_lib
${
PADDLE_BINARY_DIR
}
/paddle/fluid/inference/capi/libpaddle_fluid_c.*
)
endif
(
WIN32
)
copy
(
inference_lib_dist
copy
(
inference_lib_dist
SRCS
${
src_dir
}
/inference/capi/paddle_c_api.h
${
paddle_fluid_c_lib
}
SRCS
${
src_dir
}
/inference/capi/paddle_c_api.h
${
paddle_fluid_c_lib
}
DSTS
${
FLUID_INFERENCE_C_INSTALL_DIR
}
/paddle/include
${
FLUID_INFERENCE_C_INSTALL_DIR
}
/paddle/lib
)
DSTS
${
FLUID_INFERENCE_C_INSTALL_DIR
}
/paddle/include
${
FLUID_INFERENCE_C_INSTALL_DIR
}
/paddle/lib
)
# fluid library for both train and inference
# fluid library for both train and inference
set
(
fluid_lib_deps inference_lib_dist
)
set
(
fluid_lib_deps inference_lib_dist
)
...
...
paddle/fluid/inference/CMakeLists.txt
浏览文件 @
9df18b08
...
@@ -41,11 +41,16 @@ add_subdirectory(api)
...
@@ -41,11 +41,16 @@ add_subdirectory(api)
# Create static inference library if needed
# Create static inference library if needed
# All static libs in inference/api
# All static libs in inference/api
set
(
STATIC_INFERENCE_API paddle_inference_api analysis_predictor zero_copy_tensor reset_tensor_array
set
(
STATIC_INFERENCE_API paddle_inference_api analysis_predictor
analysis_config paddle_pass_builder activation_functions
${
mkldnn_quantizer_cfg
}
)
zero_copy_tensor reset_tensor_array
create_static_lib
(
paddle_fluid
${
fluid_modules
}
${
STATIC_INFERENCE_API
}
)
analysis_config paddle_pass_builder activation_functions
${
mkldnn_quantizer_cfg
}
)
if
(
WIN32
)
cc_library
(
paddle_fluid DEPS
${
fluid_modules
}
${
STATIC_INFERENCE_API
}
)
else
()
create_static_lib
(
paddle_fluid
${
fluid_modules
}
${
STATIC_INFERENCE_API
}
)
endif
()
if
(
NOT APPLE
)
if
(
NOT APPLE
AND NOT WIN32
)
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
# TODO(liuyiqu: Temporarily disable the link flag because it is not support on Mac.
set
(
LINK_FLAGS
"-Wl,--retain-symbols-file
${
CMAKE_CURRENT_SOURCE_DIR
}
/paddle_fluid.sym"
)
set
(
LINK_FLAGS
"-Wl,--retain-symbols-file
${
CMAKE_CURRENT_SOURCE_DIR
}
/paddle_fluid.sym"
)
set_target_properties
(
paddle_fluid PROPERTIES LINK_FLAGS
"
${
LINK_FLAGS
}
"
)
set_target_properties
(
paddle_fluid PROPERTIES LINK_FLAGS
"
${
LINK_FLAGS
}
"
)
...
...
paddle/fluid/inference/api/demo_ci/run.sh
浏览文件 @
9df18b08
...
@@ -72,7 +72,7 @@ if [ $(echo `uname` | grep "Win") != "" ]; then
...
@@ -72,7 +72,7 @@ if [ $(echo `uname` | grep "Win") != "" ]; then
-DWITH_MKL
=
$TURN_ON_MKL
\
-DWITH_MKL
=
$TURN_ON_MKL
\
-DDEMO_NAME
=
simple_on_word2vec
\
-DDEMO_NAME
=
simple_on_word2vec
\
-DWITH_GPU
=
$TEST_GPU_CPU
\
-DWITH_GPU
=
$TEST_GPU_CPU
\
-DWITH_STATIC_LIB
=
O
N
-DWITH_STATIC_LIB
=
O
FF
msbuild /maxcpucount /property:Configuration
=
Release cpp_inference_demo.sln
msbuild /maxcpucount /property:Configuration
=
Release cpp_inference_demo.sln
Release/simple_on_word2vec.exe
\
Release/simple_on_word2vec.exe
\
--dirname
=
$DATA_DIR
/word2vec/word2vec.inference.model
\
--dirname
=
$DATA_DIR
/word2vec/word2vec.inference.model
\
...
@@ -88,7 +88,7 @@ if [ $(echo `uname` | grep "Win") != "" ]; then
...
@@ -88,7 +88,7 @@ if [ $(echo `uname` | grep "Win") != "" ]; then
-DWITH_MKL
=
$TURN_ON_MKL
\
-DWITH_MKL
=
$TURN_ON_MKL
\
-DDEMO_NAME
=
vis_demo
\
-DDEMO_NAME
=
vis_demo
\
-DWITH_GPU
=
$TEST_GPU_CPU
\
-DWITH_GPU
=
$TEST_GPU_CPU
\
-DWITH_STATIC_LIB
=
O
N
-DWITH_STATIC_LIB
=
O
FF
msbuild /maxcpucount /property:Configuration
=
Release cpp_inference_demo.sln
msbuild /maxcpucount /property:Configuration
=
Release cpp_inference_demo.sln
for
vis_demo_name
in
$vis_demo_list
;
do
for
vis_demo_name
in
$vis_demo_list
;
do
Release/vis_demo.exe
\
Release/vis_demo.exe
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录