mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-22 19:23:30 +00:00
Modify logic to determine OV Version (#5701)
Signed-off-by: MaajidKhan <n.maajidkhan@gmail.com>
This commit is contained in:
parent
d1d82065b9
commit
d6f9cc181d
2 changed files with 13 additions and 5 deletions
|
|
@ -975,17 +975,25 @@ if(onnxruntime_USE_OPENVINO)
|
|||
|
||||
add_definitions(-DUSE_OPENVINO=1)
|
||||
|
||||
if (EXISTS "$ENV{INTEL_OPENVINO_DIR}/inference_engine/version.txt")
|
||||
file(READ $ENV{INTEL_OPENVINO_DIR}/inference_engine/version.txt VER)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED ENV{INTEL_OPENVINO_DIR})
|
||||
message(FATAL_ERROR "[Couldn't locate OpenVINO] OpenVINO may not have been initialized")
|
||||
endif()
|
||||
|
||||
# Check OpenVINO version for support
|
||||
if ($ENV{INTEL_OPENVINO_DIR} MATCHES "2020.2")
|
||||
if (${VER} MATCHES "2020.2" OR $ENV{INTEL_OPENVINO_DIR} MATCHES "2020.2")
|
||||
set(OPENVINO_VERSION "2020.2")
|
||||
add_definitions(-DOPENVINO_2020_2=1)
|
||||
elseif ($ENV{INTEL_OPENVINO_DIR} MATCHES "2020.3")
|
||||
elseif (${VER} MATCHES "2020.3" OR $ENV{INTEL_OPENVINO_DIR} MATCHES "2020.3")
|
||||
set(OPENVINO_VERSION "2020.3")
|
||||
add_definitions(-DOPENVINO_2020_3=1)
|
||||
elseif ($ENV{INTEL_OPENVINO_DIR} MATCHES "2020.4")
|
||||
elseif (${VER} MATCHES "2020.4" OR $ENV{INTEL_OPENVINO_DIR} MATCHES "2020.4")
|
||||
set(OPENVINO_VERSION "2020.4")
|
||||
add_definitions(-DOPENVINO_2020_4=1)
|
||||
elseif ($ENV{INTEL_OPENVINO_DIR} MATCHES "2021.1")
|
||||
elseif (${VER} MATCHES "2021.1" OR $ENV{INTEL_OPENVINO_DIR} MATCHES "2021.1")
|
||||
set(OPENVINO_VERSION "2021.1")
|
||||
add_definitions(-DOPENVINO_2021_1=1)
|
||||
else()
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ BasicBackend::BasicBackend(const ONNX_NAMESPACE::ModelProto& model_proto,
|
|||
//The infer_requests_ pool will be intialized with a default value of 8 infer_request's
|
||||
//The nireq value can also be configured to any num_of_threads during runtime
|
||||
size_t nireq = global_context_.num_of_threads;
|
||||
LOGS_DEFAULT(INFO) << "The value of nireq being used is: " << nireq;
|
||||
LOGS_DEFAULT(INFO) << log_tag << "The value of nireq being used is: " << nireq;
|
||||
#ifndef NDEBUG
|
||||
if (openvino_ep::backend_utils::IsDebugEnabled()) {
|
||||
std::cout << "The value of nireq being used is: " << nireq << std::endl;
|
||||
|
|
|
|||
Loading…
Reference in a new issue