mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
Adjustments to MPI and NCCL library discovery on build (#4407)
* cmake edits for mpi_home and nccl_home * cmake syntax error on else
This commit is contained in:
parent
f4e0070c2e
commit
f6bf66c8cf
1 changed files with 6 additions and 1 deletions
|
|
@ -972,7 +972,11 @@ if (onnxruntime_ENABLE_TRAINING)
|
|||
find_package_handle_standard_args(MPI DEFAULT_MSG MPI_INCLUDE_DIR MPI_LIBRARY)
|
||||
|
||||
if (MPI_FOUND)
|
||||
execute_process(COMMAND mpirun --version OUTPUT_VARIABLE MPIRUN_OUTPUT)
|
||||
if(NOT DEFINED onnxruntime_MPI_HOME)
|
||||
execute_process(COMMAND mpirun --version OUTPUT_VARIABLE MPIRUN_OUTPUT)
|
||||
else()
|
||||
execute_process(COMMAND ${onnxruntime_MPI_HOME}/bin/mpirun --version OUTPUT_VARIABLE MPIRUN_OUTPUT)
|
||||
endif(NOT DEFINED onnxruntime_MPI_HOME)
|
||||
string( REGEX MATCH "[0-9]+.[0-9]+.[0-9]" MPI_VERSION ${MPIRUN_OUTPUT})
|
||||
message( STATUS "MPI Version: ${MPI_VERSION}")
|
||||
|
||||
|
|
@ -1002,6 +1006,7 @@ if (onnxruntime_ENABLE_TRAINING)
|
|||
NAMES ${NCCL_LIBNAME}
|
||||
HINTS
|
||||
${onnxruntime_NCCL_HOME}/lib/x86_64-linux-gnu
|
||||
${onnxruntime_NCCL_HOME}/lib
|
||||
$ENV{CUDA_ROOT}/lib64)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
|
|
|||
Loading…
Reference in a new issue