Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
91d8373b
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看板
提交
91d8373b
编写于
5月 22, 2018
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change CMAKE_INSTALL_PREFIX to FLUID_INSTALL_DIR
上级
dac0679a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
17 deletion
+21
-17
CMakeLists.txt
CMakeLists.txt
+3
-0
cmake/inference_lib.cmake
cmake/inference_lib.cmake
+14
-14
paddle/fluid/train/demo/README.md
paddle/fluid/train/demo/README.md
+2
-2
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+2
-1
未找到文件。
CMakeLists.txt
浏览文件 @
91d8373b
...
...
@@ -100,6 +100,9 @@ endif()
set
(
THIRD_PARTY_PATH
"
${
CMAKE_BINARY_DIR
}
/third_party"
CACHE STRING
"A path setting third party libraries download & build directories."
)
set
(
FLUID_INSTALL_DIR
"
${
CMAKE_BINARY_DIR
}
/fluid_install_dir"
CACHE STRING
"A path setting fluid shared and static libraries"
)
if
(
WITH_C_API AND WITH_PYTHON
)
message
(
WARNING
"It is suggest not embedded a python interpreter in Paddle "
"when using C-API. It will give an unpredictable behavior when using a "
...
...
cmake/inference_lib.cmake
浏览文件 @
91d8373b
...
...
@@ -52,32 +52,32 @@ function(copy TARGET)
endfunction
()
# third party
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/eigen3"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/eigen3"
)
copy
(
eigen3_lib
SRCS
${
EIGEN_INCLUDE_DIR
}
/Eigen/Core
${
EIGEN_INCLUDE_DIR
}
/Eigen/src
${
EIGEN_INCLUDE_DIR
}
/unsupported/Eigen
DSTS
${
dst_dir
}
/Eigen
${
dst_dir
}
/Eigen
${
dst_dir
}
/unsupported
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/gflags"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/gflags"
)
copy
(
gflags_lib
SRCS
${
GFLAGS_INCLUDE_DIR
}
${
GFLAGS_LIBRARIES
}
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/glog"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/glog"
)
copy
(
glog_lib
SRCS
${
GLOG_INCLUDE_DIR
}
${
GLOG_LIBRARIES
}
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/boost/"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/boost/"
)
copy
(
boost_lib
SRCS
${
BOOST_INCLUDE_DIR
}
/boost
DSTS
${
dst_dir
}
)
if
(
NOT PROTOBUF_FOUND
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/protobuf"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/protobuf"
)
copy
(
protobuf_lib
SRCS
${
PROTOBUF_INCLUDE_DIR
}
${
PROTOBUF_LIBRARY
}
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
...
...
@@ -85,13 +85,13 @@ if(NOT PROTOBUF_FOUND)
endif
()
if
(
NOT CBLAS_FOUND
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/openblas"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/openblas"
)
copy
(
openblas_lib
SRCS
${
CBLAS_INSTALL_DIR
}
/lib
${
CBLAS_INSTALL_DIR
}
/include
DSTS
${
dst_dir
}
${
dst_dir
}
)
elseif
(
WITH_MKLML
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/mklml"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/mklml"
)
copy
(
mklml_lib
SRCS
${
MKLML_LIB
}
${
MKLML_IOMP_LIB
}
${
MKLML_INC_DIR
}
DSTS
${
dst_dir
}
/lib
${
dst_dir
}
/lib
${
dst_dir
}
...
...
@@ -99,7 +99,7 @@ elseif (WITH_MKLML)
endif
()
if
(
WITH_MKLDNN
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/mkldnn"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/mkldnn"
)
copy
(
mkldnn_lib
SRCS
${
MKLDNN_INC_DIR
}
${
MKLDNN_SHARED_LIB
}
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
...
...
@@ -107,17 +107,17 @@ if(WITH_MKLDNN)
endif
()
if
(
NOT MOBILE_INFERENCE AND NOT RPI
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/snappy"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/snappy"
)
copy
(
snappy_lib
SRCS
${
SNAPPY_INCLUDE_DIR
}
${
SNAPPY_LIBRARIES
}
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/snappystream"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/snappystream"
)
copy
(
snappystream_lib
SRCS
${
SNAPPYSTREAM_INCLUDE_DIR
}
${
SNAPPYSTREAM_LIBRARIES
}
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/zlib"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/third_party/install/zlib"
)
copy
(
zlib_lib
SRCS
${
ZLIB_INCLUDE_DIR
}
${
ZLIB_LIBRARIES
}
DSTS
${
dst_dir
}
${
dst_dir
}
/lib
)
...
...
@@ -125,7 +125,7 @@ endif()
# paddle fluid module
set
(
src_dir
"
${
PADDLE_SOURCE_DIR
}
/paddle/fluid"
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/fluid"
)
set
(
dst_dir
"
${
FLUID_INSTALL_DIR
}
/paddle/fluid"
)
set
(
module
"framework"
)
copy
(
framework_lib DEPS framework_py_proto
SRCS
${
src_dir
}
/
${
module
}
/*.h
${
src_dir
}
/
${
module
}
/details/*.h
${
PADDLE_BINARY_DIR
}
/paddle/fluid/framework/framework.pb.h
...
...
@@ -165,7 +165,7 @@ copy(pybind_lib
# CMakeCache Info
copy
(
cmake_cache
SRCS
${
CMAKE_CURRENT_BINARY_DIR
}
/CMakeCache.txt
DSTS
${
CMAKE_INSTALL_PREFIX
}
)
DSTS
${
FLUID_INSTALL_DIR
}
)
add_custom_target
(
inference_lib_dist DEPENDS
${
inference_lib_dist_dep
}
)
...
...
@@ -173,7 +173,7 @@ add_custom_target(inference_lib_dist DEPENDS ${inference_lib_dist_dep})
execute_process
(
COMMAND
${
GIT_EXECUTABLE
}
log --pretty=format:%H -1
OUTPUT_VARIABLE PADDLE_GIT_COMMIT
)
set
(
version_file
${
CMAKE_INSTALL_PREFIX
}
/version.txt
)
set
(
version_file
${
FLUID_INSTALL_DIR
}
/version.txt
)
file
(
WRITE
${
version_file
}
"GIT COMMIT ID:
${
PADDLE_GIT_COMMIT
}
\n
"
"WITH_MKL:
${
WITH_MKL
}
\n
"
...
...
paddle/fluid/train/demo/README.md
浏览文件 @
91d8373b
...
...
@@ -7,7 +7,7 @@
# WITH_MKLDNN=ON|OFF
PADDLE_LIB=/paddle/lib/dir
cmake .. -D
CMAKE_INSTALL_PREFIX
=$PADDLE_LIB \
cmake .. -D
FLUID_INSTALL_DIR
=$PADDLE_LIB \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_FLUID_ONLY=ON \
-DWITH_GPU=OFF \
...
...
@@ -42,7 +42,7 @@ cd build
# WITH_MKLDNN=ON|OFF
PADDLE_LIB=/paddle/lib/dir
# PADDLE_LIB is the same with
CMAKE_INSTALL_PREFIX
when building the lib
# PADDLE_LIB is the same with
FLUID_INSTALL_DIR
when building the lib
cmake .. -DPADDLE_LIB=$PADDLE_LIB \
-DWITH_MKLDNN=OFF \
-DWITH_MKL=OFF
...
...
paddle/scripts/paddle_build.sh
浏览文件 @
91d8373b
...
...
@@ -493,7 +493,8 @@ function gen_fluid_inference_lib() {
========================================
EOF
make
-j
`
nproc
`
inference_lib_dist
fi
tar
-cf
${
PADDLE_ROOT
}
/build/fluid.tgz
${
PADDLE_ROOT
}
/build/fluid_install_dir
fi
}
function
main
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录