diff --git a/.ci/azure/linux_cuda.yml b/.ci/azure/linux_cuda.yml index 5407a0a56dcc6a..290297e396d10f 100644 --- a/.ci/azure/linux_cuda.yml +++ b/.ci/azure/linux_cuda.yml @@ -138,6 +138,7 @@ jobs: -DENABLE_PYTHON=OFF -DENABLE_NVIDIA=ON -DENABLE_TESTS=ON + -DENABLE_DATA=OFF /root/repos/openvino && /root/w/ninja -v CudaFuncTests CudaUnitTests" workingDirectory: $(WORK_DIR) diff --git a/.github/workflows/code_style.yml b/.github/workflows/code_style.yml index 5c85b40c302ac2..3eb09c9270ff00 100644 --- a/.github/workflows/code_style.yml +++ b/.github/workflows/code_style.yml @@ -92,8 +92,8 @@ jobs: - name: Install Clang dependency run: | sudo apt update - sudo apt --assume-yes remove clang-7 clang-8 clang-9 clang-10 clang-11 clang-12 clang-13 - sudo apt --assume-yes install libclang-14-dev + sudo apt --assume-yes remove clang-7 clang-8 clang-9 clang-10 clang-11 clang-12 clang-13 clang-15 + sudo apt --assume-yes install clang-14 libclang-14-dev - name: Install Python-based dependencies run: python3 -m pip install -r cmake/developer_package/ncc_naming_style/requirements_dev.txt diff --git a/cmake/features.cmake b/cmake/features.cmake index 991f8e11abb0eb..95328f533bc7f6 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -110,12 +110,12 @@ ie_dependent_option (GAPI_TEST_PERF "if GAPI unit tests should examine performan ie_dependent_option (ENABLE_MYRIAD_MVNC_TESTS "functional and behavior tests for mvnc api" OFF "ENABLE_TESTS;ENABLE_INTEL_MYRIAD" OFF) -ie_dependent_option (ENABLE_DATA "fetch models from testdata repo" ON "ENABLE_FUNCTIONAL_TESTS;NOT ANDROID" OFF) - ie_dependent_option (ENABLE_BEH_TESTS "tests oriented to check OpenVINO Runtime API correctness" ON "ENABLE_TESTS" OFF) ie_dependent_option (ENABLE_FUNCTIONAL_TESTS "functional tests" ON "ENABLE_TESTS" OFF) +ie_dependent_option (ENABLE_DATA "fetch models from testdata repo" ON "ENABLE_FUNCTIONAL_TESTS;NOT ANDROID" OFF) + ie_option (ENABLE_SAMPLES "console samples are part of OpenVINO Runtime package" ON) ie_option (ENABLE_OPENCV "enables custom OpenCV download" OFF) diff --git a/src/bindings/python/src/compatibility/openvino/CMakeLists.txt b/src/bindings/python/src/compatibility/openvino/CMakeLists.txt index c81cd8a16a9215..9cc46f5ac480a9 100644 --- a/src/bindings/python/src/compatibility/openvino/CMakeLists.txt +++ b/src/bindings/python/src/compatibility/openvino/CMakeLists.txt @@ -22,7 +22,7 @@ endif() include (cmake/UseCython.cmake) # Check Cython version -if(CYTHON_VERSION VERSION_LESS "0.29") +if(CYTHON_VERSION VERSION_LESS 0.29) message(FATAL_ERROR "OpenVINO Python API needs at least Cython version 0.29, found version ${CYTHON_VERSION}") else() message(STATUS "Found Cython version ${CYTHON_VERSION}") diff --git a/src/bindings/python/src/compatibility/openvino/cmake/CythonConfig.cmake b/src/bindings/python/src/compatibility/openvino/cmake/CythonConfig.cmake index 05f75ceeb51772..4cc32dacec1375 100644 --- a/src/bindings/python/src/compatibility/openvino/cmake/CythonConfig.cmake +++ b/src/bindings/python/src/compatibility/openvino/cmake/CythonConfig.cmake @@ -50,7 +50,30 @@ include( FindPackageHandleStandardArgs ) FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE ) # Find Cython version -execute_process(COMMAND ${CYTHON_EXECUTABLE} -V ERROR_VARIABLE CYTHON_OUTPUT OUTPUT_QUIET) -string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+(\\.[0-9]+)?).*" "\\1" CYTHON_VERSION "${CYTHON_OUTPUT}") +execute_process(COMMAND ${CYTHON_EXECUTABLE} -V + ERROR_VARIABLE CYTHON_OUTPUT + OUTPUT_VARIABLE CYTHON_ERROR_MESSAGE + RESULT_VARIABLE CYTHON_EXIT_CODE + OUTPUT_STRIP_TRAILING_WHITESPACE) + +if(CYTHON_EXIT_CODE EQUAL 0) + if(NOT CYTHON_OUTPUT) + set(CYTHON_OUTPUT "${CYTHON_ERROR_MESSAGE}") + endif() + string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+(\\.[0-9]+)?).*" "\\1" CYTHON_VERSION "${CYTHON_OUTPUT}") +else() + if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) + set(CYTHON_MESSAGE_MODE TRACE) + endif() + if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED) + set(CYTHON_MESSAGE_MODE FATAL_ERROR) + endif() + message(${CYTHON_MESSAGE_MODE} "Failed to detect cython version: ${CYTHON_ERROR_MESSAGE}") + unset(CYTHON_MESSAGE_MODE) +endif() + +unset(CYTHON_OUTPUT) +unset(CYTHON_EXIT_CODE) +unset(CYTHON_ERROR_MESSAGE) mark_as_advanced( CYTHON_EXECUTABLE CYTHON_VERSION ) diff --git a/src/bindings/python/src/pyopenvino/core/compiled_model.cpp b/src/bindings/python/src/pyopenvino/core/compiled_model.cpp index 1b4d887c3e553a..b0255921f8fc69 100644 --- a/src/bindings/python/src/pyopenvino/core/compiled_model.cpp +++ b/src/bindings/python/src/pyopenvino/core/compiled_model.cpp @@ -32,9 +32,13 @@ void regclass_CompiledModel(py::module m) { "create_infer_request", [](ov::CompiledModel& self) { // Create temporary ov::InferRequest and move it to actual wrapper class. - return std::make_shared(self.create_infer_request(), self.inputs(), self.outputs()); + ov::InferRequest request; + { + py::gil_scoped_release release; + request = self.create_infer_request(); + } + return std::make_shared(std::move(request), self.inputs(), self.outputs()); }, - py::call_guard(), R"( Creates an inference request object used to infer the compiled model. The created request has allocated input and output tensors.