From 41fd745996d2b7f949d67b985fad8f57a3b7ff07 Mon Sep 17 00:00:00 2001 From: Edward Chen <18449977+edgchen1@users.noreply.github.com> Date: Thu, 9 Dec 2021 10:01:35 -0800 Subject: [PATCH] Fix build error when using '--build_minimal extended' and '--build_wheel' build.py options. (#9979) --- onnxruntime/python/onnxruntime_pybind_state.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/onnxruntime/python/onnxruntime_pybind_state.cc b/onnxruntime/python/onnxruntime_pybind_state.cc index 387d996c98..05bed14739 100644 --- a/onnxruntime/python/onnxruntime_pybind_state.cc +++ b/onnxruntime/python/onnxruntime_pybind_state.cc @@ -1502,9 +1502,7 @@ void CreateInferencePybindStateModule(py::module& m) { addSparseTensorMethods(m); addIoBindingMethods(m); -#if !defined(__APPLE__) && \ - (!defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD) || defined(ORT_MINIMAL_BUILD_CUSTOM_OPS)) - Ort::SessionOptions tmp_options; +#if !defined(__APPLE__) && !defined(ORT_MINIMAL_BUILD) if (!InitProvidersSharedLibrary()) { const logging::Logger& default_logger = logging::LoggingManager::DefaultLogger(); LOGS(default_logger, WARNING) << "Init provider bridge failed.";