Files
pytorch/cmake/External/rccl.cmake
Nichols A. Romero bd63ec4f45 [ROCm] LoadHIP CMake cleanup (#137112)
Should help mitigate issues reported here: https://github.com/pytorch/pytorch/issues/128313

While working on https://github.com/pytorch/pytorch/pull/136700, we realized that some of the ROCm CMake can be streamlined.

This PR does not fix any bugs or provide any new functionality. Strictly clean-up.

The remaining `${ROCM_ROCTX_LIB}` will be removed when we transition to the rocprofiler-sdk (to be done in a separate PR).

Pull Request resolved: https://github.com/pytorch/pytorch/pull/137112
Approved by: https://github.com/jithunnair-amd, https://github.com/jeffdaily
2024-10-13 00:06:41 +00:00

18 lines
526 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 roc::rccl)
else()
message(STATUS "RCCL NOT Found!")
endif()
else()
message(STATUS "USE_SYSTEM_NCCL=OFF is not supported yet when using RCCL")
endif()
endif()