Merge pull request #23762 from TolyaTalamanov:at/gapi-ov-backend-hotfix

G-API: OpenVINO Backend Hotfix
pull/23767/head
Alexander Smorkalov 1 year ago committed by GitHub
commit 6d0add4285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      modules/gapi/src/backends/ov/govbackend.cpp
  2. 4
      modules/gapi/src/backends/ov/govbackend.hpp
  3. 4
      modules/gapi/src/backends/ov/util.hpp
  4. 4
      modules/gapi/test/infer/gapi_infer_ov_tests.cpp

@ -10,7 +10,7 @@
// (cv::gapi::ov::backend() is still there and is defined always)
#include "backends/ov/govbackend.hpp"
#ifdef HAVE_INF_ENGINE
#if defined HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
#include "backends/ov/util.hpp"
#include "api/gbackend_priv.hpp" // FIXME: Make it part of Backend SDK!
@ -991,11 +991,11 @@ void cv::gimpl::ov::GOVExecutable::run(cv::gimpl::GIslandExecutable::IInput &in
}
}
#else // HAVE_INF_ENGINE
#else // HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
cv::gapi::GBackend cv::gapi::ov::backend() {
// Still provide this symbol to avoid linking issues
util::throw_error(std::runtime_error("G-API has been compiled without OpenVINO support"));
}
#endif // HAVE_INF_ENGINE
#endif // HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000

@ -10,7 +10,7 @@
// Include anyway - cv::gapi::ov::backend() still needs to be defined
#include "opencv2/gapi/infer/ov.hpp"
#ifdef HAVE_INF_ENGINE
#if defined HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
#include <openvino/openvino.hpp>
@ -62,5 +62,5 @@ public:
}}}
#endif // HAVE_INF_ENGINE
#endif // HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
#endif // OPENCV_GAPI_GOVBACKEND_HPP

@ -7,7 +7,7 @@
#ifndef OPENCV_GAPI_INFER_OV_UTIL_HPP
#define OPENCV_GAPI_INFER_OV_UTIL_HPP
#ifdef HAVE_INF_ENGINE
#if defined HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
// NOTE: This file is not included by default in infer/ov.hpp
// and won't be. infer/ov.hpp doesn't depend on OV headers itself.
@ -30,6 +30,6 @@ GAPI_EXPORTS int to_ocv(const ::ov::element::Type &type);
}}}}
#endif // HAVE_INF_ENGINE
#endif // HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
#endif // OPENCV_GAPI_INFER_OV_UTIL_HPP

@ -4,7 +4,7 @@
//
// Copyright (C) 2023 Intel Corporation
#ifdef HAVE_INF_ENGINE
#if defined HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000
#include "../test_precomp.hpp"
@ -537,4 +537,4 @@ TEST(TestAgeGenderOV, InferTensorWithPreproc) {
} // namespace opencv_test
#endif // HAVE_INF_ENGINE
#endif // HAVE_INF_ENGINE && INF_ENGINE_RELEASE >= 2022010000

Loading…
Cancel
Save