From 789c32f3d8f16a1faa680f9989ae0454c59e6b0d Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 14 Feb 2025 14:14:48 +0000 Subject: [PATCH 01/22] Don't BuildRequires: ShellCheck Not actually needed to build, seems to only really be used in the CI scripts. Also it's a pain to bootstrap and EPEL hasn't done so yet. --- openvino.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/openvino.spec b/openvino.spec index b3ff85c..4d93b0b 100644 --- a/openvino.spec +++ b/openvino.spec @@ -65,7 +65,6 @@ BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: numpy -BuildRequires: ShellCheck BuildRequires: zlib-ng-compat-devel BuildRequires: xbyak-devel BuildRequires: yaml-cpp-devel From bc9d3f256406ae5607d7209d208c60a60772da17 Mon Sep 17 00:00:00 2001 From: "Alexander F. Lent" Date: Sun, 16 Feb 2025 23:10:43 -0500 Subject: [PATCH 02/22] Enable ONNX Frontend This introduces a new subpackage, libopenvino-onnx-frontend, which contains the ONNX frontend for OpenVINO. The new patch contains some tweaks to make it build against the system-provided protobuf and ONNX libraries. (I think with ONNX we are supposed to include its CMake files somehow, but I'm not a CMake expert, so I manually set the vars.) Signed-off-by: Alexander F. Lent --- onnx-frontend-enable.patch | 53 ++++++++++++++++++++++++++++++++++++++ openvino.spec | 21 +++++++++++++-- 2 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 onnx-frontend-enable.patch diff --git a/onnx-frontend-enable.patch b/onnx-frontend-enable.patch new file mode 100644 index 0000000..3d8ea0d --- /dev/null +++ b/onnx-frontend-enable.patch @@ -0,0 +1,53 @@ +diff -ur a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake +--- a/cmake/developer_package/frontends/frontends.cmake 2024-11-09 01:14:37.000000000 -0500 ++++ b/cmake/developer_package/frontends/frontends.cmake 2024-11-09 01:14:37.000000000 -0500 +@@ -246,7 +246,7 @@ + set(protobuf_target_name libprotobuf-lite) + set(protobuf_install_name "protobuf_lite_installed") + else() +- set(protobuf_target_name libprotobuf) ++ set(protobuf_target_name protobuf) + set(protobuf_install_name "protobuf_installed") + endif() + if(ENABLE_SYSTEM_PROTOBUF) +diff -ur a/src/frontends/common/CMakeLists.txt b/src/frontends/common/CMakeLists.txt +--- a/src/frontends/common/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 ++++ b/src/frontends/common/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 +@@ -83,6 +83,6 @@ + ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL}) + + # Shutdown protobuf library +-if(Protobuf_IN_FRONTEND AND BUILD_SHARED_LIBS) ++if(BUILD_SHARED_LIBS) + add_subdirectory(shutdown_protobuf) + endif() +diff -ur a/src/frontends/common/shutdown_protobuf/CMakeLists.txt b/src/frontends/common/shutdown_protobuf/CMakeLists.txt +--- a/src/frontends/common/shutdown_protobuf/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 ++++ b/src/frontends/common/shutdown_protobuf/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 +@@ -9,7 +9,7 @@ + add_library(openvino::protobuf_shutdown ALIAS ${TARGET_NAME}) + set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME protobuf_shutdown) + +-target_include_directories(${TARGET_NAME} SYSTEM PRIVATE +- $>) +-set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) +-target_compile_features(${TARGET_NAME} PRIVATE $) ++#target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ++# $>) ++#set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) ++#target_compile_features(${TARGET_NAME} PRIVATE $) +diff -ur a/src/frontends/onnx/CMakeLists.txt b/src/frontends/onnx/CMakeLists.txt +--- a/src/frontends/onnx/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 ++++ b/src/frontends/onnx/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 +@@ -2,6 +2,11 @@ + # SPDX-License-Identifier: Apache-2.0 + # + ++# TODO: Replace these with including the defs from ONNX's CMake files ++add_definitions(-DONNX_NAMESPACE=onnx -DONNX_ML=1) ++# TODO: The ONNX frontend uses functions only available in -std=c++17 ++add_compile_options(-std=c++17) ++ + add_subdirectory(onnx_common) + add_subdirectory(frontend) + diff --git a/openvino.spec b/openvino.spec index 4d93b0b..3f803b4 100644 --- a/openvino.spec +++ b/openvino.spec @@ -50,6 +50,7 @@ Patch0: openvino-fedora.patch # Support numpy 2.2.0 Patch1: https://github.com/openvinotoolkit/openvino/pull/28039.patch Patch2: npu-level-zero.patch +Patch3: onnx-frontend-enable.patch ExclusiveArch: x86_64 @@ -69,12 +70,15 @@ BuildRequires: zlib-ng-compat-devel BuildRequires: xbyak-devel BuildRequires: yaml-cpp-devel BuildRequires: tbb-devel +BuildRequires: onnx-devel +BuildRequires: protobuf-devel # forked version of OpenVINO oneDNN does not have a proper version Provides: bundled(onednn) # MLAS upstream does not have any release Provides: bundled(mlas) Requires: lib%{name}-ir-frontend = %{version} Requires: lib%{name}-pytorch-frontend = %{version} +Requires: lib%{name}-onnx-frontend = %{version} Requires: numpy Recommends: %{name}-plugins = %{version} @@ -114,6 +118,14 @@ The PyTorch Frontend is a C++ based OpenVINO Frontend component that is responsible for reading and converting a PyTorch model to an ov::Model object that can be further serialized into the Intermediate Representation (IR) format +%package -n lib%{name}-onnx-frontend +Summary: OpenVINO ONNX Frontend +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n lib%{name}-onnx-frontend +The main responsibility of the ONNX Frontend is to import ONNX models and +convert them into the ov::Model representation. + %package -n python3-%{name} Summary: OpenVINO Python API Requires: %{name}%{?_isa} = %{version}-%{release} @@ -195,7 +207,7 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/src/plug -DENABLE_MULTI=ON \ -DENABLE_PROXY=ON \ -DENABLE_TEMPLATE=ON \ - -DENABLE_OV_ONNX_FRONTEND=OFF \ + -DENABLE_OV_ONNX_FRONTEND=ON \ -DENABLE_OV_PADDLE_FRONTEND=OFF \ -DENABLE_OV_IR_FRONTEND=ON \ -DENABLE_OV_PYTORCH_FRONTEND=ON \ @@ -216,7 +228,7 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/src/plug -DENABLE_TBB_RELEASE_ONLY=ON \ -DENABLE_SAMPLES=OFF \ -DENABLE_TESTS=OFF \ - -DBUILD_SHARED_LIBS=ON + -DBUILD_SHARED_LIBS=ON \ %cmake_build %install @@ -244,6 +256,7 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}% %{_libdir}/lib%{name}.so %{_libdir}/lib%{name}_c.so %{_libdir}/lib%{name}_pytorch_frontend.so +%{_libdir}/lib%{name}_onnx_frontend.so %{_libdir}/cmake/openvino-%{version} %{_libdir}/pkgconfig/%{name}.pc @@ -264,6 +277,10 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}% %{_libdir}/lib%{name}_pytorch_frontend.so.%{version} %{_libdir}/lib%{name}_pytorch_frontend.so.%{so_ver} +%files -n lib%{name}-onnx-frontend +%{_libdir}/lib%{name}_onnx_frontend.so.%{version} +%{_libdir}/lib%{name}_onnx_frontend.so.%{so_ver} + %files -n python3-%{name} %{python3_sitearch}/%{name} %{python3_sitearch}/%{name}-%{version}.dist-info From 9339fade5e5b34aa3170ef655423d80e7f1c940d Mon Sep 17 00:00:00 2001 From: "Alexander F. Lent" Date: Sat, 1 Mar 2025 20:03:20 -0500 Subject: [PATCH 03/22] Fix build against CMake 4.0.0 and later in rawhide The bundled custom oneDNN sources have too old of a default CMake version. CMake 4.0.0-rc2 and newer only support backwards compatability with 3.5 and newer. So, patch the oneDNN sources to build under this constraint. Signed-off-by: Alexander F. Lent --- onednn-minimum-cmake-version.patch | 12 ++++++++++++ openvino.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 onednn-minimum-cmake-version.patch diff --git a/onednn-minimum-cmake-version.patch b/onednn-minimum-cmake-version.patch new file mode 100644 index 0000000..7d6dd4a --- /dev/null +++ b/onednn-minimum-cmake-version.patch @@ -0,0 +1,12 @@ +diff -ur a/src/plugins/intel_cpu/thirdparty/onednn/CMakeLists.txt b/src/plugins/intel_cpu/thirdparty/onednn/CMakeLists.txt +--- a/src/plugins/intel_cpu/thirdparty/onednn/CMakeLists.txt 2024-10-24 07:23:20.000000000 -0400 ++++ b/src/plugins/intel_cpu/thirdparty/onednn/CMakeLists.txt 2024-10-24 07:23:20.000000000 -0400 +@@ -14,7 +14,7 @@ + # limitations under the License. + #=============================================================================== + +-cmake_minimum_required(VERSION 2.8.12) ++cmake_minimum_required(VERSION 2.8.12...3.5) + + if(POLICY CMP0022) + cmake_policy(SET CMP0022 NEW) diff --git a/openvino.spec b/openvino.spec index 3f803b4..1ad0243 100644 --- a/openvino.spec +++ b/openvino.spec @@ -51,6 +51,8 @@ Patch0: openvino-fedora.patch Patch1: https://github.com/openvinotoolkit/openvino/pull/28039.patch Patch2: npu-level-zero.patch Patch3: onnx-frontend-enable.patch +# Fix the oneDNN build on CMake 4.0.0 and later +Patch4: onednn-minimum-cmake-version.patch ExclusiveArch: x86_64 @@ -136,7 +138,8 @@ code. Python API provides bindings to basic and advanced APIs from OpenVINO runtime. %prep -%autosetup -p1 +# autosetup without patching, since we need to patch one of the bundled libraries +%autosetup -N # Remove the thirdparty deps rm -rf thirdparty/* @@ -145,6 +148,8 @@ cp %{SOURCE4} thirdparty/ # Intel-cpu-plugin thirdparty deps tar xf %{SOURCE1} cp -r oneDNN-*/* src/plugins/intel_cpu/thirdparty/onednn +# autopatch will apply all the patches, now that we have unpacked enough of the bundled libraries +%autopatch -p1 tar xf %{SOURCE2} cp -r mlas-*/* src/plugins/intel_cpu/thirdparty/mlas From e235a250619ec455d5588efc897c1acbbded4695 Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Mon, 3 Mar 2025 19:37:11 +0200 Subject: [PATCH 04/22] Update to 2024.6.0 --- npu-level-zero.patch | 6 +++--- openvino.spec | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/npu-level-zero.patch b/npu-level-zero.patch index 3f5724c..1e15884 100644 --- a/npu-level-zero.patch +++ b/npu-level-zero.patch @@ -30,8 +30,8 @@ #include #include ---- a/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp 2025-01-30 16:59:40.615523874 +0000 -+++ b/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp 2025-01-30 17:00:06.007930172 +0000 +--- a/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp 2025-03-03 16:34:15.852236120 +0200 ++++ b/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp 2025-03-03 16:34:46.103040309 +0200 @@ -5,7 +5,7 @@ #include "zero_pipeline.hpp" @@ -40,7 +40,7 @@ +#include "ze_graph_ext.h" #include "intel_npu/common/itt.hpp" - #include "intel_npu/prefix.hpp" + #include "intel_npu/config/runtime.hpp" --- a/src/plugins/intel_npu/src/backend/src/zero_profiling.cpp 2025-01-30 17:01:12.269352224 +0000 +++ b/src/plugins/intel_npu/src/backend/src/zero_profiling.cpp 2025-01-30 17:02:55.013658475 +0000 @@ -4,7 +4,7 @@ diff --git a/openvino.spec b/openvino.spec index 1ad0243..71e4074 100644 --- a/openvino.spec +++ b/openvino.spec @@ -1,4 +1,4 @@ -%define so_ver 2450 +%define so_ver 2460 %global desc %{expand: \ OpenVINO is an open-source toolkit for optimizing and deploying deep learning models from cloud to edge. It accelerates deep learning inference across @@ -6,7 +6,7 @@ various use cases, such as generative AI, video, audio, and language with models from popular frameworks like PyTorch, TensorFlow, ONNX, and more.} Name: openvino -Version: 2024.5.0 +Version: 2024.6.0 Release: %autorelease Summary: Toolkit for optimizing and deploying AI inference From 52ea5f81a1b002f195827965d1f3b87ac6059137 Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Mon, 3 Mar 2025 19:56:33 +0200 Subject: [PATCH 05/22] missing tarball fix --- sources | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sources b/sources index 4895a44..0663b18 100644 --- a/sources +++ b/sources @@ -1,4 +1 @@ -SHA512 (openvino-2024.5.0.tar.gz) = b003647de3de49e605943488ca9b2e5196b20d95b3152f0c2331c283d4cb253d1bbbb9cde04fa82733d3871d7128c6db6210957660bd89f26462798f782eca47 -SHA512 (onednn-c60a994.tar.gz) = cc91f5b2ece1c3f14af308e3da436447d07964fa5ffa848c571fe67197a367673bf7bf9cd979fab0c9b216f92c611bd8df7018ec8e080f10759582629c10cb9d -SHA512 (mlas-d1bc25e.tar.gz) = 8d6dd319924135b7b22940d623305bf200b812ae64cde79000709de4fad429fbd43794301ef16e6f10ed7132777b7a73e9f30ecae7c030aea80d57d7c0ce4500 -SHA512 (level-zero-npu-extensions-110f48e.tar.gz) = aaaeecad6c00489b652cd94d63ed0c1e59eb0eaed8b463198b40f1af3944004b072808ccc3074b71d825e9f0f37bf76fedf296961bb18959ef66a699b71fec41 +SHA512 (openvino-2024.6.0.tar.gz) = 5bfe9c0b79b8f8bed7f39b78003424d4b7146d7c6afafc668752a0c8c45558fc8f37cfc26f783beb73c6919cb65313f24fd2e30c81651b34abf74c43c3bb7e32 From 09f51c7dfcb96a9c8309d4a1fc9a88d3ca472667 Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Mon, 3 Mar 2025 19:57:52 +0200 Subject: [PATCH 06/22] yet another source fix :( --- sources | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sources b/sources index 0663b18..5fea430 100644 --- a/sources +++ b/sources @@ -1 +1,4 @@ SHA512 (openvino-2024.6.0.tar.gz) = 5bfe9c0b79b8f8bed7f39b78003424d4b7146d7c6afafc668752a0c8c45558fc8f37cfc26f783beb73c6919cb65313f24fd2e30c81651b34abf74c43c3bb7e32 +SHA512 (onednn-c60a994.tar.gz) = cc91f5b2ece1c3f14af308e3da436447d07964fa5ffa848c571fe67197a367673bf7bf9cd979fab0c9b216f92c611bd8df7018ec8e080f10759582629c10cb9d +SHA512 (mlas-d1bc25e.tar.gz) = 8d6dd319924135b7b22940d623305bf200b812ae64cde79000709de4fad429fbd43794301ef16e6f10ed7132777b7a73e9f30ecae7c030aea80d57d7c0ce4500 +SHA512 (level-zero-npu-extensions-110f48e.tar.gz) = aaaeecad6c00489b652cd94d63ed0c1e59eb0eaed8b463198b40f1af3944004b072808ccc3074b71d825e9f0f37bf76fedf296961bb18959ef66a699b71fec41 From 6f143c3a9bc8cb31295649f9b018407ff74fc124 Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Fri, 7 Mar 2025 20:52:36 +0200 Subject: [PATCH 07/22] Update to 2025.0.0 --- npu-level-zero.patch | 53 ++++++++----------------------------------- openvino-fedora.patch | 11 ++------- openvino.spec | 16 ++++++------- pyproject.toml | 2 +- sources | 4 ++-- 5 files changed, 22 insertions(+), 64 deletions(-) diff --git a/npu-level-zero.patch b/npu-level-zero.patch index 1e15884..ba1d331 100644 --- a/npu-level-zero.patch +++ b/npu-level-zero.patch @@ -1,10 +1,9 @@ ---- a/src/plugins/intel_npu/thirdparty/CMakeLists.txt 2024-12-09 20:53:55.103131478 +0200 -+++ b/src/plugins/intel_npu/thirdparty/CMakeLists.txt 2024-12-09 21:43:54.335978284 +0200 -@@ -10,17 +10,5 @@ - add_library(level-zero-ext INTERFACE) +--- a/src/plugins/intel_npu/thirdparty/CMakeLists.txt 2025-03-04 19:35:03.642885693 +0200 ++++ b/src/plugins/intel_npu/thirdparty/CMakeLists.txt 2025-03-04 19:35:40.170807463 +0200 +@@ -11,16 +11,3 @@ set_property(TARGET level-zero-ext APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $) add_library(LevelZero::NPUExt ALIAS level-zero-ext) --endif() + endif() - -# -# yaml-cpp @@ -17,8 +16,7 @@ - if(SUGGEST_OVERRIDE_SUPPORTED) - target_compile_options(yaml-cpp PRIVATE -Wno-suggest-override) - endif() -+ install(TARGETS level-zero-ext EXPORT OpenVINODeveloperTargets) - endif() +-endif() --- a/src/plugins/intel_npu/src/backend/include/zero_memory.hpp 2025-01-30 16:54:27.550694466 +0000 +++ b/src/plugins/intel_npu/src/backend/include/zero_memory.hpp 2025-01-30 16:55:08.462018205 +0000 @@ -5,7 +5,7 @@ @@ -89,17 +87,6 @@ #include ---- a/src/plugins/intel_npu/src/compiler_adapter/include/driver_compiler_adapter.hpp 2025-01-30 17:14:00.292277234 +0000 -+++ b/src/plugins/intel_npu/src/compiler_adapter/include/driver_compiler_adapter.hpp 2025-01-30 17:14:25.236311534 +0000 -@@ -7,7 +7,7 @@ - #pragma once - - #include --#include -+#include "ze_graph_ext.h" - - #include - #include --- a/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrappers.hpp 2025-01-30 17:15:30.489090023 +0000 +++ b/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrappers.hpp 2025-01-30 17:15:49.345658116 +0000 @@ -5,7 +5,7 @@ @@ -148,17 +135,6 @@ #include "intel_npu/common/igraph.hpp" #include "intel_npu/icompiler.hpp" ---- a/src/plugins/intel_npu/src/compiler_adapter/src/driver_compiler_adapter.cpp 2025-01-30 17:22:45.703009508 +0000 -+++ b/src/plugins/intel_npu/src/compiler_adapter/src/driver_compiler_adapter.cpp 2025-01-30 17:23:09.819646893 +0000 -@@ -4,7 +4,7 @@ - - #include "driver_compiler_adapter.hpp" - --#include -+#include "ze_graph_ext.h" - - #include - #include --- a/src/plugins/intel_npu/src/compiler_adapter/include/driver_graph.hpp 2025-01-30 17:24:21.716872348 +0000 +++ b/src/plugins/intel_npu/src/compiler_adapter/include/driver_graph.hpp 2025-01-30 17:24:43.017813607 +0000 @@ -6,7 +6,7 @@ @@ -170,23 +146,12 @@ #include "intel_npu/common/igraph.hpp" #include "intel_npu/utils/zero/zero_init.hpp" ---- a/src/plugins/intel_npu/src/compiler_adapter/src/plugin_compiler_adapter.cpp 2025-01-30 17:26:13.469876624 +0000 -+++ b/src/plugins/intel_npu/src/compiler_adapter/src/plugin_compiler_adapter.cpp 2025-01-30 17:26:37.823924892 +0000 -@@ -4,7 +4,7 @@ - - #include "plugin_compiler_adapter.hpp" - --#include -+#include "ze_graph_ext.h" - - #include - #include ---- a/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp 2025-01-30 17:30:07.987984148 +0000 -+++ b/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp 2025-01-30 17:30:24.141709170 +0000 -@@ -4,7 +4,7 @@ - +--- a/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp 2025-03-04 11:24:17.123534980 +0200 ++++ a/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp 2025-03-04 11:24:32.852289727 +0200 +@@ -5,7 +5,7 @@ #include "intel_npu/utils/zero/zero_init.hpp" + #include -#include +#include "ze_command_queue_npu_ext.h" diff --git a/openvino-fedora.patch b/openvino-fedora.patch index b913d70..901c849 100644 --- a/openvino-fedora.patch +++ b/openvino-fedora.patch @@ -1,5 +1,5 @@ ---- a/CMakeLists.txt 2024-11-21 09:30:10.773366672 +0200 -+++ b/CMakeLists.txt 2024-11-21 09:38:39.166535850 +0200 +--- a/CMakeLists.txt 2025-03-04 11:03:17.565212068 +0200 ++++ b/CMakeLists.txt 2025-03-04 11:04:19.363015019 +0200 @@ -168,10 +168,10 @@ endif() @@ -15,13 +15,6 @@ if(ENABLE_TESTS) # layers and other more high-level / e2e tests -@@ -185,4 +185,4 @@ - # provides a callback function to describe each component in repo - include(cmake/packaging/packaging.cmake) - --ov_cpack(${OV_CPACK_COMPONENTS_ALL}) -\ No newline at end of file -+ov_cpack(${OV_CPACK_COMPONENTS_ALL}) --- a/cmake/developer_package/packaging/archive.cmake 2024-11-21 09:41:13.107605950 +0200 +++ b/cmake/developer_package/packaging/archive.cmake 2024-11-21 11:00:50.406807366 +0200 @@ -25,14 +25,17 @@ diff --git a/openvino.spec b/openvino.spec index 71e4074..2b63144 100644 --- a/openvino.spec +++ b/openvino.spec @@ -1,4 +1,4 @@ -%define so_ver 2460 +%define so_ver 2500 %global desc %{expand: \ OpenVINO is an open-source toolkit for optimizing and deploying deep learning models from cloud to edge. It accelerates deep learning inference across @@ -6,7 +6,7 @@ various use cases, such as generative AI, video, audio, and language with models from popular frameworks like PyTorch, TensorFlow, ONNX, and more.} Name: openvino -Version: 2024.6.0 +Version: 2025.0.0 Release: %autorelease Summary: Toolkit for optimizing and deploying AI inference @@ -40,19 +40,17 @@ Summary: Toolkit for optimizing and deploying AI inference License: Apache-2.0 AND MIT AND BSL-1.0 AND HPND AND BSD-3-Clause AND (GPL-2.0-only OR BSD-3-Clause) URL: https://github.com/openvinotoolkit/openvino Source0: %url/archive/%{version}/%{name}-%{version}.tar.gz -Source1: https://github.com/openvinotoolkit/oneDNN/archive/c60a9946aa2386890e5c9f5587974facb7624227/onednn-c60a994.tar.gz +Source1: https://github.com/openvinotoolkit/oneDNN/archive/1789b1e0ae441de15d793123003a900a35d1dc71/onednn-1789b1e.tar.gz Source2: https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94/mlas-d1bc25e.tar.gz Source3: https://github.com/intel/level-zero-npu-extensions/archive/110f48ee8eda22d8b40daeeecdbbed0fc3b08f8b/level-zero-npu-extensions-110f48e.tar.gz Source4: dependencies.cmake Source5: pyproject.toml Patch0: openvino-fedora.patch -# Support numpy 2.2.0 -Patch1: https://github.com/openvinotoolkit/openvino/pull/28039.patch -Patch2: npu-level-zero.patch -Patch3: onnx-frontend-enable.patch +Patch1: npu-level-zero.patch +Patch2: onnx-frontend-enable.patch # Fix the oneDNN build on CMake 4.0.0 and later -Patch4: onednn-minimum-cmake-version.patch +Patch3: onednn-minimum-cmake-version.patch ExclusiveArch: x86_64 @@ -173,6 +171,8 @@ sed -i '/#include .*/a#include ' src/core/dev_api/openvino/core sed -i '/#include .*/a#include ' src/common/snippets/include/snippets/utils/debug_caps_config.hpp sed -i '/#include .*/a#include ' src/plugins/intel_cpu/src/utils/debug_caps_config.h sed -i '/#include .*/a#include ' src/plugins/intel_npu/src/plugin/npuw/partitioning/online/graph.hpp +sed -i '/#include .*/a#include ' src/plugins/intel_npu/src/plugin/npuw/serialization.hpp +sed -i '/#include .*/a#include ' src/plugins/intel_cpu/src/utils/enum_class_hash.hpp %build %cmake \ diff --git a/pyproject.toml b/pyproject.toml index 5be2e69..4f0e329 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openvino" -version = "2024.5.0" +version = "2025.0.0" dependencies = [ "numpy>1.16.6", "packaging", diff --git a/sources b/sources index 5fea430..bd59e8c 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (openvino-2024.6.0.tar.gz) = 5bfe9c0b79b8f8bed7f39b78003424d4b7146d7c6afafc668752a0c8c45558fc8f37cfc26f783beb73c6919cb65313f24fd2e30c81651b34abf74c43c3bb7e32 -SHA512 (onednn-c60a994.tar.gz) = cc91f5b2ece1c3f14af308e3da436447d07964fa5ffa848c571fe67197a367673bf7bf9cd979fab0c9b216f92c611bd8df7018ec8e080f10759582629c10cb9d +SHA512 (openvino-2025.0.0.tar.gz) = a40636fbed5b306dc6eb26311ccd6298763a2ede28d8ccce75e6d99f13747d42d1bd9fede8fa225e23fd70f81fbb522ab5076edc08898ca33fc9ffa69b7c2e1a +SHA512 (onednn-1789b1e.tar.gz) = 32ef59542d8e2286b9b201dc94254f4b3b0c561446f05720e9ce7ce14a08fc40b331d765764d85f953cc3ca774b3e1c4f9a75b505aea285c3e18cae1a3c117cc SHA512 (mlas-d1bc25e.tar.gz) = 8d6dd319924135b7b22940d623305bf200b812ae64cde79000709de4fad429fbd43794301ef16e6f10ed7132777b7a73e9f30ecae7c030aea80d57d7c0ce4500 SHA512 (level-zero-npu-extensions-110f48e.tar.gz) = aaaeecad6c00489b652cd94d63ed0c1e59eb0eaed8b463198b40f1af3944004b072808ccc3074b71d825e9f0f37bf76fedf296961bb18959ef66a699b71fec41 From de6c16ab05dd70109fd4e15bcb0937a90bded1d7 Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Mon, 10 Mar 2025 14:29:59 +0200 Subject: [PATCH 08/22] Enable intel_npu protopipe and single-image-test tools (req. OpenCV G-API) --- 28039.patch | 30 ------------------- npu-level-zero.patch | 68 +++++++++++++++++++++++++++++++++----------- openvino.spec | 7 +++++ 3 files changed, 58 insertions(+), 47 deletions(-) delete mode 100644 28039.patch diff --git a/28039.patch b/28039.patch deleted file mode 100644 index e702295..0000000 --- a/28039.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 5e23f2a09c530834d4ea41f9901921c61da3381d Mon Sep 17 00:00:00 2001 -From: h6197627 <44726212+h6197627@users.noreply.github.com> -Date: Wed, 11 Dec 2024 17:42:44 +0200 -Subject: [PATCH] [PyOV] update numpy <2.3.0 - ---- - src/bindings/python/constraints.txt | 2 +- - src/bindings/python/requirements.txt | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/bindings/python/constraints.txt b/src/bindings/python/constraints.txt -index cc1d4514b7bbfe..4d65603a5323ab 100644 ---- a/src/bindings/python/constraints.txt -+++ b/src/bindings/python/constraints.txt -@@ -1,5 +1,5 @@ - # used in multiple components --numpy>=1.16.6,<2.2.0 # Python bindings, frontends -+numpy>=1.16.6,<2.3.0 # Python bindings, frontends - - # pytest - pytest>=5.0,<8.4 -diff --git a/src/bindings/python/requirements.txt b/src/bindings/python/requirements.txt -index a2d63161fe764c..febb91d5ecee55 100644 ---- a/src/bindings/python/requirements.txt -+++ b/src/bindings/python/requirements.txt -@@ -1,3 +1,3 @@ --numpy>=1.16.6,<2.2.0 -+numpy>=1.16.6,<2.3.0 - openvino-telemetry>=2023.2.1 - packaging diff --git a/npu-level-zero.patch b/npu-level-zero.patch index ba1d331..de6dfe3 100644 --- a/npu-level-zero.patch +++ b/npu-level-zero.patch @@ -17,6 +17,57 @@ - target_compile_options(yaml-cpp PRIVATE -Wno-suggest-override) - endif() -endif() +--- a/src/plugins/intel_npu/tools/compile_tool/CMakeLists.txt 2025-01-30 22:09:54.664509560 +0000 ++++ b/src/plugins/intel_npu/tools/compile_tool/CMakeLists.txt 2025-01-30 22:10:59.261604242 +0000 +@@ -41,13 +41,6 @@ + # + + install(TARGETS ${TARGET_NAME} +- RUNTIME DESTINATION "tools/${TARGET_NAME}" ++ RUNTIME DESTINATION "bin" + COMPONENT ${NPU_INTERNAL_COMPONENT} + ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) +- +-if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/README.md") +- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.md" +- DESTINATION "tools/${TARGET_NAME}" +- COMPONENT ${NPU_INTERNAL_COMPONENT} +- ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) +-endif() +--- a/src/plugins/intel_npu/tools/protopipe/CMakeLists.txt 2025-03-10 13:20:37.652583797 +0200 ++++ a/src/plugins/intel_npu/tools/protopipe/CMakeLists.txt 2025-03-10 13:21:06.242582658 +0200 +@@ -60,13 +60,7 @@ + # + + install(TARGETS ${TARGET_NAME} +- RUNTIME DESTINATION "tools/${TARGET_NAME}" ++ RUNTIME DESTINATION "bin/${TARGET_NAME}" + COMPONENT ${NPU_INTERNAL_COMPONENT} + ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) + +-if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/README.md") +- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.md" +- DESTINATION "tools/${TARGET_NAME}" +- COMPONENT ${NPU_INTERNAL_COMPONENT} +- ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) +-endif() +--- a/src/plugins/intel_npu/tools/single-image-test/CMakeLists.txt 2025-03-10 13:21:33.270430504 +0200 ++++ a/src/plugins/intel_npu/tools/single-image-test/CMakeLists.txt 2025-03-10 13:21:48.355429777 +0200 +@@ -63,13 +63,7 @@ + # + + install(TARGETS ${TARGET_NAME} +- RUNTIME DESTINATION "tools/${TARGET_NAME}" ++ RUNTIME DESTINATION "bin/${TARGET_NAME}" + COMPONENT ${NPU_INTERNAL_COMPONENT} + ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) + +-if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/README.md") +- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.md" +- DESTINATION "tools/${TARGET_NAME}" +- COMPONENT ${NPU_INTERNAL_COMPONENT} +- ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) +-endif() --- a/src/plugins/intel_npu/src/backend/include/zero_memory.hpp 2025-01-30 16:54:27.550694466 +0000 +++ b/src/plugins/intel_npu/src/backend/include/zero_memory.hpp 2025-01-30 16:55:08.462018205 +0000 @@ -5,7 +5,7 @@ @@ -157,20 +208,3 @@ #include ---- a/src/plugins/intel_npu/tools/compile_tool/CMakeLists.txt 2025-01-30 22:09:54.664509560 +0000 -+++ b/src/plugins/intel_npu/tools/compile_tool/CMakeLists.txt 2025-01-30 22:10:59.261604242 +0000 -@@ -41,13 +41,6 @@ - # - - install(TARGETS ${TARGET_NAME} -- RUNTIME DESTINATION "tools/${TARGET_NAME}" -+ RUNTIME DESTINATION "bin" - COMPONENT ${NPU_INTERNAL_COMPONENT} - ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) -- --if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/README.md") -- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.md" -- DESTINATION "tools/${TARGET_NAME}" -- COMPONENT ${NPU_INTERNAL_COMPONENT} -- ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) --endif() diff --git a/openvino.spec b/openvino.spec index 2b63144..9ec4a2b 100644 --- a/openvino.spec +++ b/openvino.spec @@ -72,10 +72,13 @@ BuildRequires: yaml-cpp-devel BuildRequires: tbb-devel BuildRequires: onnx-devel BuildRequires: protobuf-devel +BuildRequires: opencv-devel # forked version of OpenVINO oneDNN does not have a proper version Provides: bundled(onednn) # MLAS upstream does not have any release Provides: bundled(mlas) +# level-zero-npu-extensions upstream does not have any release +Provides: bundled(level-zero-npu-extensions) Requires: lib%{name}-ir-frontend = %{version} Requires: lib%{name}-pytorch-frontend = %{version} Requires: lib%{name}-onnx-frontend = %{version} @@ -173,6 +176,8 @@ sed -i '/#include .*/a#include ' src/plugins/intel_cpu/src/uti sed -i '/#include .*/a#include ' src/plugins/intel_npu/src/plugin/npuw/partitioning/online/graph.hpp sed -i '/#include .*/a#include ' src/plugins/intel_npu/src/plugin/npuw/serialization.hpp sed -i '/#include .*/a#include ' src/plugins/intel_cpu/src/utils/enum_class_hash.hpp +sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/protopipe/src/graph.hpp +sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/protopipe/src/scenario/criterion.hpp %build %cmake \ @@ -273,6 +278,8 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}% %{_libdir}/%{name}-%{version}/lib%{name}_intel_cpu_plugin.so %{_libdir}/%{name}-%{version}/lib%{name}_intel_npu_plugin.so %{_bindir}/compile_tool +%{_bindir}/protopipe +%{_bindir}/single-image-test %files -n lib%{name}-ir-frontend %{_libdir}/lib%{name}_ir_frontend.so.%{version} From 726a833aee3c1733c6a20f7c7b0a9fdbb90861d1 Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Mon, 17 Mar 2025 21:14:55 +0200 Subject: [PATCH 09/22] enable intel_gpu plugin --- openvino-fedora.patch | 15 +++++++++++++++ openvino.spec | 12 ++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/openvino-fedora.patch b/openvino-fedora.patch index 901c849..642cb34 100644 --- a/openvino-fedora.patch +++ b/openvino-fedora.patch @@ -90,3 +90,18 @@ includedir=${include_prefix} Name: OpenVINO +--- a/src/plugins/intel_gpu/CMakeLists.txt 2025-03-17 18:30:04.844696856 +0200 ++++ b/src/plugins/intel_gpu/CMakeLists.txt 2025-03-17 18:30:35.623976711 +0200 +@@ -63,9 +63,9 @@ + add_subdirectory(thirdparty) + include(thirdparty/cmake/rapidjson.cmake) + +-if(CMAKE_COMPILER_IS_GNUCXX) +- ov_add_compiler_flags(-Werror) +-endif() ++#if(CMAKE_COMPILER_IS_GNUCXX) ++# ov_add_compiler_flags(-Werror) ++#endif() + + add_subdirectory(src/runtime) + add_subdirectory(src/kernel_selector) diff --git a/openvino.spec b/openvino.spec index 9ec4a2b..c77dd6f 100644 --- a/openvino.spec +++ b/openvino.spec @@ -73,6 +73,8 @@ BuildRequires: tbb-devel BuildRequires: onnx-devel BuildRequires: protobuf-devel BuildRequires: opencv-devel +BuildRequires: OpenCL-ICD-Loader-devel +BuildRequires: opencl-headers # forked version of OpenVINO oneDNN does not have a proper version Provides: bundled(onednn) # MLAS upstream does not have any release @@ -159,6 +161,9 @@ rm -rf src/plugins/intel_npu/thirdparty/yaml-cpp tar xf %{SOURCE3} cp -r level-*/* src/plugins/intel_npu/thirdparty/level-zero-ext +# intel-gpu-plugin cache.json +sed -i -e 's|CACHE_JSON_INSTALL_DIR ${OV_CPACK_PLUGINSDIR}|CACHE_JSON_INSTALL_DIR %{_datadir}/%{name}|g' src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt + # python:prep sed -i '/openvino-telemetry/d' src/bindings/python/requirements.txt cp %{SOURCE5} src/bindings/python @@ -209,7 +214,7 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_MLAS_FOR_CPU=ON \ -DENABLE_MLAS_FOR_CPU_DEFAULT=ON \ -DENABLE_INTEL_GNA=OFF \ - -DENABLE_INTEL_GPU=OFF \ + -DENABLE_INTEL_GPU=ON \ -DENABLE_SYSTEM_LEVEL_ZERO=ON \ -DENABLE_INTEL_NPU=ON \ -DENABLE_NPU_PLUGIN_ENGINE=ON \ @@ -228,7 +233,7 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_WHEEL=OFF \ -DENABLE_JS=OFF \ -DENABLE_SYSTEM_LIBS_DEFAULT=ON \ - -DENABLE_SYSTEM_OPENCL=OFF \ + -DENABLE_SYSTEM_OPENCL=ON \ -DENABLE_SYSTEM_PUGIXML=ON \ -DENABLE_SYSTEM_PROTOBUF=OFF \ -DTHREADING=TBB \ @@ -248,6 +253,7 @@ export WHEEL_VERSION=%{version} %{python3} src/bindings/python/wheel/setup.py dist_info -o %{buildroot}/%{python3_sitearch} rm -v %{buildroot}/%{python3_sitearch}/requirements.txt rm -v %{buildroot}/%{python3_sitearch}/%{name}/preprocess/torchvision/requirements.txt +mkdir -p -m 755 %{buildroot}%{_datadir}/%{name} %check LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}%{python3_sitearch} %{python3} samples/python/hello_query_device/hello_query_device.py @@ -276,10 +282,12 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}% %{_libdir}/%{name}-%{version}/lib%{name}_auto_batch_plugin.so %{_libdir}/%{name}-%{version}/lib%{name}_hetero_plugin.so %{_libdir}/%{name}-%{version}/lib%{name}_intel_cpu_plugin.so +%{_libdir}/%{name}-%{version}/lib%{name}_intel_gpu_plugin.so %{_libdir}/%{name}-%{version}/lib%{name}_intel_npu_plugin.so %{_bindir}/compile_tool %{_bindir}/protopipe %{_bindir}/single-image-test +%{_datadir}/%{name} %files -n lib%{name}-ir-frontend %{_libdir}/lib%{name}_ir_frontend.so.%{version} From d067bb5dccb81cf1ec987ac291e743f25a81bb8e Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Wed, 26 Mar 2025 14:02:58 +0200 Subject: [PATCH 10/22] disable experimental JAX/Flax support (RHBZ#2350885) --- openvino.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/openvino.spec b/openvino.spec index c77dd6f..f9cd357 100644 --- a/openvino.spec +++ b/openvino.spec @@ -224,6 +224,7 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_TEMPLATE=ON \ -DENABLE_OV_ONNX_FRONTEND=ON \ -DENABLE_OV_PADDLE_FRONTEND=OFF \ + -DENABLE_OV_JAX_FRONTEND=OFF \ -DENABLE_OV_IR_FRONTEND=ON \ -DENABLE_OV_PYTORCH_FRONTEND=ON \ -DENABLE_OV_TF_FRONTEND=OFF \ From d30d816b7e9afcd192b0af635e3b743d00d0bc35 Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Fri, 25 Apr 2025 11:42:11 +0300 Subject: [PATCH 11/22] Update to 2025.1.0 (RHBZ#2358787) --- dependencies.cmake | 226 +++++++++++++++++++++++++++++ npu-level-zero.patch | 78 +++++----- onednn-minimum-cmake-version.patch | 12 -- onnx-frontend-enable.patch | 53 ------- openvino.spec | 30 ++-- pyproject.toml | 2 +- sources | 6 +- 7 files changed, 290 insertions(+), 117 deletions(-) delete mode 100644 onednn-minimum-cmake-version.patch delete mode 100644 onnx-frontend-enable.patch diff --git a/dependencies.cmake b/dependencies.cmake index f4f8831..e550abe 100644 --- a/dependencies.cmake +++ b/dependencies.cmake @@ -213,3 +213,229 @@ if(NOT TARGET openvino::pugixml) ov_build_pugixml() endif() + +# +# Protobuf +# + +if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND) + if(ENABLE_SYSTEM_PROTOBUF) + # Note: Debian / Ubuntu / RHEL libprotobuf.a can only be used with -DBUILD_SHARED_LIBS=OFF + # because they are compiled without -fPIC + if(NOT DEFINED Protobuf_USE_STATIC_LIBS) + set(Protobuf_USE_STATIC_LIBS ON) + endif() + if(CMAKE_VERBOSE_MAKEFILE) + set(Protobuf_DEBUG ON) + endif() + # 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 5.26.0 QUIET CONFIG) + if(NOT Protobuf_FOUND) + find_package(Protobuf 4.22.0 QUIET CONFIG) + endif() + 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) + else() + if(OV_VCPKG_BUILD) + set(protobuf_config CONFIG) + endif() + # otherwise, fallback to existing default + find_package(Protobuf 3.19.6 REQUIRED ${protobuf_config}) + endif() + + # with newer protobuf versions (4.22 and newer), we use CONFIG first + # so, the Protobuf_PROTOC_EXECUTABLE variable must be checked explicitly, + # because it's not used in this case (oppositely to MODULE case) + if(Protobuf_VERSION VERSION_GREATER_EQUAL 22 AND DEFINED Protobuf_PROTOC_EXECUTABLE) + set(PROTOC_EXECUTABLE ${Protobuf_PROTOC_EXECUTABLE}) + else() + set(PROTOC_EXECUTABLE protobuf::protoc) + endif() + else() + add_subdirectory(thirdparty/protobuf EXCLUDE_FROM_ALL) + # protobuf fails to build with -fsanitize=thread by clang + if(ENABLE_THREAD_SANITIZER AND OV_COMPILER_IS_CLANG) + foreach(proto_target protoc libprotobuf libprotobuf-lite) + if(TARGET ${proto_target}) + target_compile_options(${proto_target} PUBLIC -fno-sanitize=thread) + target_link_options(${proto_target} PUBLIC -fno-sanitize=thread) + endif() + endforeach() + endif() + endif() + + # forward additional variables used in the other places + set(Protobuf_IN_FRONTEND ON) + + # set public / interface compile options + function(_ov_fix_protobuf_warnings target_name) + set(link_type PUBLIC) + if(ENABLE_SYSTEM_PROTOBUF) + set(link_type INTERFACE) + endif() + if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR (OV_COMPILER_IS_INTEL_LLVM AND UNIX)) + # Protobuf built manually not via CMake in Fedora + if(NOT TARGET protobuf::libprotobuf) + add_library(protobuf::libprotobuf ${link_type} IMPORTED) + set_target_properties(protobuf::libprotobuf PROPERTIES + IMPORTED_LOCATION "${Protobuf_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIRS}") + target_compile_options(${target_name} ${link_type} -Wno-undef) + endif() + endif() + endfunction() + + _ov_fix_protobuf_warnings(protobuf::libprotobuf) + if(TARGET protobuf::libprotobuf-lite) + _ov_fix_protobuf_warnings(protobuf::libprotobuf-lite) + endif() +endif() + +# +# FlatBuffers +# + +if(ENABLE_OV_TF_LITE_FRONTEND) + if(ENABLE_SYSTEM_FLATBUFFERS) + ov_cross_compile_define_debian_arch() + + # on new Ubuntu versions like 23.04 we have config called FlatBuffersConfig.cmake + # so, we need to provide alternative names + find_host_package(Flatbuffers QUIET NAMES Flatbuffers FlatBuffers NO_CMAKE_FIND_ROOT_PATH) + + ov_cross_compile_define_debian_arch_reset() + endif() + + if(Flatbuffers_FOUND) + # we don't actually use library files (.so | .dylib | .a) itself, only headers + if(TARGET flatbuffers::flatbuffers_shared) + set(flatbuffers_LIBRARY flatbuffers::flatbuffers_shared) + elseif(TARGET flatbuffers::flatbuffers) + set(flatbuffers_LIBRARY flatbuffers::flatbuffers) + else() + message(FATAL_ERROR "Internal error: Failed to detect flatbuffers library target") + endif() + set(flatbuffers_COMPILER flatbuffers::flatc) + else() + add_subdirectory(thirdparty/flatbuffers EXCLUDE_FROM_ALL) + + # used by NPU repo + set(flatc_COMMAND flatc) + set(flatc_TARGET flatc) + endif() + + # set additional variables, used in other places of our cmake scripts + set(flatbuffers_INCLUDE_DIRECTORIES $) +endif() + +# +# Snappy Compression +# + +if(ENABLE_SNAPPY_COMPRESSION) + if(ENABLE_SYSTEM_SNAPPY) + find_package(Snappy REQUIRED) + + set(ov_snappy_lib Snappy::snappy) + if(NOT BUILD_SHARED_LIBS AND TARGET Snappy::snappy-static) + # we can use static library only in static build, because in case od dynamic build + # the libsnappy.a should be compiled with -fPIC, while Debian / Ubuntu / RHEL don't do it + set(ov_snappy_lib Snappy::snappy-static) + endif() + + if(OV_PkgConfig_VISIBILITY) + # need to set GLOBAL visibility in order to create ALIAS for this target + set_target_properties(${ov_snappy_lib} PROPERTIES IMPORTED_GLOBAL ON) + endif() + + add_library(openvino::snappy ALIAS ${ov_snappy_lib}) + endif() + + if(NOT TARGET openvino::snappy) + function(ov_build_snappy) + set(BUILD_SHARED_LIBS OFF) + set(SNAPPY_BUILD_BENCHMARKS OFF) + set(SNAPPY_BUILD_TESTS OFF) + set(INSTALL_GTEST OFF) + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # '<': signed/unsigned mismatch + ov_add_compiler_flags(/wd4018) + # conditional expression is constant + ov_add_compiler_flags(/wd4127) + # 'conversion' conversion from 'type1' to 'type2', possible loss of data + ov_add_compiler_flags(/wd4244) + # 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch + ov_add_compiler_flags(/wd4245) + # 'var' : conversion from 'size_t' to 'type', possible loss of data + ov_add_compiler_flags(/wd4267) + elseif(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG OR (OV_COMPILER_IS_INTEL_LLVM AND UNIX)) + # we need to pass -Wextra first, then -Wno-sign-compare + # otherwise, snappy's CMakeLists.txt will do it for us + ov_add_compiler_flags(-Wextra) + ov_add_compiler_flags(-Wno-sign-compare) + elseif(OV_COMPILER_IS_INTEL_LLVM AND WIN32) + ov_add_compiler_flags(/WX-) + endif() + + add_subdirectory(thirdparty/snappy EXCLUDE_FROM_ALL) + # need to create alias openvino::snappy + add_library(openvino::snappy ALIAS snappy) + + # WA for emscripten build which currently requires -fexceptions + if(EMSCRIPTEN) + target_compile_options(snappy PRIVATE "-fexceptions") + endif() + endfunction() + + ov_build_snappy() + ov_install_static_lib(snappy ${OV_CPACK_COMP_CORE}) + endif() +endif() + +# +# ONNX +# + +if(ENABLE_OV_ONNX_FRONTEND) + find_package(ONNX 1.16.2 QUIET COMPONENTS onnx onnx_proto NO_MODULE) + + if(ONNX_FOUND) + # conan and vcpkg create imported targets 'onnx' and 'onnx_proto' + # newer versions of ONNX in vcpkg has ONNX:: prefix, let's create aliases + if(TARGET ONNX::onnx) + add_library(onnx ALIAS ONNX::onnx) + endif() + if(TARGET ONNX::onnx_proto) + add_library(onnx_proto ALIAS ONNX::onnx_proto) + endif() + else() + add_subdirectory(thirdparty/onnx) + endif() +endif() + +# +# nlohmann json +# + +# Note: NPU requires 3.9.0 version, because it contains 'nlohmann::ordered_json' +find_package(nlohmann_json 3.9.0 QUIET) +if(nlohmann_json_FOUND) + # conan and vcpkg create imported target nlohmann_json::nlohmann_json +else() + add_subdirectory(thirdparty/json EXCLUDE_FROM_ALL) + + # this is required only because of NPU plugin reused this: export & install + ov_developer_package_export_targets(TARGET nlohmann_json + INSTALL_INCLUDE_DIRECTORIES "${OpenVINO_SOURCE_DIR}/thirdparty/json/nlohmann_json/include") + + # for nlohmann library versions older than v3.0.0 + if(NOT TARGET nlohmann_json::nlohmann_json) + add_library(nlohmann_json::nlohmann_json INTERFACE IMPORTED) + set_target_properties(nlohmann_json::nlohmann_json PROPERTIES + INTERFACE_LINK_LIBRARIES nlohmann_json + INTERFACE_COMPILE_DEFINITIONS JSON_HEADER) + endif() +endif() diff --git a/npu-level-zero.patch b/npu-level-zero.patch index de6dfe3..e7926a9 100644 --- a/npu-level-zero.patch +++ b/npu-level-zero.patch @@ -1,5 +1,5 @@ ---- a/src/plugins/intel_npu/thirdparty/CMakeLists.txt 2025-03-04 19:35:03.642885693 +0200 -+++ b/src/plugins/intel_npu/thirdparty/CMakeLists.txt 2025-03-04 19:35:40.170807463 +0200 +--- a/src/plugins/intel_npu/thirdparty/CMakeLists.txt 2025-04-22 08:56:17.128557002 +0300 ++++ b/src/plugins/intel_npu/thirdparty/CMakeLists.txt 2025-04-22 08:56:27.085760995 +0300 @@ -11,16 +11,3 @@ set_property(TARGET level-zero-ext APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $) add_library(LevelZero::NPUExt ALIAS level-zero-ext) @@ -17,9 +17,9 @@ - target_compile_options(yaml-cpp PRIVATE -Wno-suggest-override) - endif() -endif() ---- a/src/plugins/intel_npu/tools/compile_tool/CMakeLists.txt 2025-01-30 22:09:54.664509560 +0000 -+++ b/src/plugins/intel_npu/tools/compile_tool/CMakeLists.txt 2025-01-30 22:10:59.261604242 +0000 -@@ -41,13 +41,6 @@ +--- a/src/plugins/intel_npu/tools/compile_tool/CMakeLists.txt 2025-04-22 08:56:52.338766209 +0300 ++++ b/src/plugins/intel_npu/tools/compile_tool/CMakeLists.txt 2025-04-22 08:57:28.380471138 +0300 +@@ -45,13 +45,6 @@ # install(TARGETS ${TARGET_NAME} @@ -34,9 +34,9 @@ - COMPONENT ${NPU_INTERNAL_COMPONENT} - ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) -endif() ---- a/src/plugins/intel_npu/tools/protopipe/CMakeLists.txt 2025-03-10 13:20:37.652583797 +0200 -+++ a/src/plugins/intel_npu/tools/protopipe/CMakeLists.txt 2025-03-10 13:21:06.242582658 +0200 -@@ -60,13 +60,7 @@ +--- a/src/plugins/intel_npu/tools/protopipe/CMakeLists.txt 2025-04-22 08:57:42.031656000 +0300 ++++ b/src/plugins/intel_npu/tools/protopipe/CMakeLists.txt 2025-04-22 08:58:18.596665997 +0300 +@@ -64,13 +64,6 @@ # install(TARGETS ${TARGET_NAME} @@ -44,16 +44,16 @@ + RUNTIME DESTINATION "bin/${TARGET_NAME}" COMPONENT ${NPU_INTERNAL_COMPONENT} ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) - +- -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/README.md") - install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.md" - DESTINATION "tools/${TARGET_NAME}" - COMPONENT ${NPU_INTERNAL_COMPONENT} - ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) -endif() ---- a/src/plugins/intel_npu/tools/single-image-test/CMakeLists.txt 2025-03-10 13:21:33.270430504 +0200 -+++ a/src/plugins/intel_npu/tools/single-image-test/CMakeLists.txt 2025-03-10 13:21:48.355429777 +0200 -@@ -63,13 +63,7 @@ +--- a/src/plugins/intel_npu/tools/single-image-test/CMakeLists.txt 2025-04-22 08:58:29.092032832 +0300 ++++ b/src/plugins/intel_npu/tools/single-image-test/CMakeLists.txt 2025-04-22 08:58:55.051015815 +0300 +@@ -67,13 +67,6 @@ # install(TARGETS ${TARGET_NAME} @@ -61,15 +61,15 @@ + RUNTIME DESTINATION "bin/${TARGET_NAME}" COMPONENT ${NPU_INTERNAL_COMPONENT} ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) - +- -if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/README.md") - install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/README.md" - DESTINATION "tools/${TARGET_NAME}" - COMPONENT ${NPU_INTERNAL_COMPONENT} - ${OV_CPACK_COMP_NPU_INTERNAL_EXCLUDE_ALL}) -endif() ---- a/src/plugins/intel_npu/src/backend/include/zero_memory.hpp 2025-01-30 16:54:27.550694466 +0000 -+++ b/src/plugins/intel_npu/src/backend/include/zero_memory.hpp 2025-01-30 16:55:08.462018205 +0000 +--- a/src/plugins/intel_npu/src/backend/include/zero_memory.hpp 2025-04-22 09:05:56.846233909 +0300 ++++ b/src/plugins/intel_npu/src/backend/include/zero_memory.hpp 2025-04-22 09:06:16.087659601 +0300 @@ -5,7 +5,7 @@ #pragma once @@ -79,8 +79,8 @@ #include #include ---- a/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp 2025-03-03 16:34:15.852236120 +0200 -+++ b/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp 2025-03-03 16:34:46.103040309 +0200 +--- a/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp 2025-04-22 09:07:43.393381649 +0300 ++++ b/src/plugins/intel_npu/src/backend/src/zero_pipeline.cpp 2025-04-22 09:07:56.183659457 +0300 @@ -5,7 +5,7 @@ #include "zero_pipeline.hpp" @@ -90,8 +90,8 @@ #include "intel_npu/common/itt.hpp" #include "intel_npu/config/runtime.hpp" ---- a/src/plugins/intel_npu/src/backend/src/zero_profiling.cpp 2025-01-30 17:01:12.269352224 +0000 -+++ b/src/plugins/intel_npu/src/backend/src/zero_profiling.cpp 2025-01-30 17:02:55.013658475 +0000 +--- a/src/plugins/intel_npu/src/backend/src/zero_profiling.cpp 2025-04-22 09:08:57.774124447 +0300 ++++ b/src/plugins/intel_npu/src/backend/src/zero_profiling.cpp 2025-04-22 09:09:12.295471482 +0300 @@ -4,7 +4,7 @@ #include "zero_profiling.hpp" @@ -101,8 +101,8 @@ #include "intel_npu/config/compiler.hpp" #include "intel_npu/profiling.hpp" ---- a/src/plugins/intel_npu/src/backend/include/zero_infer_request.hpp 2025-01-30 17:07:27.738739813 +0000 -+++ b/src/plugins/intel_npu/src/backend/include/zero_infer_request.hpp 2025-01-30 17:07:56.759752802 +0000 +--- a/src/plugins/intel_npu/src/backend/include/zero_infer_request.hpp 2025-04-22 09:10:24.837226950 +0300 ++++ b/src/plugins/intel_npu/src/backend/include/zero_infer_request.hpp 2025-04-22 09:10:41.016084607 +0300 @@ -5,7 +5,7 @@ #pragma once @@ -112,8 +112,8 @@ #include "intel_npu/common/npu.hpp" #include "intel_npu/common/sync_infer_request.hpp" ---- a/src/plugins/intel_npu/src/backend/include/zero_device.hpp 2025-01-30 17:09:06.727631829 +0000 -+++ b/src/plugins/intel_npu/src/backend/include/zero_device.hpp 2025-01-30 17:09:28.566273820 +0000 +--- a/src/plugins/intel_npu/src/backend/include/zero_device.hpp 2025-04-22 09:11:34.924583352 +0300 ++++ b/src/plugins/intel_npu/src/backend/include/zero_device.hpp 2025-04-22 09:12:49.755738068 +0300 @@ -5,7 +5,7 @@ #pragma once @@ -123,8 +123,8 @@ #include "intel_npu/common/icompiled_model.hpp" #include "intel_npu/common/npu.hpp" ---- a/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_init.hpp 2025-01-30 17:11:23.387863315 +0000 -+++ b/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_init.hpp 2025-01-30 17:12:15.351004206 +0000 +--- a/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_init.hpp 2025-04-22 08:54:18.123636777 +0300 ++++ b/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_init.hpp 2025-04-22 08:54:44.392999512 +0300 @@ -5,9 +5,9 @@ #pragma once @@ -138,8 +138,8 @@ #include ---- a/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrappers.hpp 2025-01-30 17:15:30.489090023 +0000 -+++ b/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrappers.hpp 2025-01-30 17:15:49.345658116 +0000 +--- a/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrappers.hpp 2025-04-22 09:15:19.821223694 +0300 ++++ b/src/plugins/intel_npu/src/compiler_adapter/include/ze_graph_ext_wrappers.hpp 2025-04-22 09:15:30.186617303 +0300 @@ -5,7 +5,7 @@ #pragma once @@ -149,8 +149,8 @@ #include #include ---- a/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_types.hpp 2025-01-30 17:17:34.037203346 +0000 -+++ b/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_types.hpp 2025-01-30 17:18:09.895394136 +0000 +--- a/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_types.hpp 2025-04-22 09:16:54.687791603 +0300 ++++ b/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_types.hpp 2025-04-22 09:17:15.958572870 +0300 @@ -5,9 +5,9 @@ #pragma once @@ -164,8 +164,8 @@ #include ---- a/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_utils.hpp 2025-01-30 17:19:01.314989832 +0000 -+++ b/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_utils.hpp 2025-01-30 17:19:17.921341207 +0000 +--- a/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_utils.hpp 2025-04-22 09:18:29.594493912 +0300 ++++ b/src/plugins/intel_npu/src/utils/include/intel_npu/utils/zero/zero_utils.hpp 2025-04-22 09:18:42.216166698 +0300 @@ -6,7 +6,7 @@ #include @@ -175,8 +175,8 @@ #include "intel_npu/utils/logger/logger.hpp" #include "intel_npu/utils/zero/zero_api.hpp" ---- a/src/plugins/intel_npu/src/compiler_adapter/include/plugin_graph.hpp 2025-01-30 17:20:31.103798946 +0000 -+++ b/src/plugins/intel_npu/src/compiler_adapter/include/plugin_graph.hpp 2025-01-30 17:21:08.007054462 +0000 +--- a/src/plugins/intel_npu/src/compiler_adapter/include/plugin_graph.hpp 2025-04-22 09:23:42.150544550 +0300 ++++ b/src/plugins/intel_npu/src/compiler_adapter/include/plugin_graph.hpp 2025-04-22 09:24:26.961320914 +0300 @@ -6,7 +6,7 @@ #pragma once @@ -186,8 +186,8 @@ #include "intel_npu/common/igraph.hpp" #include "intel_npu/icompiler.hpp" ---- a/src/plugins/intel_npu/src/compiler_adapter/include/driver_graph.hpp 2025-01-30 17:24:21.716872348 +0000 -+++ b/src/plugins/intel_npu/src/compiler_adapter/include/driver_graph.hpp 2025-01-30 17:24:43.017813607 +0000 +--- a/src/plugins/intel_npu/src/compiler_adapter/include/driver_graph.hpp 2025-04-22 09:26:36.769713083 +0300 ++++ b/src/plugins/intel_npu/src/compiler_adapter/include/driver_graph.hpp 2025-04-22 09:27:38.382076030 +0300 @@ -6,7 +6,7 @@ #pragma once @@ -197,12 +197,12 @@ #include "intel_npu/common/igraph.hpp" #include "intel_npu/utils/zero/zero_init.hpp" ---- a/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp 2025-03-04 11:24:17.123534980 +0200 -+++ a/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp 2025-03-04 11:24:32.852289727 +0200 -@@ -5,7 +5,7 @@ +--- a/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp 2025-04-22 09:28:33.202081565 +0300 ++++ b/src/plugins/intel_npu/src/utils/src/zero/zero_init.cpp 2025-04-22 09:31:04.864198534 +0300 +@@ -4,7 +4,7 @@ + #include "intel_npu/utils/zero/zero_init.hpp" - #include -#include +#include "ze_command_queue_npu_ext.h" diff --git a/onednn-minimum-cmake-version.patch b/onednn-minimum-cmake-version.patch deleted file mode 100644 index 7d6dd4a..0000000 --- a/onednn-minimum-cmake-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur a/src/plugins/intel_cpu/thirdparty/onednn/CMakeLists.txt b/src/plugins/intel_cpu/thirdparty/onednn/CMakeLists.txt ---- a/src/plugins/intel_cpu/thirdparty/onednn/CMakeLists.txt 2024-10-24 07:23:20.000000000 -0400 -+++ b/src/plugins/intel_cpu/thirdparty/onednn/CMakeLists.txt 2024-10-24 07:23:20.000000000 -0400 -@@ -14,7 +14,7 @@ - # limitations under the License. - #=============================================================================== - --cmake_minimum_required(VERSION 2.8.12) -+cmake_minimum_required(VERSION 2.8.12...3.5) - - if(POLICY CMP0022) - cmake_policy(SET CMP0022 NEW) diff --git a/onnx-frontend-enable.patch b/onnx-frontend-enable.patch deleted file mode 100644 index 3d8ea0d..0000000 --- a/onnx-frontend-enable.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -ur a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake ---- a/cmake/developer_package/frontends/frontends.cmake 2024-11-09 01:14:37.000000000 -0500 -+++ b/cmake/developer_package/frontends/frontends.cmake 2024-11-09 01:14:37.000000000 -0500 -@@ -246,7 +246,7 @@ - set(protobuf_target_name libprotobuf-lite) - set(protobuf_install_name "protobuf_lite_installed") - else() -- set(protobuf_target_name libprotobuf) -+ set(protobuf_target_name protobuf) - set(protobuf_install_name "protobuf_installed") - endif() - if(ENABLE_SYSTEM_PROTOBUF) -diff -ur a/src/frontends/common/CMakeLists.txt b/src/frontends/common/CMakeLists.txt ---- a/src/frontends/common/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 -+++ b/src/frontends/common/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 -@@ -83,6 +83,6 @@ - ${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL}) - - # Shutdown protobuf library --if(Protobuf_IN_FRONTEND AND BUILD_SHARED_LIBS) -+if(BUILD_SHARED_LIBS) - add_subdirectory(shutdown_protobuf) - endif() -diff -ur a/src/frontends/common/shutdown_protobuf/CMakeLists.txt b/src/frontends/common/shutdown_protobuf/CMakeLists.txt ---- a/src/frontends/common/shutdown_protobuf/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 -+++ b/src/frontends/common/shutdown_protobuf/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 -@@ -9,7 +9,7 @@ - add_library(openvino::protobuf_shutdown ALIAS ${TARGET_NAME}) - set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME protobuf_shutdown) - --target_include_directories(${TARGET_NAME} SYSTEM PRIVATE -- $>) --set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) --target_compile_features(${TARGET_NAME} PRIVATE $) -+#target_include_directories(${TARGET_NAME} SYSTEM PRIVATE -+# $>) -+#set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO}) -+#target_compile_features(${TARGET_NAME} PRIVATE $) -diff -ur a/src/frontends/onnx/CMakeLists.txt b/src/frontends/onnx/CMakeLists.txt ---- a/src/frontends/onnx/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 -+++ b/src/frontends/onnx/CMakeLists.txt 2024-11-09 01:14:37.000000000 -0500 -@@ -2,6 +2,11 @@ - # SPDX-License-Identifier: Apache-2.0 - # - -+# TODO: Replace these with including the defs from ONNX's CMake files -+add_definitions(-DONNX_NAMESPACE=onnx -DONNX_ML=1) -+# TODO: The ONNX frontend uses functions only available in -std=c++17 -+add_compile_options(-std=c++17) -+ - add_subdirectory(onnx_common) - add_subdirectory(frontend) - diff --git a/openvino.spec b/openvino.spec index f9cd357..a029835 100644 --- a/openvino.spec +++ b/openvino.spec @@ -1,4 +1,4 @@ -%define so_ver 2500 +%define so_ver 2510 %global desc %{expand: \ OpenVINO is an open-source toolkit for optimizing and deploying deep learning models from cloud to edge. It accelerates deep learning inference across @@ -6,7 +6,7 @@ various use cases, such as generative AI, video, audio, and language with models from popular frameworks like PyTorch, TensorFlow, ONNX, and more.} Name: openvino -Version: 2025.0.0 +Version: 2025.1.0 Release: %autorelease Summary: Toolkit for optimizing and deploying AI inference @@ -40,30 +40,33 @@ Summary: Toolkit for optimizing and deploying AI inference License: Apache-2.0 AND MIT AND BSL-1.0 AND HPND AND BSD-3-Clause AND (GPL-2.0-only OR BSD-3-Clause) URL: https://github.com/openvinotoolkit/openvino Source0: %url/archive/%{version}/%{name}-%{version}.tar.gz -Source1: https://github.com/openvinotoolkit/oneDNN/archive/1789b1e0ae441de15d793123003a900a35d1dc71/onednn-1789b1e.tar.gz +Source1: https://github.com/openvinotoolkit/oneDNN/archive/5baba714e16e11309774a62783f363cad30e97c7/onednn-5baba71.tar.gz Source2: https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94/mlas-d1bc25e.tar.gz -Source3: https://github.com/intel/level-zero-npu-extensions/archive/110f48ee8eda22d8b40daeeecdbbed0fc3b08f8b/level-zero-npu-extensions-110f48e.tar.gz +Source3: https://github.com/intel/level-zero-npu-extensions/archive/c0156a3390ae39671ff8f2a6f5471f04bb65bb12/level-zero-npu-extensions-c0156a3.tar.gz Source4: dependencies.cmake Source5: pyproject.toml Patch0: openvino-fedora.patch Patch1: npu-level-zero.patch -Patch2: onnx-frontend-enable.patch -# Fix the oneDNN build on CMake 4.0.0 and later -Patch3: onednn-minimum-cmake-version.patch ExclusiveArch: x86_64 BuildRequires: cmake +BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: gflags-devel +BuildRequires: glibc-devel +BuildRequires: json-devel BuildRequires: oneapi-level-zero-devel +BuildRequires: openblas-devel BuildRequires: patchelf BuildRequires: pugixml-devel BuildRequires: pybind11-devel BuildRequires: python3-devel +BuildRequires: python3-onnx BuildRequires: python3-pip BuildRequires: python3-setuptools +BuildRequires: python3-pytest BuildRequires: python3-wheel BuildRequires: numpy BuildRequires: zlib-ng-compat-devel @@ -187,9 +190,12 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr %build %cmake \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_POLICY_VERSION_MINIMUM="3.5.0" \ -DCMAKE_CXX_FLAGS="%{optflags} -Wformat -Wformat-security" \ - -DENABLE_CLANG_FORMAT=OFF \ -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ + -DENABLE_CLANG_FORMAT=OFF \ + -DENABLE_PRECOMPILED_HEADERS=OFF \ + -DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON \ -DENABLE_QSPECTRE=OFF \ -DENABLE_INTEGRITYCHECK=OFF \ -DENABLE_SANITIZER=OFF \ @@ -236,7 +242,10 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_SYSTEM_LIBS_DEFAULT=ON \ -DENABLE_SYSTEM_OPENCL=ON \ -DENABLE_SYSTEM_PUGIXML=ON \ - -DENABLE_SYSTEM_PROTOBUF=OFF \ + -DENABLE_SYSTEM_PROTOBUF=ON \ + -DProtobuf_LIBRARIES=%{_libdir} \ + -DProtobuf_INCLUDE_DIRS=%{_includedir} \ + -DProtobuf_USE_STATIC_LIBS=OFF \ -DTHREADING=TBB \ -DENABLE_SYSTEM_TBB=ON \ -DTBB_LIB_INSTALL_DIR=%{_libdir} \ @@ -245,6 +254,7 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_SAMPLES=OFF \ -DENABLE_TESTS=OFF \ -DBUILD_SHARED_LIBS=ON \ + -DBLAS_LIBRARIES=%{_libdir} \ %cmake_build %install @@ -259,6 +269,8 @@ mkdir -p -m 755 %{buildroot}%{_datadir}/%{name} %check LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}%{python3_sitearch} %{python3} samples/python/hello_query_device/hello_query_device.py LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}%{python3_sitearch} %{python3} samples/python/model_creation_sample/model_creation_sample.py samples/python/model_creation_sample/lenet.bin CPU +# onnx-tests +LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}%{python3_sitearch}:src/frontends/onnx %pytest -v src/frontends/onnx/tests/tests_python/test_frontend_onnx* %files %license LICENSE diff --git a/pyproject.toml b/pyproject.toml index 4f0e329..7e18195 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openvino" -version = "2025.0.0" +version = "2025.1.0" dependencies = [ "numpy>1.16.6", "packaging", diff --git a/sources b/sources index bd59e8c..4d1b416 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -SHA512 (openvino-2025.0.0.tar.gz) = a40636fbed5b306dc6eb26311ccd6298763a2ede28d8ccce75e6d99f13747d42d1bd9fede8fa225e23fd70f81fbb522ab5076edc08898ca33fc9ffa69b7c2e1a -SHA512 (onednn-1789b1e.tar.gz) = 32ef59542d8e2286b9b201dc94254f4b3b0c561446f05720e9ce7ce14a08fc40b331d765764d85f953cc3ca774b3e1c4f9a75b505aea285c3e18cae1a3c117cc +SHA512 (openvino-2025.1.0.tar.gz) = ae3432e9caf5df1ec292a029c3708a294447070fa02ef1be084264cdc1f21711d0ced8fdb198ea2597bb75f9742efcb4a978517e7bb4baa1bcd67d2c05395501 +SHA512 (onednn-5baba71.tar.gz) = 72f1a11623f8cabb2605eb734b891f36b16876ac7c940947807c4d574c7e6031dd064de5ebc7d2042c02989c1f38b55499d8c16d70a52d35dfbe74047d0ea3ce SHA512 (mlas-d1bc25e.tar.gz) = 8d6dd319924135b7b22940d623305bf200b812ae64cde79000709de4fad429fbd43794301ef16e6f10ed7132777b7a73e9f30ecae7c030aea80d57d7c0ce4500 -SHA512 (level-zero-npu-extensions-110f48e.tar.gz) = aaaeecad6c00489b652cd94d63ed0c1e59eb0eaed8b463198b40f1af3944004b072808ccc3074b71d825e9f0f37bf76fedf296961bb18959ef66a699b71fec41 +SHA512 (level-zero-npu-extensions-c0156a3.tar.gz) = 33ebdaec13dd05d6cf51e79f0e91a3c68621c428061423e243eb998c9ebe123ee90f6b4edc749d7fa2206c729058afff945177e8c90a05d36220f076e067c22c From 8f00146cbfca345a6382786b72dc10de34cfb3cb Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Fri, 25 Apr 2025 20:28:23 +0300 Subject: [PATCH 12/22] enable all frontend plugins --- openvino.spec | 62 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 57 insertions(+), 5 deletions(-) diff --git a/openvino.spec b/openvino.spec index a029835..14d0304 100644 --- a/openvino.spec +++ b/openvino.spec @@ -54,6 +54,8 @@ ExclusiveArch: x86_64 BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ +BuildRequires: flatbuffers-compiler +BuildRequires: flatbuffers-devel BuildRequires: gflags-devel BuildRequires: glibc-devel BuildRequires: json-devel @@ -68,6 +70,7 @@ BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-pytest BuildRequires: python3-wheel +BuildRequires: snappy-devel BuildRequires: numpy BuildRequires: zlib-ng-compat-devel BuildRequires: xbyak-devel @@ -87,6 +90,9 @@ Provides: bundled(level-zero-npu-extensions) Requires: lib%{name}-ir-frontend = %{version} Requires: lib%{name}-pytorch-frontend = %{version} Requires: lib%{name}-onnx-frontend = %{version} +Requires: lib%{name}-paddle-frontend = %{version} +Requires: lib%{name}-tensorflow-frontend = %{version} +Requires: lib%{name}-tensorflow-lite-frontend = %{version} Requires: numpy Recommends: %{name}-plugins = %{version} @@ -107,7 +113,8 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins The OpenVINO plugins package provides support for various hardware devices. -It includes plugins for auto, auto_batch, hetero, intel_cpu and template. +It includes auto, auto_batch, hetero, intel_cpu, intel_npu, intel_gpu and +template plugins. %package -n lib%{name}-ir-frontend Summary: OpenVINO IR Frontend @@ -134,6 +141,34 @@ Requires: %{name}%{?_isa} = %{version}-%{release} The main responsibility of the ONNX Frontend is to import ONNX models and convert them into the ov::Model representation. +%package -n lib%{name}-paddle-frontend +Summary: OpenVINO Paddle Frontend +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n lib%{name}-paddle-frontend +OpenVINO Paddle Frontend is responsible for reading and converting +a PaddlePaddle model and operators and maps them semantically to +the OpenVINO opset. + +%package -n lib%{name}-tensorflow-frontend +Summary: OpenVINO Tensorflow Frontend +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n lib%{name}-tensorflow-frontend +OpenVINO TensorFlow Frontend is responsible for reading and converting +a TensorFlow model to an ov::Model object that further can be serialized into +the Intermediate Representation (IR) format. + +%package -n lib%{name}-tensorflow-lite-frontend +Summary: OpenVINO Tensorflow-lite Frontend +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description -n lib%{name}-tensorflow-lite-frontend +OpenVINO TensorFlow Lite Frontend is responsible for reading and converting +a TensorFlow model to an ov::Model object that further can be serialized into +the Intermediate Representation (IR) format with lower latency and smaller +binary size on mobile and edge devices. + %package -n python3-%{name} Summary: OpenVINO Python API Requires: %{name}%{?_isa} = %{version}-%{release} @@ -229,12 +264,12 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_PROXY=ON \ -DENABLE_TEMPLATE=ON \ -DENABLE_OV_ONNX_FRONTEND=ON \ - -DENABLE_OV_PADDLE_FRONTEND=OFF \ - -DENABLE_OV_JAX_FRONTEND=OFF \ + -DENABLE_OV_PADDLE_FRONTEND=ON \ + -DENABLE_OV_JAX_FRONTEND=ON \ -DENABLE_OV_IR_FRONTEND=ON \ -DENABLE_OV_PYTORCH_FRONTEND=ON \ - -DENABLE_OV_TF_FRONTEND=OFF \ - -DENABLE_OV_TF_LITE_FRONTEND=OFF \ + -DENABLE_OV_TF_FRONTEND=ON \ + -DENABLE_OV_TF_LITE_FRONTEND=ON \ -DENABLE_PYTHON=ON \ -DPython3_EXECUTABLE=%{python3} \ -DENABLE_WHEEL=OFF \ @@ -242,6 +277,8 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_SYSTEM_LIBS_DEFAULT=ON \ -DENABLE_SYSTEM_OPENCL=ON \ -DENABLE_SYSTEM_PUGIXML=ON \ + -DENABLE_SYSTEM_FLATBUFFERS=ON \ + -DENABLE_SYSTEM_SNAPPY=ON \ -DENABLE_SYSTEM_PROTOBUF=ON \ -DProtobuf_LIBRARIES=%{_libdir} \ -DProtobuf_INCLUDE_DIRS=%{_includedir} \ @@ -286,6 +323,9 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}% %{_libdir}/lib%{name}_c.so %{_libdir}/lib%{name}_pytorch_frontend.so %{_libdir}/lib%{name}_onnx_frontend.so +%{_libdir}/lib%{name}_paddle_frontend.so +%{_libdir}/lib%{name}_tensorflow_frontend.so +%{_libdir}/lib%{name}_tensorflow_lite_frontend.so %{_libdir}/cmake/openvino-%{version} %{_libdir}/pkgconfig/%{name}.pc @@ -314,6 +354,18 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}% %{_libdir}/lib%{name}_onnx_frontend.so.%{version} %{_libdir}/lib%{name}_onnx_frontend.so.%{so_ver} +%files -n lib%{name}-paddle-frontend +%{_libdir}/lib%{name}_paddle_frontend.so.%{version} +%{_libdir}/lib%{name}_paddle_frontend.so.%{so_ver} + +%files -n lib%{name}-tensorflow-frontend +%{_libdir}/lib%{name}_tensorflow_frontend.so.%{version} +%{_libdir}/lib%{name}_tensorflow_frontend.so.%{so_ver} + +%files -n lib%{name}-tensorflow-lite-frontend +%{_libdir}/lib%{name}_tensorflow_lite_frontend.so.%{version} +%{_libdir}/lib%{name}_tensorflow_lite_frontend.so.%{so_ver} + %files -n python3-%{name} %{python3_sitearch}/%{name} %{python3_sitearch}/%{name}-%{version}.dist-info From efc8a975b437ba81db44a316cca6543487dc6920 Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Sat, 26 Apr 2025 07:43:15 +0300 Subject: [PATCH 13/22] disable JAX/Flax support --- openvino.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvino.spec b/openvino.spec index 14d0304..f6b6c1d 100644 --- a/openvino.spec +++ b/openvino.spec @@ -265,7 +265,7 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_TEMPLATE=ON \ -DENABLE_OV_ONNX_FRONTEND=ON \ -DENABLE_OV_PADDLE_FRONTEND=ON \ - -DENABLE_OV_JAX_FRONTEND=ON \ + -DENABLE_OV_JAX_FRONTEND=OFF \ -DENABLE_OV_IR_FRONTEND=ON \ -DENABLE_OV_PYTORCH_FRONTEND=ON \ -DENABLE_OV_TF_FRONTEND=ON \ From a254034cf07626c3e7c8529afe99142847c11e54 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 17 Jun 2025 21:48:51 +0200 Subject: [PATCH 14/22] Rebuilt for Python 3.14 From 2667aa0dba2514b94fa1de80adf9b9044a02eb3a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 23:42:06 +0000 Subject: [PATCH 15/22] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From daafae612c1bebbae339ed77787d4c4e9fd2cc7d Mon Sep 17 00:00:00 2001 From: "Alexander F. Lent" Date: Wed, 23 Jul 2025 03:03:18 -0400 Subject: [PATCH 16/22] Remove upper version bound on numpy (fixes RHBZ#2374828) --- openvino.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/openvino.spec b/openvino.spec index f6b6c1d..df20931 100644 --- a/openvino.spec +++ b/openvino.spec @@ -204,6 +204,7 @@ sed -i -e 's|CACHE_JSON_INSTALL_DIR ${OV_CPACK_PLUGINSDIR}|CACHE_JSON_INSTALL_DI # python:prep sed -i '/openvino-telemetry/d' src/bindings/python/requirements.txt +sed -i 's/numpy>=1.16.6,<2.3.0/numpy>=1.16.6/' src/bindings/python/requirements.txt cp %{SOURCE5} src/bindings/python # gcc 15 include cstdint From 01874485911f2ad207aa45b03a7205e5a477f8cb Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 13:04:29 +0200 Subject: [PATCH 17/22] Rebuilt for Python 3.14.0rc2 bytecode From 04123d9530f9b34f18434c31f0bbc1507e0caac3 Mon Sep 17 00:00:00 2001 From: Ali Erdinc Koroglu Date: Sun, 17 Aug 2025 17:04:38 +0300 Subject: [PATCH 18/22] enable intel-npu-compiler --- .gitignore | 5 + npu-compiler-disable-git.patch | 22 ++++ npu-compiler-fix-install.patch | 47 +++++++ npu-compiler-thirdparty-CMakeLists.txt | 85 ++++++++++++ npu-compiler-vpux-driver-compiler.patch | 27 ++++ openvino.spec | 163 ++++++++++++++++++------ sources | 5 + 7 files changed, 316 insertions(+), 38 deletions(-) create mode 100644 npu-compiler-disable-git.patch create mode 100644 npu-compiler-fix-install.patch create mode 100644 npu-compiler-thirdparty-CMakeLists.txt create mode 100644 npu-compiler-vpux-driver-compiler.patch diff --git a/.gitignore b/.gitignore index 5e0eb53..ccbcc46 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,8 @@ /mlas-*.tar.gz /onednn-*.tar.gz /level-zero-npu-extensions-*.tar.gz +/npu_compiler-*.tar.gz +/npu_plugin_elf-*.tar.gz +/npu-plugin-llvm-*.tar.gz +/npu-nn-cost-model-*.tar.gz +/flatbuffers-*.tar.gz diff --git a/npu-compiler-disable-git.patch b/npu-compiler-disable-git.patch new file mode 100644 index 0000000..8f7a57d --- /dev/null +++ b/npu-compiler-disable-git.patch @@ -0,0 +1,22 @@ +--- a/cmake/flatbuffers.cmake 2025-04-10 09:12:29.077773814 +0300 ++++ b/cmake/flatbuffers.cmake 2025-04-10 09:12:57.012364853 +0300 +@@ -64,7 +64,7 @@ + + endfunction() + +-find_package(Git REQUIRED) ++#find_package(Git REQUIRED) + function(vpux_gf_version_generate SRC_DIR DST_DIR) + + execute_process( +--- a/src/vpux_compiler/CMakeLists.txt 2025-04-08 21:10:11.545626446 +0300 ++++ b/src/vpux_compiler/CMakeLists.txt 2025-04-08 21:10:52.600509266 +0300 +@@ -51,7 +51,7 @@ + # Embed VPUNN models + # + +-find_package(Git REQUIRED) ++#find_package(Git REQUIRED) + + execute_process( + COMMAND ${GIT_EXECUTABLE} lfs pull diff --git a/npu-compiler-fix-install.patch b/npu-compiler-fix-install.patch new file mode 100644 index 0000000..472393a --- /dev/null +++ b/npu-compiler-fix-install.patch @@ -0,0 +1,47 @@ +--- a/src/vpux_driver_compiler/CMakeLists.txt ++++ b/src/vpux_driver_compiler/CMakeLists.txt +@@ -16,7 +16,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) + add_subdirectory(src) + add_subdirectory(test) + +-install( ++#[[install( + FILES + "${InferenceEngineVPUXPlugin_SOURCE_DIR}/src/vpux_driver_compiler/CHANGES.txt" + DESTINATION cid +@@ -26,4 +26,4 @@ install( + FILES + "${InferenceEngineVPUXPlugin_SOURCE_DIR}/src/vpux_driver_compiler/README.md" + DESTINATION cid +- COMPONENT ${CID_COMPONENT}) ++ COMPONENT ${CID_COMPONENT})]] +--- a/src/vpux_driver_compiler/src/loader/CMakeLists.txt ++++ b/src/vpux_driver_compiler/src/loader/CMakeLists.txt +@@ -75,7 +75,7 @@ ov_add_api_validator_post_build_step(TARGET ${TARGET_NAME}) + # loader folder | -> include/ | -> vpux_headers/ -> 1 hpp + # | | -> vpux_loader/ -> 1 hpp + +-install(DIRECTORY "${LOADER_DIR_INC}/vpux_headers" ++#[[install(DIRECTORY "${LOADER_DIR_INC}/vpux_headers" + DESTINATION cid/vpux_elf/loader/include/ + COMPONENT ${CID_COMPONENT}) + +@@ -207,4 +207,4 @@ install(TARGETS npu_elf + CONFIGURATIONS RelWithDebInfo + LIBRARY DESTINATION cid/vpux_elf/lib/RelWithDebInfo COMPONENT ${CID_COMPONENT} + ARCHIVE DESTINATION cid/vpux_elf/lib/RelWithDebInfo COMPONENT ${CID_COMPONENT} +- RUNTIME DESTINATION cid/vpux_elf/lib/RelWithDebInfo COMPONENT ${CID_COMPONENT}) ++ RUNTIME DESTINATION cid/vpux_elf/lib/RelWithDebInfo COMPONENT ${CID_COMPONENT})]] +--- a/src/vpux_compiler/CMakeLists.txt 2025-05-05 19:36:13.333749375 +0300 ++++ b/src/vpux_compiler/CMakeLists.txt 2025-05-05 19:37:04.718216709 +0300 +@@ -241,8 +241,8 @@ + + # Note not included in OpenVINOTargets export! + +-if(BUILD_SHARED_LIBS) ++#[[if(BUILD_SHARED_LIBS) + install(TARGETS ${TARGET_NAME} + ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${VPUX_INTERNAL_COMPONENT} + LIBRARY DESTINATION ${OV_CPACK_RUNTIMEDIR} COMPONENT ${VPUX_INTERNAL_COMPONENT}) +-endif() ++endif()]] diff --git a/npu-compiler-thirdparty-CMakeLists.txt b/npu-compiler-thirdparty-CMakeLists.txt new file mode 100644 index 0000000..ac751b7 --- /dev/null +++ b/npu-compiler-thirdparty-CMakeLists.txt @@ -0,0 +1,85 @@ +# +# Copyright (C) 2022 Intel Corporation. +# SPDX-License-Identifier: Apache 2.0 +# + +set(BUILD_SHARED_LIBS OFF) + +# +# LLVM/MLIR +# +if(NOT ENABLE_PREBUILT_LLVM_MLIR_LIBS) + set_llvm_flags() + add_subdirectory(llvm-project/llvm EXCLUDE_FROM_ALL) + set(MLIR_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/llvm-project/mlir/include") + set(MLIR_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/llvm-project/llvm/tools/mlir/include") + include_directories(SYSTEM ${MLIR_SOURCE_DIR} ${MLIR_BINARY_DIR}) +endif() + +# +# flatbuffers +# + +if(CMAKE_SOURCE_DIR STREQUAL OpenVINO_SOURCE_DIR AND + ENABLE_OV_TF_LITE_FRONTEND AND (NOT ENABLE_SYSTEM_FLATBUFFERS OR NOT Flatbuffers_FOUND)) + # we are building NPU plugin via -DOPENVINO_EXTRA_MODULES + # and flatbuffers is already built as part of OpenVINO in case of + # building in a single tree +else() + set(FLATBUFFERS_BUILD_TESTS OFF CACHE BOOL "" FORCE) + set(FLATBUFFERS_INSTALL OFF CACHE BOOL "" FORCE) + set(FLATBUFFERS_BUILD_FLATC ON CACHE BOOL "" FORCE) + + add_subdirectory(flatbuffers EXCLUDE_FROM_ALL) + + # FIXME: this flag is forced while building in a single tree with OV + # but code cannot be compiled with the flag + if(NOT MSVC) + target_compile_options(flatbuffers PRIVATE -Wno-suggest-override) + target_compile_options(flatc PRIVATE -Wno-suggest-override) + if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13)) + target_compile_options(flatbuffers PRIVATE -Wno-unused-but-set-variable) + target_compile_options(flatc PRIVATE -Wno-unused-but-set-variable) + endif() + endif() + + vpux_add_native_tool(flatc "${CMAKE_CURRENT_SOURCE_DIR}/flatbuffers" + CMAKE_ARGS + "FLATBUFFERS_BUILD_TESTS:BOOL=OFF" + "FLATBUFFERS_INSTALL:BOOL=OFF" + "FLATBUFFERS_BUILD_FLATC:BOOL=ON" + ) +endif() + +# +# npu_elf +# + +if (ENABLE_NPU_MONO) + if (NOT TARGET npu_elf) + message(FATAL_ERROR "elf/vpux_elf target must exist since ENABLE_NPU_MONO is ON") + endif() + # TODO remove: + # `src/vpux_compiler/include/vpux/compiler/dialect/NPUReg37XX/api` + # `src/vpux_compiler/include/vpux/compiler/NPU40XX/dialect/NPUReg40XX/api` + # after integration finishes +else() + # Legacy no-monorepo scenario + add_subdirectory(elf/vpux_elf EXCLUDE_FROM_ALL) + target_include_directories(npu_elf PRIVATE + "${IE_MAIN_VPUX_PLUGIN_SOURCE_DIR}/src/vpux_compiler/include/vpux/compiler/NPU37XX/dialect/NPUReg37XX/firmware_headers/details" + "${IE_MAIN_VPUX_PLUGIN_SOURCE_DIR}/src/vpux_compiler/include/vpux/compiler/NPU40XX/dialect/NPUReg40XX/firmware_headers/details") + + target_include_directories(vpux_elf PRIVATE + "${IE_MAIN_VPUX_PLUGIN_SOURCE_DIR}/src/vpux_compiler/include/vpux/compiler/NPU37XX/dialect/NPUReg37XX/firmware_headers/details" + "${IE_MAIN_VPUX_PLUGIN_SOURCE_DIR}/src/vpux_compiler/include/vpux/compiler/NPU40XX/dialect/NPUReg40XX/firmware_headers/details") +endif() + +# +# nn cost model +# + +set(VPUNN_BUILD_SHARED_LIB OFF CACHE BOOL "" FORCE) +set(VPUNN_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) +set(VPUNN_BUILD_TESTS OFF CACHE BOOL "" FORCE) +add_subdirectory(vpucostmodel EXCLUDE_FROM_ALL) diff --git a/npu-compiler-vpux-driver-compiler.patch b/npu-compiler-vpux-driver-compiler.patch new file mode 100644 index 0000000..6781d08 --- /dev/null +++ b/npu-compiler-vpux-driver-compiler.patch @@ -0,0 +1,27 @@ +--- a/src/vpux_driver_compiler/src/vpux_compiler_l0/CMakeLists.txt 2025-04-14 23:36:56.812899341 -0700 ++++ b/src/vpux_driver_compiler/src/vpux_compiler_l0/CMakeLists.txt 2025-04-16 09:58:44.751662645 -0700 +@@ -80,12 +85,12 @@ + COMPONENT ${CID_COMPONENT}) + else() + install(TARGETS ${TARGET_NAME} +- LIBRARY DESTINATION cid/lib ++ LIBRARY DESTINATION lib64 + COMPONENT ${CID_COMPONENT}) + endif() + + install( + FILES + "${InferenceEngineVPUXPlugin_SOURCE_DIR}/src/vpux_driver_compiler/include/npu_driver_compiler.h" +- DESTINATION cid ++ DESTINATION include + COMPONENT ${CID_COMPONENT}) +--- a/src/vpux_driver_compiler/CMakeLists.txt 2025-04-14 21:03:09.221779635 -0700 ++++ b/src/vpux_driver_compiler/CMakeLists.txt 2025-04-14 23:36:46.771479407 -0700 +@@ -12,6 +12,7 @@ + ov_cpack_add_component(${CID_COMPONENT}) + + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) ++include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../vpux_compiler/include) + + add_subdirectory(src) + add_subdirectory(test) diff --git a/openvino.spec b/openvino.spec index df20931..314c31c 100644 --- a/openvino.spec +++ b/openvino.spec @@ -1,4 +1,4 @@ -%define so_ver 2510 +%global so_ver 2510 %global desc %{expand: \ OpenVINO is an open-source toolkit for optimizing and deploying deep learning models from cloud to edge. It accelerates deep learning inference across @@ -40,38 +40,54 @@ Summary: Toolkit for optimizing and deploying AI inference License: Apache-2.0 AND MIT AND BSL-1.0 AND HPND AND BSD-3-Clause AND (GPL-2.0-only OR BSD-3-Clause) URL: https://github.com/openvinotoolkit/openvino Source0: %url/archive/%{version}/%{name}-%{version}.tar.gz -Source1: https://github.com/openvinotoolkit/oneDNN/archive/5baba714e16e11309774a62783f363cad30e97c7/onednn-5baba71.tar.gz -Source2: https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94/mlas-d1bc25e.tar.gz -Source3: https://github.com/intel/level-zero-npu-extensions/archive/c0156a3390ae39671ff8f2a6f5471f04bb65bb12/level-zero-npu-extensions-c0156a3.tar.gz -Source4: dependencies.cmake -Source5: pyproject.toml +Source1: dependencies.cmake +Source2: pyproject.toml +Source3: https://github.com/openvinotoolkit/oneDNN/archive/5baba714e16e11309774a62783f363cad30e97c7/onednn-5baba71.tar.gz +Source4: https://github.com/openvinotoolkit/mlas/archive/d1bc25ec4660cddd87804fcf03b2411b5dfb2e94/mlas-d1bc25e.tar.gz +Source5: https://github.com/intel/level-zero-npu-extensions/archive/c0156a3390ae39671ff8f2a6f5471f04bb65bb12/level-zero-npu-extensions-c0156a3.tar.gz +Source6: https://github.com/openvinotoolkit/npu_compiler/archive/npu_ud_2025_12_rc2/npu_compiler-npu_ud_2025_12_rc2.tar.gz +Source7: npu-compiler-thirdparty-CMakeLists.txt +Source8: https://github.com/openvinotoolkit/npu_plugin_elf/archive/ce501d3059c81fd6bd0ad7165ab823838fa5d851/npu_plugin_elf-ce501d3.tar.gz +Source9: https://github.com/intel/npu-nn-cost-model/archive/a965531d3d3a37748cc5ab7feac342b35baaf7b4/npu-nn-cost-model-a965531.tar.gz +Source10: https://github.com/intel/npu-plugin-llvm/arhcive/0d1145010d6d2ba48a945c824ed0ca03254b94ed/npu-plugin-llvm-0d11450.tar.gz +Source11: https://github.com/google/flatbuffers/archive/6df40a2471737b27271bdd9b900ab5f3aec746c7/flatbuffers-6df40a2.tar.gz Patch0: openvino-fedora.patch Patch1: npu-level-zero.patch +Patch2: npu-compiler-disable-git.patch +Patch3: npu-compiler-fix-install.patch +Patch4: npu-compiler-vpux-driver-compiler.patch ExclusiveArch: x86_64 BuildRequires: cmake +%if 0%{?fedora} >= 42 || 0%{?rhel} > 10 +BuildRequires: gcc14 +BuildRequires: gcc14-c++ +%else BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: flatbuffers-compiler -BuildRequires: flatbuffers-devel +%endif BuildRequires: gflags-devel BuildRequires: glibc-devel +BuildRequires: flatbuffers-compiler +BuildRequires: flatbuffers-devel BuildRequires: json-devel +BuildRequires: libedit-devel +BuildRequires: libffi-devel +BuildRequires: libxml2-devel BuildRequires: oneapi-level-zero-devel -BuildRequires: openblas-devel BuildRequires: patchelf BuildRequires: pugixml-devel BuildRequires: pybind11-devel BuildRequires: python3-devel BuildRequires: python3-onnx BuildRequires: python3-pip +BuildRequires: python3-numpy BuildRequires: python3-setuptools BuildRequires: python3-pytest BuildRequires: python3-wheel BuildRequires: snappy-devel -BuildRequires: numpy BuildRequires: zlib-ng-compat-devel BuildRequires: xbyak-devel BuildRequires: yaml-cpp-devel @@ -81,19 +97,12 @@ BuildRequires: protobuf-devel BuildRequires: opencv-devel BuildRequires: OpenCL-ICD-Loader-devel BuildRequires: opencl-headers -# forked version of OpenVINO oneDNN does not have a proper version -Provides: bundled(onednn) -# MLAS upstream does not have any release -Provides: bundled(mlas) -# level-zero-npu-extensions upstream does not have any release -Provides: bundled(level-zero-npu-extensions) Requires: lib%{name}-ir-frontend = %{version} Requires: lib%{name}-pytorch-frontend = %{version} Requires: lib%{name}-onnx-frontend = %{version} Requires: lib%{name}-paddle-frontend = %{version} Requires: lib%{name}-tensorflow-frontend = %{version} Requires: lib%{name}-tensorflow-lite-frontend = %{version} -Requires: numpy Recommends: %{name}-plugins = %{version} %description @@ -109,7 +118,14 @@ applications that use %{name}. %package plugins Summary: OpenVINO Plugins +# forked version of OpenVINO oneDNN does not have a proper version +Provides: bundled(onednn) +# Intel MLAS +Provides: bundled(mlas) +# Intel level-zero-npu-extensions +Provides: bundled(level-zero-npu-extensions) Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python3-opencv %description plugins The OpenVINO plugins package provides support for various hardware devices. @@ -127,6 +143,7 @@ into memory. %package -n lib%{name}-pytorch-frontend Summary: OpenVINO PyTorch Frontend Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python3-torch %description -n lib%{name}-pytorch-frontend The PyTorch Frontend is a C++ based OpenVINO Frontend component that is @@ -169,9 +186,31 @@ a TensorFlow model to an ov::Model object that further can be serialized into the Intermediate Representation (IR) format with lower latency and smaller binary size on mobile and edge devices. +%package -n intel-npu-compiler +Summary: OpenVINO NPU Compiler +# Intel npu-compiler +Provides: bundled(npu_compiler) +# intel VPUNN cost model +Provides: bundled(npu-nn-cost-model) +# Intel npu-plugin-elf +Provides: bundled(npu_plugin_elf) +# Intel npu-plugin-llvm +Provides: bundled(npu-plugin-llvm) +# Flatbuffer for npu_compiler +Provides: bundled(flatbuffers) +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: intel-npu-driver + +%description -n intel-npu-compiler +Intel NPU device is an AI inference accelerator integrated with Intel client +CPUs, starting from Intel Core Ultra generation of CPUs (formerly known as +Meteor Lake). It enables energy-efficient execution of artificial neural +network tasks.} + %package -n python3-%{name} Summary: OpenVINO Python API Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python3-numpy %description -n python3-%{name} OpenVINO Python API allowing users to use the OpenVINO library in their Python @@ -179,33 +218,32 @@ code. Python API provides bindings to basic and advanced APIs from OpenVINO runtime. %prep -# autosetup without patching, since we need to patch one of the bundled libraries %autosetup -N +%patch -P 0 -p1 # Remove the thirdparty deps rm -rf thirdparty/* -cp %{SOURCE4} thirdparty/ - -# Intel-cpu-plugin thirdparty deps -tar xf %{SOURCE1} -cp -r oneDNN-*/* src/plugins/intel_cpu/thirdparty/onednn -# autopatch will apply all the patches, now that we have unpacked enough of the bundled libraries -%autopatch -p1 -tar xf %{SOURCE2} -cp -r mlas-*/* src/plugins/intel_cpu/thirdparty/mlas - -# Intel-npu-plugin thirdparty deps -rm -rf src/plugins/intel_npu/thirdparty/yaml-cpp -tar xf %{SOURCE3} -cp -r level-*/* src/plugins/intel_npu/thirdparty/level-zero-ext - -# intel-gpu-plugin cache.json -sed -i -e 's|CACHE_JSON_INSTALL_DIR ${OV_CPACK_PLUGINSDIR}|CACHE_JSON_INSTALL_DIR %{_datadir}/%{name}|g' src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt +cp %{SOURCE1} thirdparty/ # python:prep sed -i '/openvino-telemetry/d' src/bindings/python/requirements.txt sed -i 's/numpy>=1.16.6,<2.3.0/numpy>=1.16.6/' src/bindings/python/requirements.txt -cp %{SOURCE5} src/bindings/python +cp %{SOURCE2} src/bindings/python + +# Intel-cpu-plugin thirdparty deps +tar xf %{SOURCE3} +cp -r oneDNN-*/* src/plugins/intel_cpu/thirdparty/onednn +tar xf %{SOURCE4} +cp -r mlas-*/* src/plugins/intel_cpu/thirdparty/mlas + +# Intel-npu-plugin thirdparty deps +rm -rf src/plugins/intel_npu/thirdparty/yaml-cpp +tar xf %{SOURCE5} +cp -r level-*/* src/plugins/intel_npu/thirdparty/level-zero-ext +%patch -P 1 -p1 + +# intel-gpu-plugin cache.json +sed -i -e 's|CACHE_JSON_INSTALL_DIR ${OV_CPACK_PLUGINSDIR}|CACHE_JSON_INSTALL_DIR %{_datadir}/%{name}|g' src/plugins/intel_gpu/src/kernel_selector/CMakeLists.txt # gcc 15 include cstdint sed -i '/#include .*/a#include ' src/core/include/openvino/core/type/bfloat16.hpp @@ -223,11 +261,43 @@ sed -i '/#include .*/a#include ' src/plugins/intel_cpu/src/util sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/protopipe/src/graph.hpp sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/protopipe/src/scenario/criterion.hpp +# Intel-npu-compiler +tar xf %{SOURCE6} -C thirdparty +rm -rf thirdparty/npu_compiler-npu_ud_2025_12_rc2/thirdparty/* +cp %{SOURCE7} thirdparty/npu_compiler-npu_ud_2025_12_rc2/thirdparty/CMakeLists.txt +%patch -d thirdparty/npu_compiler-npu_ud_2025_12_rc2 -P 2 -p1 +%patch -d thirdparty/npu_compiler-npu_ud_2025_12_rc2 -P 3 -p1 +%patch -d thirdparty/npu_compiler-npu_ud_2025_12_rc2 -P 4 -p1 +# ov::pass::KeepConstPrecision fix +sed -i -e 's|ov::pass::KeepConstsPrecision|ov::pass::KeepConstPrecision|g' thirdparty/npu_compiler-npu_ud_2025_12_rc2/src/vpux_compiler/src/frontend/IE.cpp +# disable test +sed -i '/^add_subdirectory(test)/s/^/#/' thirdparty/npu_compiler-npu_ud_2025_12_rc2/src/vpux_driver_compiler/CMakeLists.txt + +# Intel-npu-compiler thirdparty deps +tar xf %{SOURCE8} +mv npu_plugin_elf-* thirdparty/npu_compiler-npu_ud_2025_12_rc2/thirdparty/elf +tar xf %{SOURCE9} +mv npu-nn-cost-model-* thirdparty/npu_compiler-npu_ud_2025_12_rc2/thirdparty/vpucostmodel +tar xf %{SOURCE10} +mv npu-plugin-llvm-* thirdparty/npu_compiler-npu_ud_2025_12_rc2/thirdparty/llvm-project +# disable atomic builtins +sed -i '/^include(CheckAtomic)/s/^/#/' thirdparty/npu_compiler-npu_ud_2025_12_rc2/thirdparty/llvm-project/llvm/cmake/config-ix.cmake +# extract flatbuffers +tar xf %{SOURCE11} +mv flatbuffers-* thirdparty/npu_compiler-npu_ud_2025_12_rc2/thirdparty/flatbuffers + %build +export NPU_PLUGIN_HOME="$PWD/thirdparty/npu_compiler-npu_ud_2025_12_rc2" +export CFLAGS="${CFLAGS/-Werror=format-security/} -Wno-error=stringop-overflow -Wno-error=maybe-uninitialized -Wno-error=dangling-reference -Wno-error=template-id-cdtor" +export CXXFLAGS="${CXXFLAGS/-Werror=format-security/} -Wno-error=stringop-overflow -Wno-error=maybe-uninitialized -Wno-error=dangling-reference -Wno-error=template-id-cdtor" + %cmake \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_POLICY_VERSION_MINIMUM="3.5.0" \ - -DCMAKE_CXX_FLAGS="%{optflags} -Wformat -Wformat-security" \ +%if 0%{?fedora} >= 42 || 0%{?rhel} > 10 + -DCMAKE_C_COMPILER=gcc-14 \ + -DCMAKE_CXX_COMPILER=g++-14 \ +%endif -DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \ -DENABLE_CLANG_FORMAT=OFF \ -DENABLE_PRECOMPILED_HEADERS=OFF \ @@ -260,6 +330,9 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_SYSTEM_LEVEL_ZERO=ON \ -DENABLE_INTEL_NPU=ON \ -DENABLE_NPU_PLUGIN_ENGINE=ON \ + -DENABLE_ZEROAPI_BACKEND=ON \ + -DENABLE_INTEL_NPU_INTERNAL=ON \ + -DENABLE_INTEL_NPU_PROTOPIPE=ON \ -DENABLE_ONEDNN_FOR_GPU=OFF \ -DENABLE_MULTI=ON \ -DENABLE_PROXY=ON \ @@ -278,7 +351,6 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_SYSTEM_LIBS_DEFAULT=ON \ -DENABLE_SYSTEM_OPENCL=ON \ -DENABLE_SYSTEM_PUGIXML=ON \ - -DENABLE_SYSTEM_FLATBUFFERS=ON \ -DENABLE_SYSTEM_SNAPPY=ON \ -DENABLE_SYSTEM_PROTOBUF=ON \ -DProtobuf_LIBRARIES=%{_libdir} \ @@ -293,6 +365,17 @@ sed -i '/#include .*/a#include ' src/plugins/intel_npu/tools/pr -DENABLE_TESTS=OFF \ -DBUILD_SHARED_LIBS=ON \ -DBLAS_LIBRARIES=%{_libdir} \ + -DOPENVINO_EXTRA_MODULES=$NPU_PLUGIN_HOME \ + -DDENABLE_PRIVATE_TESTS=OFF \ + -DENABLE_NPU_LSP_SERVER=OFF \ + -DENABLE_PREBUILT_LLVM_MLIR_LIBS=OFF \ + -DDENABLE_DEVELOPER_BUILD=OFF \ + -DENABLE_MLIR_COMPILER=ON \ + -DBUILD_COMPILER_FOR_DRIVER=ON \ + -DENABLE_DRIVER_COMPILER_ADAPTER=OFF \ + -DENABLE_SOURCE_PACKAGE=OFF \ + -DLibEdit_LIBRARIES=%{_libdir}/libedit.so \ + -DLibEdit_INCLUDE_DIRS=%{_includedir}/histedit.h \ %cmake_build %install @@ -320,6 +403,7 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}% %files devel %{_includedir}/%{name} +%{_includedir}/npu_driver_compiler.h %{_libdir}/lib%{name}.so %{_libdir}/lib%{name}_c.so %{_libdir}/lib%{name}_pytorch_frontend.so @@ -367,6 +451,9 @@ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir} PYTHONPATH=%{buildroot}% %{_libdir}/lib%{name}_tensorflow_lite_frontend.so.%{version} %{_libdir}/lib%{name}_tensorflow_lite_frontend.so.%{so_ver} +%files -n intel-npu-compiler +%{_libdir}/libnpu_driver_compiler.so + %files -n python3-%{name} %{python3_sitearch}/%{name} %{python3_sitearch}/%{name}-%{version}.dist-info diff --git a/sources b/sources index 4d1b416..a4e1a3c 100644 --- a/sources +++ b/sources @@ -2,3 +2,8 @@ SHA512 (openvino-2025.1.0.tar.gz) = ae3432e9caf5df1ec292a029c3708a294447070fa02e SHA512 (onednn-5baba71.tar.gz) = 72f1a11623f8cabb2605eb734b891f36b16876ac7c940947807c4d574c7e6031dd064de5ebc7d2042c02989c1f38b55499d8c16d70a52d35dfbe74047d0ea3ce SHA512 (mlas-d1bc25e.tar.gz) = 8d6dd319924135b7b22940d623305bf200b812ae64cde79000709de4fad429fbd43794301ef16e6f10ed7132777b7a73e9f30ecae7c030aea80d57d7c0ce4500 SHA512 (level-zero-npu-extensions-c0156a3.tar.gz) = 33ebdaec13dd05d6cf51e79f0e91a3c68621c428061423e243eb998c9ebe123ee90f6b4edc749d7fa2206c729058afff945177e8c90a05d36220f076e067c22c +SHA512 (npu_compiler-npu_ud_2025_12_rc2.tar.gz) = ab8999ecc63b7a17a52b7e07008b8e0396a97d58130908de039cca628c57a3bacc76ef9aac5e1060702b641130fe5340d44eed9c7deeb254a3ce52eb0151e4df +SHA512 (npu_plugin_elf-ce501d3.tar.gz) = acb168762c0660deaeb7214a4dc931317725005ec5533173fb96b3addc80f9a8ff5894e2349897f9d99a22c8852c9e93f2faf08ebda3f07d1f8a25a73c3c41f6 +SHA512 (npu-plugin-llvm-0d11450.tar.gz) = 538fdf3a1832391bf83dbe8bd20caa26b22246a4a298d908abed5dbb3d7b113ae761836ed5e4ffcf9eeca6758c1b4fc9d7e9602fd2f1fb57b855be804079df2c +SHA512 (npu-nn-cost-model-a965531.tar.gz) = 86c01715de65686fd4761fa0f96e6c83fda94d46bae4b61361e926e5445f27bebf974eae36cbdd0c65fdc92ab903dc58ea9b116e35ccca24ba9b425fbcefc0c2 +SHA512 (flatbuffers-6df40a2.tar.gz) = 895f56fa4730b8505b553f62f8293929f26982f147be6d44fab73064862d3a20a498b4fc18bab979a2421909e501d70d987eccc5e0924e98be676add508da95a From 5d3f7430dae2cbf0c83db4820cfc881fe905a4ba Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 21 Aug 2025 08:24:09 -0600 Subject: [PATCH 19/22] Rebuild for tbb 2022.2.0 From f1b430140de97fdedefc1cefea8fd6c067386513 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:34:50 +0200 Subject: [PATCH 20/22] Rebuilt for Python 3.14.0rc3 bytecode From 14f5482792312e60494a6ade41f67033fcf49560 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Fri, 14 Nov 2025 17:35:53 +0000 Subject: [PATCH 21/22] Use pkgconfig(OpenCL) There's more than one provider, we don't care which one we use. --- openvino.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvino.spec b/openvino.spec index 314c31c..96ebcd3 100644 --- a/openvino.spec +++ b/openvino.spec @@ -95,7 +95,7 @@ BuildRequires: tbb-devel BuildRequires: onnx-devel BuildRequires: protobuf-devel BuildRequires: opencv-devel -BuildRequires: OpenCL-ICD-Loader-devel +BuildRequires: pkgconfig(OpenCL) BuildRequires: opencl-headers Requires: lib%{name}-ir-frontend = %{version} Requires: lib%{name}-pytorch-frontend = %{version} From 9014243e731d1a7d6d820f62918c688c1d75ae16 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvet Date: Thu, 11 Dec 2025 11:46:52 +0100 Subject: [PATCH 22/22] Rebuilt for OpenCV-4.12