Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
dd4b29c2
P
Paddle
项目概览
Crayon鑫
/
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看板
未验证
提交
dd4b29c2
编写于
6月 22, 2019
作者:
W
wopeizl
提交者:
GitHub
6月 22, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cherry-pick the inference update for win test=develop (#18246)
* cherry-pick the inference update for win test=develop * test=develop
上级
d0219002
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
71 addition
and
35 deletion
+71
-35
cmake/inference_lib.cmake
cmake/inference_lib.cmake
+28
-10
paddle/fluid/inference/api/demo_ci/CMakeLists.txt
paddle/fluid/inference/api/demo_ci/CMakeLists.txt
+43
-25
未找到文件。
cmake/inference_lib.cmake
浏览文件 @
dd4b29c2
...
@@ -117,11 +117,21 @@ endif ()
...
@@ -117,11 +117,21 @@ endif ()
if
(
WITH_MKLML
)
if
(
WITH_MKLML
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/mklml"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/mklml"
)
copy
(
mklml_lib
if
(
WIN32
)
SRCS
${
MKLML_LIB
}
${
MKLML_IOMP_LIB
}
${
MKLML_INC_DIR
}
copy
(
mklml_lib
DSTS
${
dst_dir
}
/lib
${
dst_dir
}
/lib
${
dst_dir
}
SRCS
${
MKLML_LIB
}
${
MKLML_IOMP_LIB
}
${
MKLML_SHARED_LIB
}
DEPS mklml
${
MKLML_SHARED_LIB_DEPS
}
${
MKLML_SHARED_IOMP_LIB
}
${
MKLML_INC_DIR
}
)
DSTS
${
dst_dir
}
/lib
${
dst_dir
}
/lib
${
dst_dir
}
/lib
${
dst_dir
}
/lib
${
dst_dir
}
/lib
${
dst_dir
}
DEPS mklml
)
else
()
copy
(
mklml_lib
SRCS
${
MKLML_LIB
}
${
MKLML_IOMP_LIB
}
${
MKLML_INC_DIR
}
DSTS
${
dst_dir
}
/lib
${
dst_dir
}
/lib
${
dst_dir
}
DEPS mklml
)
endif
()
elseif
(
NOT CBLAS_FOUND OR WIN32
)
elseif
(
NOT CBLAS_FOUND OR WIN32
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/openblas"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/openblas"
)
copy
(
openblas_lib
copy
(
openblas_lib
...
@@ -133,11 +143,19 @@ endif ()
...
@@ -133,11 +143,19 @@ endif ()
if
(
WITH_MKLDNN
)
if
(
WITH_MKLDNN
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/mkldnn"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/mkldnn"
)
copy
(
mkldnn_lib
if
(
WIN32
)
SRCS
${
MKLDNN_INC_DIR
}
${
MKLDNN_SHARED_LIB
}
copy
(
mkldnn_lib
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
SRCS
${
MKLDNN_INC_DIR
}
${
MKLDNN_SHARED_LIB
}
${
MKLDNN_LIB
}
DEPS mkldnn_shared_lib
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
${
dst_dir
}
/lib
)
DEPS mkldnn_shared_lib
)
else
()
copy
(
mkldnn_lib
SRCS
${
MKLDNN_INC_DIR
}
${
MKLDNN_SHARED_LIB
}
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
DEPS mkldnn_shared_lib
)
endif
()
endif
()
endif
()
if
(
WITH_NGRAPH
)
if
(
WITH_NGRAPH
)
...
...
paddle/fluid/inference/api/demo_ci/CMakeLists.txt
浏览文件 @
dd4b29c2
...
@@ -23,24 +23,24 @@ if(NOT DEFINED DEMO_NAME)
...
@@ -23,24 +23,24 @@ if(NOT DEFINED DEMO_NAME)
endif
()
endif
()
include_directories
(
"
${
PADDLE_LIB
}
/"
)
include_directories
(
"
${
PADDLE_LIB
}
/"
)
include_directories
(
"
${
PADDLE_LIB
}
/fluid_inference_install_dir
/"
)
set
(
PADDLE_LIB_THIRD_PARTY_PATH
"
${
PADDLE_LIB
}
/third_party/install
/"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
protobuf/include"
)
include_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
protobuf/include"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
glog/include"
)
include_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
glog/include"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
gflags/include"
)
include_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
gflags/include"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
xxhash/include"
)
include_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
xxhash/include"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
snappy/include"
)
include_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
snappy/include"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
snappystream/include"
)
include_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
snappystream/include"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
zlib/include"
)
include_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
zlib/include"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/boost"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/boost"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/eigen3"
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/eigen3"
)
link_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
snappy/lib"
)
link_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
snappy/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
snappystream/lib"
)
link_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
snappystream/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
zlib/lib"
)
link_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
zlib/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
protobuf/lib"
)
link_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
protobuf/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
glog/lib"
)
link_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
glog/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
gflags/lib"
)
link_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
gflags/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/third_party/install/
xxhash/lib"
)
link_directories
(
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
xxhash/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/paddle/lib"
)
link_directories
(
"
${
PADDLE_LIB
}
/paddle/lib"
)
if
(
WIN32
)
if
(
WIN32
)
...
@@ -76,7 +76,7 @@ if (NOT WIN32)
...
@@ -76,7 +76,7 @@ if (NOT WIN32)
endif
(
NOT WIN32
)
endif
(
NOT WIN32
)
if
(
NOT WIN32
)
if
(
NOT WIN32
)
set
(
NGRAPH_PATH
"
${
PADDLE_LIB
}
/third_party/install/
ngraph"
)
set
(
NGRAPH_PATH
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
ngraph"
)
if
(
EXISTS
${
NGRAPH_PATH
}
)
if
(
EXISTS
${
NGRAPH_PATH
}
)
include
(
GNUInstallDirs
)
include
(
GNUInstallDirs
)
include_directories
(
"
${
NGRAPH_PATH
}
/include"
)
include_directories
(
"
${
NGRAPH_PATH
}
/include"
)
...
@@ -86,15 +86,18 @@ if (NOT WIN32)
...
@@ -86,15 +86,18 @@ if (NOT WIN32)
endif
()
endif
()
if
(
WITH_MKL
)
if
(
WITH_MKL
)
include_directories
(
"
${
PADDLE_LIB
}
/third_party/install/mklml/include"
)
set
(
MATH_LIB_PATH
"
${
PADDLE_LIB_THIRD_PARTY_PATH
}
mklml"
)
if
(
NOT WIN32
)
include_directories
(
"
${
MATH_LIB_PATH
}
/include"
)
set
(
MATH_LIB
${
PADDLE_LIB
}
/third_party/install/mklml/lib/libmklml_intel
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
if
(
WIN32
)
${
PADDLE_LIB
}
/third_party/install/mklml/lib/libiomp5
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
set
(
MATH_DLL
${
MATH_LIB_PATH
}
/lib/mklml
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
${
MATH_LIB_PATH
}
/lib/libiomp5md
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
${
MATH_LIB_PATH
}
/lib/msvcr120
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
else
()
else
()
set
(
MATH_LIB
${
PADDLE_LIB
}
/third_party/install/mklml/lib/libmklm
l
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
set
(
MATH_LIB
${
MATH_LIB_PATH
}
/lib/libmklml_inte
l
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
${
PADDLE_LIB
}
/third_party/install/mklml/lib/libiomp5md
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
${
MATH_LIB_PATH
}
/lib/libiomp5
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
endif
()
endif
()
set
(
MKLDNN_PATH
"
${
PADDLE_LIB
}
/third_party/install/
mkldnn"
)
set
(
MKLDNN_PATH
"
${
PADDLE_LIB
_THIRD_PARTY_PATH
}
mkldnn"
)
if
(
EXISTS
${
MKLDNN_PATH
}
)
if
(
EXISTS
${
MKLDNN_PATH
}
)
include_directories
(
"
${
MKLDNN_PATH
}
/include"
)
include_directories
(
"
${
MKLDNN_PATH
}
/include"
)
if
(
WIN32
)
if
(
WIN32
)
...
@@ -104,7 +107,10 @@ if(WITH_MKL)
...
@@ -104,7 +107,10 @@ if(WITH_MKL)
endif
(
WIN32
)
endif
(
WIN32
)
endif
()
endif
()
else
()
else
()
set
(
MATH_LIB
${
PADDLE_LIB
}
/third_party/install/openblas/lib/libopenblas
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
set
(
MATH_LIB
${
PADDLE_LIB_THIRD_PARTY_PATH
}
openblas/lib/libopenblas
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
if
(
WIN32
)
set
(
MATH_DLL
${
PADDLE_LIB_THIRD_PARTY_PATH
}
openblas/lib/openblas
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
endif
()
endif
()
endif
()
# Note: libpaddle_inference_api.so/a must put before libpaddle_fluid.so/a
# Note: libpaddle_inference_api.so/a must put before libpaddle_fluid.so/a
...
@@ -123,7 +129,7 @@ if (NOT WIN32)
...
@@ -123,7 +129,7 @@ if (NOT WIN32)
else
()
else
()
set
(
DEPS
${
DEPS
}
set
(
DEPS
${
DEPS
}
${
MATH_LIB
}
${
MKLDNN_LIB
}
${
MATH_LIB
}
${
MKLDNN_LIB
}
glog gflags_static protobuf snappy zlibstatic xxhash snappystream
${
EXTERNAL_LIB
}
)
glog gflags_static
lib
protobuf snappy zlibstatic xxhash snappystream
${
EXTERNAL_LIB
}
)
set
(
DEPS
${
DEPS
}
libcmt shlwapi.lib
)
set
(
DEPS
${
DEPS
}
libcmt shlwapi.lib
)
endif
(
NOT WIN32
)
endif
(
NOT WIN32
)
...
@@ -143,3 +149,15 @@ endif()
...
@@ -143,3 +149,15 @@ endif()
add_executable
(
${
DEMO_NAME
}
${
DEMO_NAME
}
.cc
)
add_executable
(
${
DEMO_NAME
}
${
DEMO_NAME
}
.cc
)
target_link_libraries
(
${
DEMO_NAME
}
${
DEPS
}
)
target_link_libraries
(
${
DEMO_NAME
}
${
DEPS
}
)
if
(
WIN32
)
if
(
WITH_MKL
)
add_custom_command
(
TARGET
${
DEMO_NAME
}
POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
MKLDNN_PATH
}
/lib/mkldnn.dll
${
CMAKE_BINARY_DIR
}
/
${
CMAKE_BUILD_TYPE
}
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
MATH_DLL
}
${
CMAKE_BINARY_DIR
}
/
${
CMAKE_BUILD_TYPE
}
)
else
()
add_custom_command
(
TARGET
${
DEMO_NAME
}
POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
MATH_DLL
}
${
CMAKE_BINARY_DIR
}
/
${
CMAKE_BUILD_TYPE
}
)
endif
()
endif
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录