Fix build error when using '--build_minimal extended' and '--build_wheel' build.py options. (#9979)

This commit is contained in:
Edward Chen 2021-12-09 10:01:35 -08:00 committed by GitHub
parent a7abd541c7
commit 41fd745996
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.";