Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
59e4dd57
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看板
提交
59e4dd57
编写于
2月 06, 2018
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add independent inference_lib.cmake
上级
446198da
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
75 addition
and
70 deletion
+75
-70
CMakeLists.txt
CMakeLists.txt
+1
-0
cmake/external/eigen.cmake
cmake/external/eigen.cmake
+0
-8
cmake/external/gflags.cmake
cmake/external/gflags.cmake
+0
-7
cmake/external/glog.cmake
cmake/external/glog.cmake
+0
-7
cmake/external/protobuf.cmake
cmake/external/protobuf.cmake
+0
-7
cmake/inference_lib.cmake
cmake/inference_lib.cmake
+74
-0
paddle/framework/CMakeLists.txt
paddle/framework/CMakeLists.txt
+0
-8
paddle/inference/CMakeLists.txt
paddle/inference/CMakeLists.txt
+0
-11
paddle/memory/CMakeLists.txt
paddle/memory/CMakeLists.txt
+0
-7
paddle/platform/CMakeLists.txt
paddle/platform/CMakeLists.txt
+0
-8
paddle/string/CMakeLists.txt
paddle/string/CMakeLists.txt
+0
-7
未找到文件。
CMakeLists.txt
浏览文件 @
59e4dd57
...
...
@@ -156,6 +156,7 @@ include(rdma) # set rdma libraries
include
(
flags
)
# set paddle compile flags
include
(
version
)
# set PADDLE_VERSION
include
(
coveralls
)
# set code coverage
include
(
inference_lib
)
# add paddle fluid inference libraries
include_directories
(
"
${
PADDLE_SOURCE_DIR
}
"
)
...
...
cmake/external/eigen.cmake
浏览文件 @
59e4dd57
...
...
@@ -28,11 +28,3 @@ endif()
add_dependencies
(
eigen3 extern_eigen3
)
LIST
(
APPEND external_project_dependencies eigen3
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/eigen3"
)
add_custom_target
(
eigen3_lib
COMMAND mkdir -p
"
${
lib_dir
}
/Eigen"
"
${
lib_dir
}
/unsupported"
COMMAND cp
"
${
EIGEN_INCLUDE_DIR
}
/Eigen/Core"
"
${
lib_dir
}
/Eigen"
COMMAND cp -r
"
${
EIGEN_INCLUDE_DIR
}
/Eigen/src"
"
${
lib_dir
}
/Eigen"
COMMAND cp -r
"
${
EIGEN_INCLUDE_DIR
}
/unsupported/Eigen"
"
${
lib_dir
}
/unsupported"
)
cmake/external/gflags.cmake
浏览文件 @
59e4dd57
...
...
@@ -60,10 +60,3 @@ IF(WITH_C_API)
INSTALL
(
FILES
${
GFLAGS_LIBRARIES
}
DESTINATION third_party/gflags/lib
)
ENDIF
()
ENDIF
()
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/gflags"
)
add_custom_target
(
gflags_lib
COMMAND mkdir -p
"
${
lib_dir
}
/lib"
COMMAND cp -r
"
${
GFLAGS_INCLUDE_DIR
}
"
"
${
lib_dir
}
"
COMMAND cp
"
${
GFLAGS_LIBRARIES
}
"
"
${
lib_dir
}
/lib"
)
cmake/external/glog.cmake
浏览文件 @
59e4dd57
...
...
@@ -76,10 +76,3 @@ IF(WITH_C_API)
INSTALL
(
FILES
${
GLOG_LIBRARIES
}
DESTINATION third_party/glog/lib
)
ENDIF
()
ENDIF
()
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/glog"
)
add_custom_target
(
glog_lib
COMMAND mkdir -p
"
${
lib_dir
}
/lib"
COMMAND cp -r
"
${
GLOG_INCLUDE_DIR
}
"
"
${
lib_dir
}
"
COMMAND cp
"
${
GLOG_LIBRARIES
}
"
"
${
lib_dir
}
/lib"
)
cmake/external/protobuf.cmake
浏览文件 @
59e4dd57
...
...
@@ -259,13 +259,6 @@ IF(NOT PROTOBUF_FOUND)
ENDIF
()
ENDIF
()
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/protobuf"
)
add_custom_target
(
protobuf_lib
COMMAND mkdir -p
"
${
lib_dir
}
/lib"
COMMAND cp -r
"
${
PROTOBUF_INCLUDE_DIR
}
"
"
${
lib_dir
}
"
COMMAND cp
"
${
PROTOBUF_LITE_LIBRARY
}
"
"
${
lib_dir
}
/lib"
)
IF
(
CMAKE_CROSSCOMPILING
)
PROMPT_PROTOBUF_LIB
(
protobuf_host extern_protobuf
)
ELSE
()
...
...
cmake/inference_lib.cmake
0 → 100644
浏览文件 @
59e4dd57
# make package for paddle fluid shared and static library
# third party
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/eigen3"
)
add_custom_target
(
eigen3_lib
COMMAND mkdir -p
"
${
lib_dir
}
/Eigen"
"
${
lib_dir
}
/unsupported"
COMMAND cp
"
${
EIGEN_INCLUDE_DIR
}
/Eigen/Core"
"
${
lib_dir
}
/Eigen"
COMMAND cp -r
"
${
EIGEN_INCLUDE_DIR
}
/Eigen/src"
"
${
lib_dir
}
/Eigen"
COMMAND cp -r
"
${
EIGEN_INCLUDE_DIR
}
/unsupported/Eigen"
"
${
lib_dir
}
/unsupported"
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/gflags"
)
add_custom_target
(
gflags_lib
COMMAND mkdir -p
"
${
lib_dir
}
/lib"
COMMAND cp -r
"
${
GFLAGS_INCLUDE_DIR
}
"
"
${
lib_dir
}
"
COMMAND cp
"
${
GFLAGS_LIBRARIES
}
"
"
${
lib_dir
}
/lib"
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/glog"
)
add_custom_target
(
glog_lib
COMMAND mkdir -p
"
${
lib_dir
}
/lib"
COMMAND cp -r
"
${
GLOG_INCLUDE_DIR
}
"
"
${
lib_dir
}
"
COMMAND cp
"
${
GLOG_LIBRARIES
}
"
"
${
lib_dir
}
/lib"
)
IF
(
NOT PROTOBUF_FOUND
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/protobuf"
)
add_custom_target
(
protobuf_lib
COMMAND mkdir -p
"
${
lib_dir
}
/lib"
COMMAND cp -r
"
${
PROTOBUF_INCLUDE_DIR
}
"
"
${
lib_dir
}
"
COMMAND cp
"
${
PROTOBUF_LITE_LIBRARY
}
"
"
${
lib_dir
}
/lib"
)
ENDIF
(
NOT PROTOBUF_FOUND
)
# paddle fluid module
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/framework"
)
add_custom_target
(
framework_lib DEPENDS framework_py_proto
COMMAND mkdir -p
"
${
lib_dir
}
/details"
COMMAND cp
"
${
PADDLE_SOURCE_DIR
}
/paddle/framework/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
PADDLE_SOURCE_DIR
}
/paddle/framework/details/*.h"
"
${
lib_dir
}
/details"
COMMAND cp
"
${
PADDLE_BINARY_DIR
}
/paddle/framework/framework.pb.h"
"
${
lib_dir
}
"
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/memory"
)
add_custom_target
(
memory_lib
COMMAND mkdir -p
"
${
lib_dir
}
/detail"
COMMAND cp
"
${
PADDLE_SOURCE_DIR
}
/paddle/memory/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
PADDLE_SOURCE_DIR
}
/paddle/memory/detail/*.h"
"
${
lib_dir
}
/detail"
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/inference"
)
add_custom_target
(
inference_lib DEPENDS paddle_fluid_shared
COMMAND mkdir -p
"
${
lib_dir
}
"
COMMAND cp
"
${
PADDLE_SOURCE_DIR
}
/paddle/inference/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
PADDLE_BINARY_DIR
}
/paddle/inference/libpaddle_fluid.so"
"
${
lib_dir
}
"
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/platform"
)
add_custom_target
(
platform_lib
COMMAND mkdir -p
"
${
lib_dir
}
/dynload"
"
${
lib_dir
}
/details"
COMMAND cp
"
${
PADDLE_SOURCE_DIR
}
/paddle/platform/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
PADDLE_SOURCE_DIR
}
/paddle/platform/dynload/*.h"
"
${
lib_dir
}
/dynload"
COMMAND cp
"
${
PADDLE_SOURCE_DIR
}
/paddle/platform/details/*.h"
"
${
lib_dir
}
/details"
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/string"
)
add_custom_target
(
string_lib
COMMAND mkdir -p
"
${
lib_dir
}
/tinyformat"
COMMAND cp
"
${
PADDLE_SOURCE_DIR
}
/paddle/string/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
PADDLE_SOURCE_DIR
}
/paddle/string/tinyformat/*.h"
"
${
lib_dir
}
/tinyformat"
)
add_custom_target
(
inference_lib_dist DEPENDS
inference_lib framework_lib memory_lib platform_lib string_lib
gflags_lib glog_lib protobuf_lib eigen3_lib
)
paddle/framework/CMakeLists.txt
浏览文件 @
59e4dd57
...
...
@@ -92,12 +92,4 @@ cc_test(init_test SRCS init_test.cc DEPS init)
cc_test
(
op_kernel_type_test SRCS op_kernel_type_test.cc DEPS place device_context framework_proto
)
cc_test
(
cow_ptr_tests SRCS details/cow_ptr_test.cc
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/framework"
)
add_custom_target
(
framework_lib DEPENDS framework_py_proto
COMMAND mkdir -p
"
${
lib_dir
}
/details"
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/details/*.h"
"
${
lib_dir
}
/details"
COMMAND cp
"
${
CMAKE_CURRENT_BINARY_DIR
}
/framework.pb.h"
"
${
lib_dir
}
"
)
cc_test
(
channel_test SRCS channel_test.cc
)
paddle/inference/CMakeLists.txt
浏览文件 @
59e4dd57
...
...
@@ -18,17 +18,6 @@ target_circle_link_libraries(paddle_fluid_shared
SET_TARGET_PROPERTIES
(
paddle_fluid_shared PROPERTIES OUTPUT_NAME paddle_fluid
)
# install library & headers
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/inference"
)
add_custom_target
(
inference_lib DEPENDS paddle_fluid_shared
COMMAND mkdir -p
"
${
lib_dir
}
"
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
CMAKE_CURRENT_BINARY_DIR
}
/libpaddle_fluid.so"
"
${
lib_dir
}
"
)
add_custom_target
(
inference_lib_dist DEPENDS
inference_lib framework_lib memory_lib platform_lib string_lib
gflags_lib glog_lib protobuf_lib eigen3_lib
)
if
(
WITH_TESTING
)
add_subdirectory
(
tests/book
)
endif
()
paddle/memory/CMakeLists.txt
浏览文件 @
59e4dd57
...
...
@@ -14,10 +14,3 @@ cc_library(paddle_memory
system_allocator
)
cc_test
(
memory_test SRCS memory_test.cc DEPS place paddle_memory
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/memory"
)
add_custom_target
(
memory_lib
COMMAND mkdir -p
"
${
lib_dir
}
/detail"
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/detail/*.h"
"
${
lib_dir
}
/detail"
)
paddle/platform/CMakeLists.txt
浏览文件 @
59e4dd57
...
...
@@ -39,11 +39,3 @@ nv_test(nccl_test SRCS nccl_test.cu DEPS dynload_cuda gpu_info device_context)
cc_library
(
profiler SRCS profiler.cc DEPS device_context
)
cc_test
(
profiler_test SRCS profiler_test.cc DEPS profiler
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/platform"
)
add_custom_target
(
platform_lib
COMMAND mkdir -p
"
${
lib_dir
}
/dynload"
"
${
lib_dir
}
/details"
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/dynload/*.h"
"
${
lib_dir
}
/dynload"
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/details/*.h"
"
${
lib_dir
}
/details"
)
paddle/string/CMakeLists.txt
浏览文件 @
59e4dd57
...
...
@@ -2,10 +2,3 @@ cc_library(stringpiece SRCS piece.cc)
cc_test
(
stringpiece_test SRCS piece_test.cc DEPS stringpiece glog gflags
)
cc_test
(
stringprintf_test SRCS printf_test.cc DEPS glog gflags
)
cc_test
(
to_string_test SRCS to_string_test.cc
)
set
(
lib_dir
"
${
CMAKE_INSTALL_PREFIX
}
/paddle/string"
)
add_custom_target
(
string_lib
COMMAND mkdir -p
"
${
lib_dir
}
/tinyformat"
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.h"
"
${
lib_dir
}
"
COMMAND cp
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/tinyformat/*.h"
"
${
lib_dir
}
/tinyformat"
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录