Missing MPI libraries for Cuda

This commit is contained in:
Ryan Hill 2021-05-12 02:21:00 -07:00
parent 66d5ac1fcb
commit 919c28a408

View file

@ -305,6 +305,9 @@ if (onnxruntime_USE_CUDA)
if (onnxruntime_ENABLE_TRAINING OR onnxruntime_ENABLE_TRAINING_OPS)
target_include_directories(onnxruntime_providers_cuda PRIVATE ${ORTTRAINING_ROOT} ${MPI_INCLUDE_DIRS})
if(onnxruntime_USE_MPI)
target_link_libraries(onnxruntime_providers_cuda PRIVATE ${MPI_LIBRARIES} ${MPI_CXX_LINK_FLAGS})
endif()
if (onnxruntime_USE_NCCL)
target_include_directories(onnxruntime_providers_cuda PRIVATE ${NCCL_INCLUDE_DIRS})