Skip to content

Commit 1b19045

Browse files
[build] allow MPI on Unix when NCCL is disabled (microsoft#21175)
### Description CMake logic fixed to allow enabling MPI while NCCL is disabled. ### Motivation and Context MPI is also used on the CPU backend, not only with CUDA, so it makes sense to decouple it properly from NCCL (which is for dealing with multiple Nvidia GPUs).
1 parent d28c26a commit 1b19045

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,7 @@ if (onnxruntime_ENABLE_TRAINING)
15291529
list(APPEND onnxruntime_EXTERNAL_LIBRARIES tensorboard)
15301530
endif()
15311531

1532-
if (UNIX AND onnxruntime_USE_NCCL)
1532+
if (UNIX OR onnxruntime_USE_NCCL)
15331533
# MPI is INDEPENDENT of NCCL for now. You can build NCLL without MPI and launch multi-GPU with your own launcher.
15341534
if (onnxruntime_USE_MPI)
15351535
if (EXISTS "${onnxruntime_MPI_HOME}")

0 commit comments

Comments
 (0)