From eb354853d34cef0b683972fe7c4188e6309fad02 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 7 Jun 2021 15:52:25 -0700 Subject: [PATCH] Update CMakeLists.txt for openvino EP (#7980) --- cmake/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index c92a8cb570..541c1bd86d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -909,8 +909,9 @@ else() endif() #names in this var must match the directory names under onnxruntime/core/providers -#The list of legacy providers that have not been converted to dynamic loading -#But DNNL is an exception, it still needs be here. +#ONNXRUNTIME_PROVIDER_NAMES is the list of providers that needs to export additional symbols in the global namespace. +#For example CUDA EP exports "OrtSessionOptionsAppendExecutionProvider_CUDA", which is a global function. +#However, all these things are legacy and deprecated and should be replaced with functions in onnxruntime_c_api.h. set(ONNXRUNTIME_PROVIDER_NAMES cpu) set(ORT_PROVIDER_FLAGS) @@ -933,6 +934,7 @@ if (onnxruntime_USE_DNNL) endif() if (onnxruntime_USE_OPENVINO) list(APPEND ORT_PROVIDER_FLAGS -DUSE_OPENVINO=1) + list(APPEND ONNXRUNTIME_PROVIDER_NAMES openvino) list(APPEND ORT_PROVIDER_CMAKE_FLAGS -Donnxruntime_USE_OPENVINO=1) endif() if (onnxruntime_USE_TENSORRT)