From 9eb792a5b393aeffd794419a8195f2f6698a3e94 Mon Sep 17 00:00:00 2001 From: Xueyun Zhu Date: Wed, 25 Mar 2020 16:57:05 +0000 Subject: [PATCH] move env to .cc file --- onnxruntime/python/onnxruntime_pybind_state.cc | 2 ++ onnxruntime/python/onnxruntime_pybind_state_common.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) 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(); }