Skip to content

[wip] merge oneccl v1&v2 api #1579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
11 changes: 9 additions & 2 deletions cmake/Modules/FindXCCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ find_library(
NO_DEFAULT_PATH
)

if((NOT XCCL_INCLUDE_DIR) OR (NOT XCCL_LIBRARY_DIR) OR (NOT XCCL_LIBRARY))
find_file(
XCCL_LIBRARY_1_0
NAMES libccl.so.1.0
HINTS ${XCCL_LIBRARY_DIR}
NO_DEFAULT_PATH
)

if((NOT XCCL_INCLUDE_DIR) OR (NOT XCCL_LIBRARY_DIR) OR (NOT XCCL_LIBRARY) OR (NOT XCCL_LIBRARY_1_0))
set(XCCL_FOUND False)
set(XCCL_NOT_FOUND_MESSAGE "OneCCL library not found!!")
return()
Expand All @@ -63,6 +70,6 @@ SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH}
find_package_handle_standard_args(
XCCL
FOUND_VAR XCCL_FOUND
REQUIRED_VARS XCCL_INCLUDE_DIR XCCL_LIBRARY_DIR XCCL_LIBRARY
REQUIRED_VARS XCCL_INCLUDE_DIR XCCL_LIBRARY_DIR XCCL_LIBRARY XCCL_LIBRARY_1_0
REASON_FAILURE_MESSAGE "${XCCL_NOT_FOUND_MESSAGE}"
)
2 changes: 1 addition & 1 deletion cmake/XCCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ if(NOT __XCCL_INCLUDED)
${XCCL_INCLUDE_DIR})
set_property(
TARGET torch::xccl PROPERTY INTERFACE_LINK_LIBRARIES
${XCCL_LIBRARY})
${XCCL_LIBRARY} ${XCCL_LIBRARY_1_0})
endif()
Loading
Loading