mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary:
Fixes #{issue number}
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42072
Reviewed By: malfet
Differential Revision: D22969778
Pulled By: ezyang
fbshipit-source-id: 509178775d4d99460bcb147bcfced29f04cabdc4
19 lines
621 B
CMake
19 lines
621 B
CMake
if(NOT __NCCL_INCLUDED)
|
|
set(__NCCL_INCLUDED TRUE)
|
|
|
|
if(USE_SYSTEM_NCCL)
|
|
# NCCL_ROOT, NCCL_LIB_DIR, NCCL_INCLUDE_DIR will be accounted in the following line.
|
|
find_package(rccl REQUIRED)
|
|
if(rccl_FOUND)
|
|
message(STATUS "RCCL Found!")
|
|
add_library(__caffe2_nccl INTERFACE)
|
|
target_link_libraries(__caffe2_nccl INTERFACE ${PYTORCH_RCCL_LIBRARIES})
|
|
target_include_directories(__caffe2_nccl INTERFACE ${RCCL_INCLUDE_DIRS})
|
|
else()
|
|
message(STATUS "RCCL NOT Found!")
|
|
endif()
|
|
else()
|
|
message(STATUS "USE_SYSTEM_NCCL=OFF is not supported yet when using RCCL")
|
|
endif()
|
|
endif()
|