From cbfbe210a8b8896b726ff11aaccdd103c58f8b40 Mon Sep 17 00:00:00 2001 From: Baiju Meswani Date: Tue, 27 Jun 2023 18:39:54 -0700 Subject: [PATCH] Fix bug that accidentally disabled training op tests (#16488) --- cmake/CMakeLists.txt | 2 +- cmake/onnxruntime_unittests.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index d63e7b261490..c210073c952d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -937,7 +937,7 @@ function(onnxruntime_configure_target target_name) set_target_properties(${target_name} PROPERTIES VS_USER_PROPS ${PROJECT_SOURCE_DIR}/EnableVisualStudioCodeAnalysis.props) endif() target_include_directories(${target_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} ${abseil_cpp_SOURCE_DIR}) - if (onnxruntime_ENABLE_TRAINING_APIS) + if (onnxruntime_ENABLE_TRAINING_OPS) target_include_directories(${target_name} PRIVATE ${ORTTRAINING_ROOT}) endif() if (onnxruntime_ENABLE_LTO) diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 0f028278c027..71b2123d6842 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -377,7 +377,7 @@ endif() # Disable training ops test for minimal build as a lot of these depend on loading an onnx model. if (NOT onnxruntime_MINIMAL_BUILD) - if (onnxruntime_ENABLE_TRAINING_CORE) + if (onnxruntime_ENABLE_TRAINING_OPS) file(GLOB_RECURSE orttraining_test_trainingops_cpu_src CONFIGURE_DEPENDS "${ORTTRAINING_SOURCE_DIR}/test/training_ops/compare_provider_test_utils.cc" "${ORTTRAINING_SOURCE_DIR}/test/training_ops/function_op_test_utils.cc"