From d2bcbcf7eb70cb6baac99e1fb0676f6e81c6d03c Mon Sep 17 00:00:00 2001 From: Egor Tiuvaev Date: Wed, 20 Nov 2024 15:06:42 +0100 Subject: [PATCH] openvino/2024.5.0 update --- ports/openvino/002-fix-onnx.patch | 26 ----------- ports/openvino/002-protobuf.patch | 28 +++++++++++ ports/openvino/003-protobuf.patch | 37 --------------- ports/openvino/003-snippets-templates.patch | 52 +++++++++++++++++++++ ports/openvino/portfile.cmake | 38 +++++++++------ ports/openvino/vcpkg.json | 7 ++- versions/baseline.json | 4 +- versions/o-/openvino.json | 6 +-- 8 files changed, 113 insertions(+), 85 deletions(-) delete mode 100644 ports/openvino/002-fix-onnx.patch create mode 100644 ports/openvino/002-protobuf.patch delete mode 100644 ports/openvino/003-protobuf.patch create mode 100644 ports/openvino/003-snippets-templates.patch diff --git a/ports/openvino/002-fix-onnx.patch b/ports/openvino/002-fix-onnx.patch deleted file mode 100644 index 7fdbc006a6f0f8..00000000000000 --- a/ports/openvino/002-fix-onnx.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/frontends/onnx/onnx_common/CMakeLists.txt b/src/frontends/onnx/onnx_common/CMakeLists.txt -index d63bce4..116a6e3 100644 ---- a/src/frontends/onnx/onnx_common/CMakeLists.txt -+++ b/src/frontends/onnx/onnx_common/CMakeLists.txt -@@ -30,7 +30,7 @@ target_include_directories(${TARGET_NAME} - - target_link_libraries(${TARGET_NAME} PRIVATE openvino::runtime openvino::util) - --ov_link_system_libraries(${TARGET_NAME} PUBLIC onnx_proto onnx) -+ov_link_system_libraries(${TARGET_NAME} PUBLIC ONNX::onnx ONNX::onnx_proto) - - ov_add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}) - -diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake -index 24c4940..8ea7d12 100644 ---- a/thirdparty/dependencies.cmake -+++ b/thirdparty/dependencies.cmake -@@ -479,7 +479,7 @@ endif() - # - - if(ENABLE_OV_ONNX_FRONTEND) -- find_package(ONNX 1.15.0 QUIET COMPONENTS onnx onnx_proto NO_MODULE) -+ find_package(ONNX CONFIG REQUIRED) - - if(ONNX_FOUND) - # conan and vcpkg create imported targets 'onnx' and 'onnx_proto' diff --git a/ports/openvino/002-protobuf.patch b/ports/openvino/002-protobuf.patch new file mode 100644 index 00000000000000..66f9e7e14bfed8 --- /dev/null +++ b/ports/openvino/002-protobuf.patch @@ -0,0 +1,28 @@ +diff --git a/src/frontends/onnx/frontend/src/frontend.cpp b/src/frontends/onnx/frontend/src/frontend.cpp +index 5ad28be3654422..5296e5b1b7a506 100644 +--- a/src/frontends/onnx/frontend/src/frontend.cpp ++++ b/src/frontends/onnx/frontend/src/frontend.cpp +@@ -3,6 +3,9 @@ + // + + #include ++#ifndef PROTOBUF_VERSION ++# include ++#endif + #if PROTOBUF_VERSION >= 4022000 // protobuf 4.22 + # define OV_PROTOBUF_ABSL_IS_USED + #endif +diff --git a/src/frontends/paddle/src/frontend.cpp b/src/frontends/paddle/src/frontend.cpp +index 163b4d894cb766..2f2ca72418e5dd 100644 +--- a/src/frontends/paddle/src/frontend.cpp ++++ b/src/frontends/paddle/src/frontend.cpp +@@ -5,6 +5,9 @@ + #include "openvino/frontend/paddle/frontend.hpp" + + #include ++#ifndef PROTOBUF_VERSION ++# include ++#endif + #if PROTOBUF_VERSION >= 4022000 // protobuf 4.22 + # define OV_PROTOBUF_ABSL_IS_USED + #endif diff --git a/ports/openvino/003-protobuf.patch b/ports/openvino/003-protobuf.patch deleted file mode 100644 index dcb3ba4bb293ae..00000000000000 --- a/ports/openvino/003-protobuf.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/src/frontends/onnx/frontend/src/frontend.cpp b/src/frontends/onnx/frontend/src/frontend.cpp -index d4b83fee20..28272a1eda 100644 ---- a/src/frontends/onnx/frontend/src/frontend.cpp -+++ b/src/frontends/onnx/frontend/src/frontend.cpp -@@ -2,6 +2,7 @@ - // SPDX-License-Identifier: Apache-2.0 - // - -+#include - #include - #if PROTOBUF_VERSION >= 4022000 // protobuf 4.22 - # define OV_PROTOBUF_ABSL_IS_USED -diff --git a/src/frontends/paddle/src/frontend.cpp b/src/frontends/paddle/src/frontend.cpp -index c6febe0843..5d4789ccb6 100644 ---- a/src/frontends/paddle/src/frontend.cpp -+++ b/src/frontends/paddle/src/frontend.cpp -@@ -4,6 +4,7 @@ - - #include "openvino/frontend/paddle/frontend.hpp" - -+#include - #include - #if PROTOBUF_VERSION >= 4022000 // protobuf 4.22 - # define OV_PROTOBUF_ABSL_IS_USED -diff --git a/thirdparty/dependencies.cmake b/thirdparty/dependencies.cmake -index 9d7b16aeb8..af47fb99ee 100644 ---- a/thirdparty/dependencies.cmake -+++ b/thirdparty/dependencies.cmake -@@ -325,7 +325,7 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND - # try to find newer version first (major is changed) - # see https://protobuf.dev/support/version-support/ and - # https://github.com/protocolbuffers/protobuf/commit/d61f75ff6db36b4f9c0765f131f8edc2f86310fa -- find_package(Protobuf 4.22.0 QUIET CONFIG) -+ find_package(Protobuf REQUIRED CONFIG) - if(Protobuf_FOUND) - # protobuf was found via CONFIG mode, let's save it for later usage in OpenVINOConfig.cmake static build - set(protobuf_config CONFIG) diff --git a/ports/openvino/003-snippets-templates.patch b/ports/openvino/003-snippets-templates.patch new file mode 100644 index 00000000000000..548f5399c3b3ea --- /dev/null +++ b/ports/openvino/003-snippets-templates.patch @@ -0,0 +1,52 @@ +diff --git a/docs/snippets/CMakeLists.txt b/docs/snippets/CMakeLists.txt +index ec1cf14bd0e60b..18d176212a0212 100644 +--- a/docs/snippets/CMakeLists.txt ++++ b/docs/snippets/CMakeLists.txt +@@ -122,12 +122,15 @@ set(TARGET_NAME_PY "ov_integration_snippet_py") + cmake_minimum_required(VERSION 3.10) + set(CMAKE_CXX_STANDARD 11) + +-find_package(Python3 REQUIRED) +- execute_process( +- COMMAND ${Python3_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')" +- OUTPUT_VARIABLE OpenVINO_DIR_PY +- ERROR_QUIET +- ) ++if(NOT CMAKE_CROSSCOMPILING) ++ find_package(Python3 QUIET COMPONENTS Interpreter) ++ if(Python3_Interpreter_FOUND) ++ execute_process( ++ COMMAND ${Python3_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')" ++ OUTPUT_VARIABLE OpenVINO_DIR_PY ++ ERROR_QUIET) ++ endif() ++endif() + + find_package(OpenVINO REQUIRED PATHS "${OpenVINO_DIR_PY}") + +diff --git a/src/core/template_extension/CMakeLists.txt b/src/core/template_extension/CMakeLists.txt +index aa8030e78d7171..3cfcfcd058ff94 100644 +--- a/src/core/template_extension/CMakeLists.txt ++++ b/src/core/template_extension/CMakeLists.txt +@@ -8,12 +8,15 @@ set(CMAKE_CXX_STANDARD 11) + set(TARGET_NAME "openvino_template_extension") + + # The OpenVINO installed from PyPI can be used to find OpenVINO_DIR +-find_package(Python3 REQUIRED) +-execute_process( +- COMMAND ${Python3_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')" +- OUTPUT_VARIABLE OpenVINO_DIR_PY +- ERROR_QUIET +-) ++if(NOT CMAKE_CROSSCOMPILING) ++ find_package(Python3 QUIET COMPONENTS Interpreter) ++ if(Python3_Interpreter_FOUND) ++ execute_process( ++ COMMAND ${Python3_EXECUTABLE} -c "from openvino.utils import get_cmake_path; print(get_cmake_path(), end='')" ++ OUTPUT_VARIABLE OpenVINO_DIR_PY ++ ERROR_QUIET) ++ endif() ++endif() + + find_package(OpenVINO REQUIRED PATHS "${OpenVINO_DIR_PY}") + diff --git a/ports/openvino/portfile.cmake b/ports/openvino/portfile.cmake index 2f9d502f44b773..8b79ab78d1a28b 100644 --- a/ports/openvino/portfile.cmake +++ b/ports/openvino/portfile.cmake @@ -2,14 +2,14 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO openvinotoolkit/openvino REF "${VERSION}" - SHA512 2bf3f00589d825b7f4ca40d43129d81af4ba62382f98b283a3a206e7661a7a69f178c6afafdde646db8d68cb7fc54ec5280d2f4ff4fbbffe24082cf6649dda29 + SHA512 b003647de3de49e605943488ca9b2e5196b20d95b3152f0c2331c283d4cb253d1bbbb9cde04fa82733d3871d7128c6db6210957660bd89f26462798f782eca47 HEAD_REF master PATCHES # vcpkg specific patch, because OV creates a file in source tree, which is prohibited 001-disable-tools.patch - 002-fix-onnx.patch - 003-protobuf.patch - add-include-chrono.patch #https://github.com/openvinotoolkit/openvino/pull/27782 + 002-protobuf.patch + 003-snippets-templates.patch # https://github.com/openvinotoolkit/openvino/pull/28172 + add-include-chrono.patch # https://github.com/openvinotoolkit/openvino/pull/27782 ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -38,8 +38,8 @@ if(ENABLE_INTEL_GPU) vcpkg_from_github( OUT_SOURCE_PATH DEP_SOURCE_PATH REPO oneapi-src/oneDNN - REF 4ccd07e3a10e1c08075cf824ac14708245fbc334 - SHA512 c9a28f8427b5cd9c057a546b0b62303026f848045b26e0c9705e2f64d5bc84424ee15935d3bf5ee120d3c430a9dd41b7a6e26ef4fc0c53a2154ce83fcaee8b5a + REF 1722066ad4c0f15495f2d0fcbe9deb2bfd188c36 + SHA512 0b0461bf42d67f0fe7c6c61289a28e42915f7ac2ea5cc569957b8bb601962bec6135e84a2716911394952dffe2bb557c2d59d42c7f80a8db3c3937ecc6bd8ce8 ) file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_gpu/thirdparty/onednn_gpu") @@ -52,8 +52,8 @@ if(ENABLE_INTEL_CPU) vcpkg_from_github( OUT_SOURCE_PATH DEP_SOURCE_PATH REPO openvinotoolkit/oneDNN - REF c8ae8d96e963bd04214858319fa334968e5e73c9 - SHA512 6877ca37c3678e738fa94767b70432d3fff73305342164d0902875d9bcce3fe12abaf52bfc6ae0ef288532324e746b01e604ab7e47f198e7776352b8f5b6f009 + REF c60a9946aa2386890e5c9f5587974facb7624227 + SHA512 cc91f5b2ece1c3f14af308e3da436447d07964fa5ffa848c571fe67197a367673bf7bf9cd979fab0c9b216f92c611bd8df7018ec8e080f10759582629c10cb9d ) file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/onednn") @@ -76,11 +76,13 @@ if(ENABLE_INTEL_CPU) OUT_PYTHON_VAR OV_PYTHON_WITH_SCONS ) + list(APPEND FEATURE_OPTIONS "-DPython3_EXECUTABLE=${OV_PYTHON_WITH_SCONS}") + vcpkg_from_github( OUT_SOURCE_PATH DEP_SOURCE_PATH REPO ARM-software/ComputeLibrary - REF v24.08 - SHA512 82debaf8d8345b79b112afdabf6019c7ad8a9b30161d3061320a3da3040b2ad49153cc508caafe9fb1182c2669c958785acf2c361382080af273465d1727a71c + REF v24.09 + SHA512 c755da7d576b9bc1f33c9505efe4ce9e50cb927978f929d61f31b213904dca45ddb78b7c0cf9b215e37d2028e0404f4e3435678c120bba16263b55fd701eb4f1 ) file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_cpu/thirdparty/ComputeLibrary") endif() @@ -94,13 +96,23 @@ if(ENABLE_INTEL_NPU) REF v1.17.6 SHA512 bb412e875d97d1c80a0e67087e6dac1a6ffb91fa50e22deb7649ee3250c0937679d225419b52bfd7938f71a66ac15742a6a215cee7714c27e0f935e04df5b88e ) - file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_npu/thirdparty/level-zero") + file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/thirdparty/level_zero/level-zero") + + vcpkg_from_github( + OUT_SOURCE_PATH DEP_SOURCE_PATH + REPO gabime/spdlog + REF v1.15.0 + SHA512 3dd98409f4625ae4d46ef5f59a2fc22a6e151a13dba9d37433363e5d84eab7cca73b379eeb637d8f9b1f0f5a42221c0cc9a2a70414dc2b6af6a162e19fba0647 + ) + file(REMOVE_RECURSE "${SOURCE_PATH}/thirdparty/level_zero/level-zero/third_party/spdlog_headers/spdlog") + file(COPY "${DEP_SOURCE_PATH}/include/" + DESTINATION "${SOURCE_PATH}/thirdparty/level_zero/level-zero/third_party/spdlog_headers/") vcpkg_from_github( OUT_SOURCE_PATH DEP_SOURCE_PATH REPO intel/level-zero-npu-extensions - REF 16c85231a82ee1a0b06ed7ab7da3f411a0878ed7 - SHA512 983468c7706dc44cfc248c491cf51d2f69181c16ae1e400ca689df39c51112e03227c2f311173b1665115cdd33fa7d51d48e75adaf8353564a980b37c16aaa66 + REF a6487cc2c5da9aa13db9e005a320a1b6a0ee5919 + SHA512 9c4f401f52fddaea30c71ac9a15a2cdeed9e688b0f0392c55c819351287e84772c7b6cbfc21446cde0b5a5be3319b6164d345a720d44d882c0eba0c7b477242c ) file(COPY "${DEP_SOURCE_PATH}/" DESTINATION "${SOURCE_PATH}/src/plugins/intel_npu/thirdparty/level-zero-ext") endif() diff --git a/ports/openvino/vcpkg.json b/ports/openvino/vcpkg.json index d7341debe38b54..7d0b0c17273f27 100644 --- a/ports/openvino/vcpkg.json +++ b/ports/openvino/vcpkg.json @@ -1,8 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "openvino", - "version": "2024.4.0", - "port-version": 5, + "version": "2024.5.0", "maintainers": "OpenVINO Developers ", "summary": "This is a port for Open Visual Inference And Optimization toolkit for AI inference", "description": [ @@ -37,7 +36,7 @@ { "name": "xbyak", "platform": "!(arm | uwp)", - "version>=": "6.69" + "version>=": "6.73" } ], "default-features": [ @@ -93,7 +92,7 @@ "dependencies": [ { "name": "onnx", - "version>=": "1.13.1" + "version>=": "1.16.2" }, { "name": "protobuf", diff --git a/versions/baseline.json b/versions/baseline.json index 4a976b0e093034..e9440cd714d036 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6777,8 +6777,8 @@ "port-version": 0 }, "openvino": { - "baseline": "2024.4.0", - "port-version": 5 + "baseline": "2024.5.0", + "port-version": 0 }, "openvpn3": { "baseline": "3.10", diff --git a/versions/o-/openvino.json b/versions/o-/openvino.json index e65183d15eaceb..c2a783883ad71a 100644 --- a/versions/o-/openvino.json +++ b/versions/o-/openvino.json @@ -1,9 +1,9 @@ { "versions": [ { - "git-tree": "d3497e79615424c72514c072b5f7deb876f35718", - "version": "2024.4.0", - "port-version": 5 + "git-tree": "bbd654c60d3d6cc2a0bf30aba1876d680553b591", + "version": "2024.5.0", + "port-version": 0 }, { "git-tree": "04f4c58adc2db11be31f2d4427c6eeb62bbe0dd2",