Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
1575c2c8
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1575c2c8
编写于
1月 22, 2018
作者:
T
Tao Luo
提交者:
GitHub
1月 22, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7572 from luotao1/fluid_infer
compile and install the shared library of fluid inference
上级
bdf57a20
8b442e8c
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
66 addition
and
11 deletion
+66
-11
CMakeLists.txt
CMakeLists.txt
+6
-0
cmake/external/eigen.cmake
cmake/external/eigen.cmake
+8
-2
cmake/external/gflags.cmake
cmake/external/gflags.cmake
+1
-1
cmake/external/glog.cmake
cmake/external/glog.cmake
+1
-1
cmake/external/protobuf.cmake
cmake/external/protobuf.cmake
+1
-1
paddle/framework/CMakeLists.txt
paddle/framework/CMakeLists.txt
+7
-0
paddle/inference/CMakeLists.txt
paddle/inference/CMakeLists.txt
+21
-5
paddle/memory/CMakeLists.txt
paddle/memory/CMakeLists.txt
+7
-0
paddle/platform/CMakeLists.txt
paddle/platform/CMakeLists.txt
+8
-0
paddle/string/CMakeLists.txt
paddle/string/CMakeLists.txt
+6
-1
未找到文件。
CMakeLists.txt
浏览文件 @
1575c2c8
...
...
@@ -55,6 +55,8 @@ option(WITH_COVERAGE "Compile PaddlePaddle with code coverage" OFF)
option
(
COVERALLS_UPLOAD
"Package code coverage data to coveralls"
OFF
)
option
(
ON_TRAVIS
"Exclude special unit test on Travis CI"
OFF
)
option
(
WITH_C_API
"Compile PaddlePaddle with C-API(Prediction)"
OFF
)
# TODO: Only compile PaddlePaddle fluid version by WITH_FLUID option.
option
(
WITH_FLUID
"Compile PaddlePaddle fluid only(TODO)"
ON
)
option
(
WITH_GOLANG
"Compile PaddlePaddle with GOLANG"
OFF
)
option
(
GLIDE_INSTALL
"Download and install go dependencies "
ON
)
option
(
USE_NNPACK
"Compile PaddlePaddle with NNPACK library"
OFF
)
...
...
@@ -107,6 +109,10 @@ if (WITH_C_API AND WITH_PYTHON)
"different Python interpreter from compiling."
)
endif
()
if
(
WITH_C_API
)
set
(
WITH_FLUID OFF CACHE STRING
"Disable install fluid when compile the C_API"
FORCE
)
endif
()
if
(
MOBILE_INFERENCE
)
set
(
THIRD_PARTY_BUILD_TYPE MinSizeRel
)
else
()
...
...
cmake/external/eigen.cmake
浏览文件 @
1575c2c8
INCLUDE
(
ExternalProject
)
SET
(
EIGEN_SOURCE_DIR
${
THIRD_PARTY_PATH
}
/eigen3
)
INCLUDE_DIRECTORIES
(
${
EIGEN_
SOURCE_DIR
}
/src/extern_eigen3
)
SET
(
EIGEN_INCLUDE_DIR
${
EIGEN_SOURCE_DIR
}
/src/extern_eigen3
)
INCLUDE_DIRECTORIES
(
${
EIGEN_
INCLUDE_DIR
}
)
ExternalProject_Add
(
extern_eigen3
...
...
@@ -28,3 +28,9 @@ endif()
add_dependencies
(
eigen3 extern_eigen3
)
LIST
(
APPEND external_project_dependencies eigen3
)
IF
(
NOT WITH_C_API AND WITH_FLUID
)
INSTALL
(
FILES
${
EIGEN_INCLUDE_DIR
}
/Eigen/Core DESTINATION third_party/eigen3/Eigen
)
INSTALL
(
DIRECTORY
${
EIGEN_INCLUDE_DIR
}
/Eigen/src DESTINATION third_party/eigen3/Eigen
)
INSTALL
(
DIRECTORY
${
EIGEN_INCLUDE_DIR
}
/unsupported/Eigen DESTINATION third_party/eigen3/unsupported
)
ENDIF
()
cmake/external/gflags.cmake
浏览文件 @
1575c2c8
...
...
@@ -52,7 +52,7 @@ ADD_DEPENDENCIES(gflags extern_gflags)
LIST
(
APPEND external_project_dependencies gflags
)
IF
(
WITH_C_API
)
IF
(
WITH_C_API
OR WITH_FLUID
)
INSTALL
(
DIRECTORY
${
GFLAGS_INCLUDE_DIR
}
DESTINATION third_party/gflags
)
IF
(
ANDROID
)
INSTALL
(
FILES
${
GFLAGS_LIBRARIES
}
DESTINATION third_party/gflags/lib/
${
ANDROID_ABI
}
)
...
...
cmake/external/glog.cmake
浏览文件 @
1575c2c8
...
...
@@ -68,7 +68,7 @@ LINK_LIBRARIES(glog gflags)
LIST
(
APPEND external_project_dependencies glog
)
IF
(
WITH_C_API
)
IF
(
WITH_C_API
OR WITH_FLUID
)
INSTALL
(
DIRECTORY
${
GLOG_INCLUDE_DIR
}
DESTINATION third_party/glog
)
IF
(
ANDROID
)
INSTALL
(
FILES
${
GLOG_LIBRARIES
}
DESTINATION third_party/glog/lib/
${
ANDROID_ABI
}
)
...
...
cmake/external/protobuf.cmake
浏览文件 @
1575c2c8
...
...
@@ -250,7 +250,7 @@ IF(NOT PROTOBUF_FOUND)
SET
(
PROTOBUF_PROTOC_LIBRARY
${
extern_protobuf_PROTOC_LIBRARY
}
CACHE FILEPATH
"protoc library."
FORCE
)
IF
(
WITH_C_API
)
IF
(
WITH_C_API
OR WITH_FLUID
)
INSTALL
(
DIRECTORY
${
PROTOBUF_INCLUDE_DIR
}
DESTINATION third_party/protobuf
)
IF
(
ANDROID
)
INSTALL
(
FILES
${
PROTOBUF_LITE_LIBRARY
}
DESTINATION third_party/protobuf/lib/
${
ANDROID_ABI
}
)
...
...
paddle/framework/CMakeLists.txt
浏览文件 @
1575c2c8
...
...
@@ -88,3 +88,10 @@ 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
)
if
(
NOT WITH_C_API AND WITH_FLUID
)
file
(
GLOB FRAMEWORK_HEADERS *.h
)
install
(
FILES
${
FRAMEWORK_HEADERS
}
DESTINATION include/paddle/framework
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/framework.pb.h DESTINATION include/paddle/framework
)
install
(
FILES details/cow_ptr.h details/op_registry.h DESTINATION include/paddle/framework/details
)
endif
()
paddle/inference/CMakeLists.txt
浏览文件 @
1575c2c8
set
(
FLUID_CORE_MODULES
backward proto_desc paddle_memory executor prune init
${
GLOB_OP_LIB
}
)
set
(
FLUID_CORE_MODULES proto_desc paddle_memory executor prune init
)
cc_library
(
paddle_fluid_api
SRCS inference.cc
DEPS
${
FLUID_CORE_MODULES
}
)
DEPS
${
FLUID_CORE_MODULES
}
${
GLOB_OP_LIB
}
)
# Merge all modules into a simgle static library
cc_library
(
paddle_fluid DEPS paddle_fluid_api
${
FLUID_CORE_MODULES
}
)
# Merge all modules into a single static library
cc_library
(
paddle_fluid DEPS paddle_fluid_api
${
FLUID_CORE_MODULES
}
${
GLOB_OP_LIB
}
)
# Create shared library
add_library
(
paddle_fluid_shared SHARED inference.cc
)
target_circle_link_libraries
(
paddle_fluid_shared
ARCHIVE_START
${
GLOB_OP_LIB
}
ARCHIVE_END
${
FLUID_CORE_MODULES
}
)
SET_TARGET_PROPERTIES
(
paddle_fluid_shared PROPERTIES OUTPUT_NAME paddle_fluid
)
# install library & headers
if
(
NOT WITH_C_API AND WITH_FLUID
)
install
(
FILES inference.h DESTINATION include/paddle/inference
)
install
(
TARGETS paddle_fluid_shared DESTINATION lib
)
endif
()
add_executable
(
example example.cc
)
if
(
APPLE
)
...
...
paddle/memory/CMakeLists.txt
浏览文件 @
1575c2c8
...
...
@@ -14,3 +14,10 @@ cc_library(paddle_memory
system_allocator
)
cc_test
(
memory_test SRCS memory_test.cc DEPS place paddle_memory
)
if
(
NOT WITH_C_API AND WITH_FLUID
)
file
(
GLOB MEMORY_HEADERS *.h
)
file
(
GLOB MEMORY_DETAIL_HEADERS detail/*.h
)
install
(
FILES
${
MEMORY_HEADERS
}
DESTINATION include/paddle/memory
)
install
(
FILES
${
MEMORY_DETAIL_HEADERS
}
DESTINATION include/paddle/memory/detail
)
endif
()
paddle/platform/CMakeLists.txt
浏览文件 @
1575c2c8
...
...
@@ -39,3 +39,11 @@ 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
)
if
(
NOT WITH_C_API AND WITH_FLUID
)
file
(
GLOB PLATFORM_HEADERS *.h
)
file
(
GLOB PLATFORM_dynload_HEADERS dynload/*.h
)
install
(
FILES
${
PLATFORM_HEADERS
}
DESTINATION include/paddle/platform
)
install
(
FILES
${
PLATFORM_HEADERS
}
DESTINATION include/paddle/platform/dynload
)
install
(
FILES details/device_ptr_cast.h DESTINATION include/paddle/platform/details
)
endif
()
paddle/string/CMakeLists.txt
浏览文件 @
1575c2c8
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
)
if
(
NOT WITH_C_API AND WITH_FLUID
)
file
(
GLOB STRING_HEADERS *.h
)
install
(
FILES
${
STRING_HEADERS
}
DESTINATION include/paddle/string
)
install
(
FILES tinyformat/tinyformat.h DESTINATION include/paddle/string/tinyformat
)
endif
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录