From 4f8a4dd97b457d76767cdd8804679bdbecb84863 Mon Sep 17 00:00:00 2001 From: Guangyun Han Date: Sat, 7 Oct 2023 09:11:34 +0000 Subject: [PATCH] Fix enable_training and use_migraphx --- cmake/onnxruntime_providers.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/onnxruntime_providers.cmake b/cmake/onnxruntime_providers.cmake index 62c452b14e696..06bf3fb3c0bb4 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}