File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 11# Extension: torchcomms._comms_xccl
2- file (GLOB TORCHCOMMS_XCCL_SOURCES "comms/torchcomms/xccl/*.cpp" )
3- file (GLOB TORCHCOMMS_XPU_API_SOURCE "comms/torchcomms/device/XpuApi.cpp" )
42
3+ # Check if CCL_ROOT is set
4+ if (NOT DEFINED ENV{CCL_ROOT})
5+ message (WARNING "oneCCL environment not found, Skipping XCCL backend compilation." )
6+ return ()
7+ endif ()
8+
9+ # Set XCCL paths
510set (XCCL_INCLUDE "$ENV{CCL_ROOT} /include" )
611set (XCCL_SHARED_LIB "$ENV{CCL_ROOT} /lib/libccl.so.2" )
712
8- include (FindPackageHandleStandardArgs)
13+ # Validate oneCCL installation
14+ if (NOT EXISTS "${XCCL_INCLUDE} " OR NOT EXISTS "${XCCL_SHARED_LIB} " )
15+ message (WARNING "Invalid oneCCL path. Skipping XCCL backend compilation." )
16+ return ()
17+ endif ()
18+
19+ message (STATUS "XCCL include path : ${XCCL_INCLUDE} " )
20+ message (STATUS "XCCL library : ${XCCL_SHARED_LIB} " )
921
22+ file (GLOB TORCHCOMMS_XCCL_SOURCES "comms/torchcomms/xccl/*.cpp" )
23+ file (GLOB TORCHCOMMS_XPU_API_SOURCE "comms/torchcomms/device/XpuApi.cpp" )
24+
25+ include (FindPackageHandleStandardArgs)
1026
1127add_library (torchcomms_comms_xccl MODULE
1228 ${TORCHCOMMS_XCCL_SOURCES}
You can’t perform that action at this time.
0 commit comments