Update CMakeLists.txt for openvino EP (#7980)

This commit is contained in:
Changming Sun 2021-06-07 15:52:25 -07:00 committed by GitHub
parent 1a5ee11dbd
commit eb354853d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)