diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index a5bd52e5bc..a96263fca3 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -396,17 +396,17 @@ endif() set (onnxruntime_test_providers_dependencies ${onnxruntime_EXTERNAL_DEPENDENCIES}) -if(onnxruntime_USE_CUDA) - list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_cuda onnxruntime_providers_shared) -endif() +#if(onnxruntime_USE_CUDA) +# list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_cuda onnxruntime_providers_shared) +#endif() -if(onnxruntime_USE_DNNL) - list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_dnnl onnxruntime_providers_shared) -endif() +#if(onnxruntime_USE_DNNL) +# list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_dnnl onnxruntime_providers_shared) +#endif() -if(onnxruntime_USE_OPENVINO) - list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_openvino onnxruntime_providers_shared) -endif() +#if(onnxruntime_USE_OPENVINO) +# list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_openvino onnxruntime_providers_shared) +#endif() if(onnxruntime_USE_NNAPI_BUILTIN) list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_nnapi) diff --git a/include/onnxruntime/core/session/environment.h b/include/onnxruntime/core/session/environment.h index d99c6713b9..5f7f6e2ba1 100644 --- a/include/onnxruntime/core/session/environment.h +++ b/include/onnxruntime/core/session/environment.h @@ -74,8 +74,6 @@ class Environment { return shared_allocators_; } - ~Environment(); - private: ORT_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(Environment); diff --git a/onnxruntime/core/framework/provider_bridge_ort.cc b/onnxruntime/core/framework/provider_bridge_ort.cc index 3b7aa7c397..cc3664fe10 100644 --- a/onnxruntime/core/framework/provider_bridge_ort.cc +++ b/onnxruntime/core/framework/provider_bridge_ort.cc @@ -985,7 +985,6 @@ std::unique_ptr CreateCUDAPinnedAllocator(int16_t device_id, const c } std::shared_ptr CreateExecutionProviderFactory_Cuda(const OrtCUDAProviderOptions* provider_options) { - LOGS_DEFAULT(ERROR) << "Trying to load CUDA provider (RyanHill)"; if (auto provider = s_library_cuda.Get()) return provider->CreateExecutionProviderFactory(provider_options); diff --git a/onnxruntime/core/session/environment.cc b/onnxruntime/core/session/environment.cc index a2c5b96e6d..25606dd644 100644 --- a/onnxruntime/core/session/environment.cc +++ b/onnxruntime/core/session/environment.cc @@ -3,7 +3,6 @@ #include "core/session/environment.h" #include "core/framework/allocatormgr.h" -#include "core/framework/provider_shutdown.h" #include "core/graph/constants.h" #include "core/graph/op.h" #if !defined(ORT_MINIMAL_BUILD) @@ -235,11 +234,4 @@ Internal copy node return status; } -Environment::~Environment() { -// We don't support any shared providers in the minimal build yet -#if !defined(ORT_MINIMAL_BUILD) - UnloadSharedProviders(); -#endif -} - } // namespace onnxruntime diff --git a/onnxruntime/core/session/ort_env.cc b/onnxruntime/core/session/ort_env.cc index 7346c38df3..c87e49ec1e 100644 --- a/onnxruntime/core/session/ort_env.cc +++ b/onnxruntime/core/session/ort_env.cc @@ -10,6 +10,7 @@ #include "core/session/environment.h" #include "core/session/allocator_impl.h" #include "core/common/logging/logging.h" +#include "core/framework/provider_shutdown.h" #ifdef __ANDROID__ #include "core/platform/android/logging/android_log_sink.h" #else @@ -39,6 +40,10 @@ OrtEnv::OrtEnv(std::unique_ptr value1) } OrtEnv::~OrtEnv() { +// We don't support any shared providers in the minimal build yet +#if !defined(ORT_MINIMAL_BUILD) + UnloadSharedProviders(); +#endif } OrtEnv* OrtEnv::GetInstance(const OrtEnv::LoggingManagerConstructionInfo& lm_info,