diff --git a/cmake/Modules/FindXCCL.cmake b/cmake/Modules/FindXCCL.cmake index 29571065c..c4b4c1e50 100644 --- a/cmake/Modules/FindXCCL.cmake +++ b/cmake/Modules/FindXCCL.cmake @@ -6,7 +6,12 @@ include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) -set(XCCL_ROOT $ENV{CCL_ROOT}) +set(XCCL_ROOT "/opt/intel/oneapi/ccl/latest") +if (NOT EXISTS "${XCCL_ROOT}") + message(STATUS "Default OneCCL not found, using current environment OneAPI") + set(XCCL_ROOT $ENV{ONEAPI_ROOT}/ccl/latest) +endif() + string(COMPARE EQUAL "${XCCL_ROOT}" "" nocclfound) if(nocclfound) set(XCCL_FOUND False) diff --git a/src/xccl/ProcessGroupXCCL.cpp b/src/xccl/ProcessGroupXCCL.cpp index b34d2435a..4a82e3cbc 100644 --- a/src/xccl/ProcessGroupXCCL.cpp +++ b/src/xccl/ProcessGroupXCCL.cpp @@ -173,7 +173,6 @@ std::shared_ptr ProcessGroupXCCL::getXCCLComm( "Not able to create/get " "XCCL Communicator since the devices are empty "); { - // todo: why do we need mutex here? std::lock_guard lock(mutex_); if (devXCCLCommMap_.find(deviceKey) != devXCCLCommMap_.end()) { return devXCCLCommMap_[deviceKey];