mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-03 03:58:54 +00:00
OpenVino: fix allocation failure on Window for RelWithDebInfo build (#5713)
* ng_supported_ops * Remove ng_supported_ops * Revert "Remove ng_supported_ops" This reverts commit 3c27385b2d88c6e8cf7ac4e8c290a367ad5d0bd8. * Revert "ng_supported_ops" This reverts commit 650721ae2913b79739521d58838298e031abdac1. * cmake changes to ensure that the debug build on windows link to debug builds of openvino and do not result in bad allocation error Co-authored-by: sfatimar <sahar.fatima@intel/com>
This commit is contained in:
parent
0c8902cbbe
commit
dfbf6d78be
1 changed files with 32 additions and 12 deletions
|
|
@ -578,11 +578,16 @@ if (onnxruntime_USE_OPENVINO)
|
|||
|
||||
# Library paths
|
||||
list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/tbb/lib)
|
||||
list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/tbb/bin)
|
||||
list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/external/mkltiny_lnx/lib)
|
||||
|
||||
# Lib names
|
||||
if (WIN32)
|
||||
list(APPEND OPENVINO_LIB_LIST inference_engine.lib inference_engine_legacy.lib tbb.lib ${PYTHON_LIBRARIES})
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
list(APPEND OPENVINO_LIB_LIST inference_engined.lib inference_engine_legacyd.lib tbb.lib ${PYTHON_LIBRARIES})
|
||||
else()
|
||||
list(APPEND OPENVINO_LIB_LIST inference_engine.lib inference_engine_legacy.lib tbb.lib ${PYTHON_LIBRARIES})
|
||||
endif()
|
||||
else()
|
||||
list(APPEND OPENVINO_LIB_LIST -linference_engine -linference_engine_legacy -ltbb ${PYTHON_LIBRARIES})
|
||||
endif()
|
||||
|
|
@ -592,16 +597,29 @@ if (onnxruntime_USE_OPENVINO)
|
|||
list(APPEND OPENVINO_INCLUDE_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/ngraph/include)
|
||||
list(APPEND OPENVINO_INCLUDE_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/ngraph/include/ngraph/frontend)
|
||||
list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/ngraph/lib)
|
||||
if (WIN32)
|
||||
list(APPEND OPENVINO_LIB_LIST ngraph.lib)
|
||||
else()
|
||||
list(APPEND OPENVINO_LIB_LIST -lngraph)
|
||||
endif()
|
||||
if (OPENVINO_VERSION VERSION_GREATER_EQUAL "2020.4")
|
||||
if (OPENVINO_VERSION VERSION_EQUAL "2020.4")
|
||||
if (WIN32)
|
||||
list(APPEND OPENVINO_LIB_LIST onnx_importer.lib)
|
||||
list(APPEND OPENVINO_LIB_LIST ngraph.lib onnx_importer.lib)
|
||||
else()
|
||||
list(APPEND OPENVINO_LIB_LIST -lonnx_importer)
|
||||
list(APPEND OPENVINO_LIB_LIST -lngraph -lonnx_importer)
|
||||
endif()
|
||||
endif()
|
||||
if (OPENVINO_VERSION VERSION_GREATER "2020.4")
|
||||
if (WIN32)
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
list(APPEND OPENVINO_LIB_LIST ngraphd.lib onnx_importerd.lib)
|
||||
else()
|
||||
list(APPEND OPENVINO_LIB_LIST ngraph.lib onnx_importer.lib)
|
||||
endif()
|
||||
else()
|
||||
list(APPEND OPENVINO_LIB_LIST -lngraph -lonnx_importer)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
if (WIN32)
|
||||
list(APPEND OPENVINO_LIB_LIST ngraph.lib)
|
||||
else()
|
||||
list(APPEND OPENVINO_LIB_LIST -lngraph)
|
||||
endif()
|
||||
endif()
|
||||
else ()
|
||||
|
|
@ -610,15 +628,17 @@ if (onnxruntime_USE_OPENVINO)
|
|||
endif()
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64/Release)
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64/Debug)
|
||||
else()
|
||||
list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64/Release)
|
||||
endif()
|
||||
elseif(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "aarch64-linux-gnu")
|
||||
list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/aarch64)
|
||||
else()
|
||||
list(APPEND OPENVINO_LIB_DIR_LIST $ENV{INTEL_OPENVINO_DIR}/deployment_tools/inference_engine/lib/intel64)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_openvino_cc_srcs})
|
||||
add_library(onnxruntime_providers_openvino ${onnxruntime_providers_openvino_cc_srcs})
|
||||
onnxruntime_add_include_to_target(onnxruntime_providers_openvino onnxruntime_common onnxruntime_framework onnx onnx_proto protobuf::libprotobuf flatbuffers)
|
||||
|
|
|
|||
Loading…
Reference in a new issue