Files
pytorch/cmake/External/rccl.cmake
Nikita Shulga b9adbb5002 Fix/relax CMake linter rules (#35574)
Summary:
Ignore mixed upper-case/lower-case style for now
Fix space between function and its arguments violation
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35574

Test Plan: CI

Differential Revision: D20712969

Pulled By: malfet

fbshipit-source-id: 0012d430aed916b4518599a0b535e82d15721f78
2020-03-27 16:52:33 -07:00

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()