mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Use CMake built-in function to compare NCCL version (#5118)
* Use CMake built-in function to compare version * Address comment
This commit is contained in:
parent
c5d4ae0401
commit
5618b9dddc
1 changed files with 4 additions and 7 deletions
|
|
@ -1186,13 +1186,10 @@ if (onnxruntime_ENABLE_TRAINING)
|
|||
message(STATUS "NCCL_MINOR_VERSION: ${NCCL_MINOR_VERSION}")
|
||||
endif()
|
||||
|
||||
if (${NCCL_MAJOR_VERSION} GREATER 2)
|
||||
add_definitions(-DUSE_NCCL_P2P=1)
|
||||
else()
|
||||
if(${NCCL_MAJOR_VERSION} EQUAL 2)
|
||||
if(${NCCL_MINOR_VERSION} GREATER 7)
|
||||
add_definitions(-DUSE_NCCL_P2P=1)
|
||||
endif()
|
||||
if (NCCL_MAJOR_VERSION_DEFINED AND NCCL_MINOR_VERSION_DEFINED)
|
||||
if ("${NCCL_MAJOR_VERSION}.${NCCL_MINOR_VERSION}" VERSION_GREATER_EQUAL "2.7")
|
||||
add_definitions(-DUSE_NCCL_P2P=1)
|
||||
message( STATUS "NCCL P2P is enabled for supporting ncclSend and ncclRecv." )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue