Move FuncMgr up the class so it is destroyed later
This commit is contained in:
Changming Sun 2022-02-16 17:43:29 -08:00 committed by GitHub
parent 4f76c38686
commit 09ac7595fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<std::string, HashValue> 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_;