Skip to content

Commit

Permalink
imple allreduce and strcture
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao1Han committed Dec 13, 2024
1 parent 8fff100 commit fb851b1
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1,716 deletions.
7 changes: 6 additions & 1 deletion cmake/Modules/FindXCCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 OneCCL")
set(XCCL_ROOT $ENV{CCL_ROOT})
endif()

string(COMPARE EQUAL "${XCCL_ROOT}" "" nocclfound)
if(nocclfound)
set(XCCL_FOUND False)
Expand Down
1 change: 1 addition & 0 deletions src/xccl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ list(APPEND ATen_XPU_XCCL_SRCS ${xccl_cpp})

set(ATen_XPU_XCCL_SRCS ${ATen_XPU_XCCL_SRCS} PARENT_SCOPE)

# Copy the header file to the build directory so that the PyTorch registration file can locate it.
foreach(HEADER ${xccl_h})
file(COPY ${HEADER} DESTINATION "${CMAKE_BINARY_DIR}/torch/csrc/distributed/c10d")
endforeach()
Loading

0 comments on commit fb851b1

Please sign in to comment.