From 192dcfaa8ea4ad1b2258ae88a02f8dbc6c4b971c Mon Sep 17 00:00:00 2001 From: KeDengMS Date: Tue, 12 Nov 2019 00:48:31 -0800 Subject: [PATCH] Fix a bug in TLS refcount that may destabilized CUDA CI (#2374) --- onnxruntime/core/providers/cuda/cuda_execution_provider.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/onnxruntime/core/providers/cuda/cuda_execution_provider.cc b/onnxruntime/core/providers/cuda/cuda_execution_provider.cc index f41d5de35c..76945c0ab2 100644 --- a/onnxruntime/core/providers/cuda/cuda_execution_provider.cc +++ b/onnxruntime/core/providers/cuda/cuda_execution_provider.cc @@ -123,6 +123,7 @@ CUDAExecutionProvider::PerThreadContext& CUDAExecutionProvider::GetPerThreadCont ptc = retired_context_pool_.back(); retired_context_pool_.pop_back(); } + inuse_contexts_.insert(std::make_pair(tid, ptc)); } else { ptc = inuse_iter->second; }