From 861bb9dd3cf722cb393b3a18c350d5a4528852e1 Mon Sep 17 00:00:00 2001 From: cloudhan Date: Sun, 8 Oct 2023 11:43:27 +0800 Subject: [PATCH] Fix enable_training and use_migraphx (#17827) --- cmake/onnxruntime_providers.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake index 0d63fc05f262f..310db4b6f62c8 100644 --- a/cmake/onnxruntime_providers.cmake +++ b/cmake/onnxruntime_providers.cmake @@ -1434,6 +1434,14 @@ if (onnxruntime_USE_MIGRAPHX) message(STATUS "MIGRAPHX GPU STREAM SYNC is DISABLED") endif() + if (onnxruntime_ENABLE_TRAINING_OPS) + onnxruntime_add_include_to_target(onnxruntime_providers_migraphx onnxruntime_training) + target_link_libraries(onnxruntime_providers_migraphx PRIVATE onnxruntime_training) + if (onnxruntime_ENABLE_TRAINING_TORCH_INTEROP) + onnxruntime_add_include_to_target(onnxruntime_providers_migraphx Python::Module) + endif() + endif() + install(TARGETS onnxruntime_providers_migraphx ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}