From e083d207cfaf0612b08be503383e29efe7646f82 Mon Sep 17 00:00:00 2001 From: Ryan Hill <38674843+RyanUnderhill@users.noreply.github.com> Date: Thu, 24 Jun 2021 13:55:56 -0700 Subject: [PATCH] Disable InitProvidersSharedLibrary when training is enabled. (#8132) --- onnxruntime/python/onnxruntime_pybind_state.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/python/onnxruntime_pybind_state.cc b/onnxruntime/python/onnxruntime_pybind_state.cc index 1238f9e1e1..732841a670 100644 --- a/onnxruntime/python/onnxruntime_pybind_state.cc +++ b/onnxruntime/python/onnxruntime_pybind_state.cc @@ -1671,7 +1671,7 @@ void CreatePybindStateModule(py::module& m){ addOrtValueMethods(m); addIoBindingMethods(m); -#if !defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD) || defined(ORT_MINIMAL_BUILD_CUSTOM_OPS) +#if !defined(ENABLE_TRAINING) && (!defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD) || defined(ORT_MINIMAL_BUILD_CUSTOM_OPS)) Ort::SessionOptions tmp_options; if (!InitProvidersSharedLibrary()) { const logging::Logger& default_logger = logging::LoggingManager::DefaultLogger();