From 393286f484ad73371cb51151bb9160db55782c46 Mon Sep 17 00:00:00 2001 From: Ryan Hill Date: Sat, 24 Apr 2021 01:15:14 -0700 Subject: [PATCH] Fix deleting registry at right time. --- onnxruntime/core/providers/cuda/cuda_provider_factory.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/onnxruntime/core/providers/cuda/cuda_provider_factory.cc b/onnxruntime/core/providers/cuda/cuda_provider_factory.cc index 6c656c018c..e69406bde1 100644 --- a/onnxruntime/core/providers/cuda/cuda_provider_factory.cc +++ b/onnxruntime/core/providers/cuda/cuda_provider_factory.cc @@ -19,6 +19,8 @@ using namespace onnxruntime; namespace onnxruntime { +void Shutdown_DeleteRegistry(); + struct CUDAProviderFactory : IExecutionProviderFactory { CUDAProviderFactory(const CUDAExecutionProviderInfo& info) : info_{info} {} @@ -157,6 +159,7 @@ struct CUDA_Provider : Provider { } void Shutdown() override { + Shutdown_DeleteRegistry(); } } g_provider;