From 09ac7595fcd327f48038dff344bd09792a3a5951 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 16 Feb 2022 17:43:29 -0800 Subject: [PATCH] update (#10573) Move FuncMgr up the class so it is destroyed later --- onnxruntime/core/framework/session_state.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/framework/session_state.h b/onnxruntime/core/framework/session_state.h index 4c25d0a7af..91b339e3af 100644 --- a/onnxruntime/core/framework/session_state.h +++ b/onnxruntime/core/framework/session_state.h @@ -396,6 +396,9 @@ class SessionState { // KernelCreateInfo for each node so we do kernel lookup once KernelCreateInfoMap kernel_create_info_map_; + //fused_funcs_mgr_ must live longer than the session_kernels_, becaues a kernel could be created from this manager + FuncManager fused_funcs_mgr_; + // If we compile kernels in a minimal build we need a way to find the kernel using the hash. // We populate this map when doing the kernel compilation in GraphPartitioner, and use it in LoadFromOrtFormat. std::unordered_map compiled_kernel_hashes_; @@ -485,7 +488,6 @@ class SessionState { concurrency::ThreadPool* const inter_op_thread_pool_{}; bool export_fused_dll_ = false; - FuncManager fused_funcs_mgr_; const DataTransferManager& data_transfer_mgr_; bool use_deterministic_compute_;