diff --git a/onnxruntime/core/session/inference_session.h b/onnxruntime/core/session/inference_session.h index 3020719648..cf27c46d55 100644 --- a/onnxruntime/core/session/inference_session.h +++ b/onnxruntime/core/session/inference_session.h @@ -377,10 +377,6 @@ class InferenceSession { // The file path of where the model was loaded. e.g. /tmp/test_squeezenet/model.onnx std::basic_string model_location_; - // Immutable state for each op in the model. Shared by all executors. - // It has a dependency on execution_providers_. - std::unique_ptr session_state_; - private: ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(InferenceSession); @@ -457,6 +453,12 @@ class InferenceSession { // The list of execution providers. ExecutionProviders execution_providers_; + protected: + // Immutable state for each op in the model. Shared by all executors. + // It has a dependency on execution_providers_. + std::unique_ptr session_state_; + + private: // Threadpool for this session std::unique_ptr thread_pool_; std::unique_ptr inter_op_thread_pool_;