Fix mac shared_provider warning (#8153)

This commit is contained in:
Guoyu Wang 2021-06-25 13:25:28 -07:00 committed by GitHub
parent a41d0db43c
commit 9618b6ba62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1619,7 +1619,7 @@ static struct {
void addObjectMethodsForTraining(py::module& m);
#endif
void CreatePybindStateModule(py::module& m){
void CreatePybindStateModule(py::module& m) {
m.doc() = "pybind11 stateful interface to ONNX runtime";
RegisterExceptions(m);
@ -1680,7 +1680,8 @@ void CreatePybindStateModule(py::module& m){
addOrtValueMethods(m);
addIoBindingMethods(m);
#if !defined(ENABLE_TRAINING) && (!defined(ORT_MINIMAL_BUILD) || defined(ORT_EXTENDED_MINIMAL_BUILD) || defined(ORT_MINIMAL_BUILD_CUSTOM_OPS))
#if !defined(ENABLE_TRAINING) && !defined(__APPLE__) && \
(!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();