• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if(NOT __NCCL_INCLUDED)
2  set(__NCCL_INCLUDED TRUE)
3
4  if(USE_SYSTEM_NCCL)
5    # NCCL_ROOT, NCCL_LIB_DIR, NCCL_INCLUDE_DIR will be accounted in the following line.
6    find_package(rccl REQUIRED)
7    if(rccl_FOUND)
8      message(STATUS "RCCL Found!")
9      add_library(__caffe2_nccl INTERFACE)
10      target_link_libraries(__caffe2_nccl INTERFACE ${PYTORCH_RCCL_LIBRARIES})
11      target_include_directories(__caffe2_nccl INTERFACE ${RCCL_INCLUDE_DIRS})
12    else()
13      message(STATUS "RCCL NOT Found!")
14    endif()
15  else()
16    message(STATUS "USE_SYSTEM_NCCL=OFF is not supported yet when using RCCL")
17  endif()
18endif()
19