message(WARNING "-- CUDA is not detected by cmake. Building without it...")
endif()
- # TODO: remove this not cross platform define in future. Use caffe_config.h instead.
- add_definitions(-DCPU_ONLY)
+ list(APPEND Caffe_DEFINITIONS PUBLIC -DCPU_ONLY)
endif()
+if(USE_NCCL)
+ find_package(NCCL REQUIRED)
+ include_directories(SYSTEM ${NCCL_INCLUDE_DIR})
+ list(APPEND Caffe_LINKER_LIBS ${NCCL_LIBRARIES})
+ add_definitions(-DUSE_NCCL)
+endif()
+
# ---[ OpenCV
if(USE_OPENCV)
find_package(OpenCV QUIET COMPONENTS core highgui imgproc imgcodecs)