mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
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
18 lines
526 B
CMake
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()
|