Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
94e741d6
P
Paddle
项目概览
机器未来
/
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
94e741d6
编写于
10月 23, 2017
作者:
Y
Yu Yang
提交者:
GitHub
10月 23, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use external project for NCCL (#5028)
上级
9023248c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
53 addition
and
39 deletion
+53
-39
CMakeLists.txt
CMakeLists.txt
+1
-1
cmake/configure.cmake
cmake/configure.cmake
+0
-7
cmake/external/nccl.cmake
cmake/external/nccl.cmake
+50
-0
cmake/nccl.cmake
cmake/nccl.cmake
+0
-30
paddle/platform/dynload/CMakeLists.txt
paddle/platform/dynload/CMakeLists.txt
+2
-1
未找到文件。
CMakeLists.txt
浏览文件 @
94e741d6
...
@@ -127,9 +127,9 @@ include(external/warpctc) # download, build, install warpctc
...
@@ -127,9 +127,9 @@ include(external/warpctc) # download, build, install warpctc
include
(
external/any
)
# download libn::any
include
(
external/any
)
# download libn::any
include
(
external/eigen
)
# download eigen3
include
(
external/eigen
)
# download eigen3
include
(
external/pybind11
)
# download pybind11
include
(
external/pybind11
)
# download pybind11
include
(
external/nccl
)
include
(
cudnn
)
# set cudnn libraries, must before configure
include
(
cudnn
)
# set cudnn libraries, must before configure
include
(
nccl
)
# set nccl libraries
include
(
configure
)
# add paddle env configuration
include
(
configure
)
# add paddle env configuration
include
(
generic
)
# simplify cmake module
include
(
generic
)
# simplify cmake module
include
(
package
)
# set paddle packages
include
(
package
)
# set paddle packages
...
...
cmake/configure.cmake
浏览文件 @
94e741d6
...
@@ -68,13 +68,6 @@ else()
...
@@ -68,13 +68,6 @@ else()
if
(
NOT CUDNN_FOUND
)
if
(
NOT CUDNN_FOUND
)
message
(
FATAL_ERROR
"Paddle needs cudnn to compile"
)
message
(
FATAL_ERROR
"Paddle needs cudnn to compile"
)
endif
()
endif
()
if
(
NOT NCCL_INCLUDE_DIR
)
message
(
FATAL_ERROR
"Paddle needs nccl header to compile"
)
endif
()
if
(
NOT WITH_DSO AND NOT NCCL_LIBRARY
)
message
(
FATAL_ERROR
"Paddle needs nccl libraries when WITH_DSO=OFF"
)
endif
()
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
"-Xcompiler
${
SIMD_FLAG
}
"
)
set
(
CUDA_NVCC_FLAGS
${
CUDA_NVCC_FLAGS
}
"-Xcompiler
${
SIMD_FLAG
}
"
)
...
...
cmake/external/nccl.cmake
0 → 100644
浏览文件 @
94e741d6
INCLUDE
(
ExternalProject
)
SET
(
NCCL_SOURCE_DIR
${
THIRD_PARTY_PATH
}
/nccl
)
INCLUDE_DIRECTORIES
(
${
NCCL_SOURCE_DIR
}
/src/extern_nccl
)
if
(
WITH_DSO
)
# If we use DSO, we do not build nccl, just download the dependencies
set
(
NCCL_BUILD_COMMAND
""
)
set
(
NCCL_INSTALL_COMMAND
""
)
set
(
NCCL_INSTALL_DIR
""
)
else
()
# otherwise, we build nccl and link it.
set
(
NCCL_BUILD_COMMAND
"make -j 8"
)
set
(
NCCL_INSTALL_COMMAND
"make install"
)
SET
(
NCCL_INSTALL_DIR
${
THIRD_PARTY_PATH
}
/install/nccl
)
endif
()
ExternalProject_Add
(
extern_nccl
${
EXTERNAL_PROJECT_LOG_ARGS
}
GIT_REPOSITORY
"https://github.com/NVIDIA/nccl.git"
GIT_TAG
"v1.3.4-1"
PREFIX
"
${
NCCL_SOURCE_DIR
}
"
UPDATE_COMMAND
""
CONFIGURE_COMMAND
""
BUILD_COMMAND
"
${
NCCL_BUILD_COMMAND
}
"
INSTALL_COMMAND
"
${
NCCL_INSTALL_COMMAND
}
"
INSTALL_DIR
"
${
NCCL_INSTALL_DIR
}
"
TEST_COMMAND
""
)
if
(
WITH_DSO
)
if
(
${
CMAKE_VERSION
}
VERSION_LESS
"3.3.0"
)
set
(
dummyfile
${
CMAKE_CURRENT_BINARY_DIR
}
/lib_any_dummy.c
)
file
(
WRITE
${
dummyfile
}
"const char * dummy_any =
\"
${
dummyfile
}
\"
;"
)
add_library
(
nccl STATIC
${
dummyfile
}
)
else
()
add_library
(
nccl INTERFACE
)
endif
()
else
()
ADD_LIBRARY
(
nccl STATIC IMPORTED GLOBAL
)
SET_PROPERTY
(
TARGET nccl PROPERTY IMPORTED_LOCATION
${
NCCL_INSTALL_DIR
}
/lib/libnccl.a
)
endif
()
add_dependencies
(
nccl extern_nccl
)
LIST
(
APPEND external_project_dependencies nccl
)
cmake/nccl.cmake
已删除
100644 → 0
浏览文件 @
9023248c
if
(
NOT WITH_GPU
)
return
()
endif
()
set
(
NCCL_ROOT
"/usr"
CACHE PATH
"CUDNN ROOT"
)
find_path
(
NCCL_INCLUDE_DIR nccl.h PATHS
${
NCCL_ROOT
}
${
NCCL_ROOT
}
/include
$ENV{NCCL_ROOT} $ENV{NCCL_ROOT}/include
${
CUDA_TOOLKIT_INCLUDE
}
NO_DEFAULT_PATH
)
get_filename_component
(
__libpath_hist
${
CUDA_CUDART_LIBRARY
}
PATH
)
set
(
TARGET_ARCH
"x86_64"
)
if
(
NOT
${
CMAKE_SYSTEM_PROCESSOR
}
)
set
(
TARGET_ARCH
${
CMAKE_SYSTEM_PROCESSOR
}
)
endif
()
list
(
APPEND NCCL_CHECK_LIBRARY_DIRS
${
NCCL_ROOT
}
${
NCCL_ROOT
}
/lib64
${
NCCL_ROOT
}
/lib
${
NCCL_ROOT
}
/lib/
${
TARGET_ARCH
}
-linux-gnu
$ENV{NCCL_ROOT}
$ENV{NCCL_ROOT}/lib64
$ENV{NCCL_ROOT}/lib
/usr/lib
)
find_library
(
NCCL_LIBRARY NAMES libnccl.so libnccl.dylib
# libcudnn_static.a
PATHS
${
NCCL_CHECK_LIBRARY_DIRS
}
${
NCCL_INCLUDE_DIR
}
${
__libpath_hist
}
NO_DEFAULT_PATH
DOC
"Path to nccl library."
)
paddle/platform/dynload/CMakeLists.txt
浏览文件 @
94e741d6
cc_library
(
dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags
)
cc_library
(
dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags
)
nv_library
(
dynload_cuda SRCS cublas.cc cudnn.cc curand.cc nccl.cc DEPS dynamic_loader
)
nv_library
(
dynload_cuda SRCS cublas.cc cudnn.cc curand.cc nccl.cc
DEPS dynamic_loader nccl
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录