diff --git a/onnxruntime/python/onnxruntime_pybind_state.cc b/onnxruntime/python/onnxruntime_pybind_state.cc index 272c59d63d..b1f0bdb0f0 100644 --- a/onnxruntime/python/onnxruntime_pybind_state.cc +++ b/onnxruntime/python/onnxruntime_pybind_state.cc @@ -967,6 +967,8 @@ PYBIND11_MODULE(onnxruntime_pybind11_state, m) { #endif } +// static variable used to create inference session and training session. +static std::unique_ptr session_env; void initialize_env(){ auto initialize = [&]() { diff --git a/onnxruntime/python/onnxruntime_pybind_state_common.h b/onnxruntime/python/onnxruntime_pybind_state_common.h index c8c39a0913..3855b480a8 100644 --- a/onnxruntime/python/onnxruntime_pybind_state_common.h +++ b/onnxruntime/python/onnxruntime_pybind_state_common.h @@ -44,9 +44,6 @@ class SessionObjectInitializer { } }; -// static variable used to create inference session and training session. -static std::unique_ptr session_env; -void initialize_env(); Environment& get_env(); }