Hello Yongxin,

Can you please split this patches and send separate patches for meta-intel and 
meta-openvino?

Thanks,
Yogesh
________________________________________
From: [email protected] <[email protected]> on 
behalf of Yongxin Liu via lists.yoctoproject.org 
<[email protected]>
Sent: Wednesday, February 4, 2026 11:53 AM
To: Tyagi, Yogesh <[email protected]>; [email protected] 
<[email protected]>; [email protected] 
<[email protected]>
Subject: [meta-intel][meta-openvino][PATCH] openvino-inference-engine: add 
Intel NPU Plugin support


From: Yongxin Liu <[email protected]>

1) Added submodules for NPU Plugin: level-zero, level-zero-npu-extensions
   and yaml-cpp.

2) Removed the hardcoded -DENABLE_INTEL_NPU=OFF. Add a new
   PACKAGECONFIG option intel-npu to toggle NPU plugin support.

3) Included a patch file 
("0001-Fix-intel-NPU-plugin-build-issue-with-GCC15.patch")
   to address GCC15 build errors by explicitly including "<cstdint>" where 
necessary.

4) Fix debug source paths in generated NPU dispatcher sources.

The Intel NPU plugin file will be installed to
"/usr/lib64/openvino-2025.3.0/libopenvino_intel_npu_plugin.so".

Signed-off-by: Yongxin Liu <[email protected]>
---
 ...el-NPU-plugin-build-issue-with-GCC15.patch | 48 +++++++++++++++++++
 .../openvino-inference-engine_2025.3.0.bb     | 17 ++++++-
 2 files changed, 64 insertions(+), 1 deletion(-)
 create mode 100644 
recipes-core/opencv/files/0001-Fix-intel-NPU-plugin-build-issue-with-GCC15.patch

diff --git 
a/recipes-core/opencv/files/0001-Fix-intel-NPU-plugin-build-issue-with-GCC15.patch
 
b/recipes-core/opencv/files/0001-Fix-intel-NPU-plugin-build-issue-with-GCC15.patch
new file mode 100644
index 0000000..8867067
--- /dev/null
+++ 
b/recipes-core/opencv/files/0001-Fix-intel-NPU-plugin-build-issue-with-GCC15.patch
@@ -0,0 +1,48 @@
+From 34ed105a39faf7a68b22c7844e700c501277aa8f Mon Sep 17 00:00:00 2001
+From: Yongxin Liu <[email protected]>
+Date: Wed, 4 Feb 2026 13:27:57 +0800
+Subject: [PATCH] Fix intel NPU plugin build issue with GCC15.
+
+Fix:
+openvino-inference-engine/2025.3.0/sources/openvino-inference-engine-2025.3.0/src/plugins/intel_npu/tools/protopipe/src/graph.hpp:40:5:
+error: 'uint64_t' does not name a type [-Wtemplate-body]
+   40 |     uint64_t operator()(const WeakHandle<T>& handle) const {
+      |     ^~~~~~~~
+
+Reference: https://gcc.gnu.org/gcc-15/porting_to.html
+
+Upstream-Status: Pending
+
+Signed-off-by: Yongxin Liu <[email protected]>
+---
+ src/plugins/intel_npu/tools/protopipe/src/graph.hpp              | 1 +
+ src/plugins/intel_npu/tools/protopipe/src/scenario/criterion.hpp | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/plugins/intel_npu/tools/protopipe/src/graph.hpp 
b/src/plugins/intel_npu/tools/protopipe/src/graph.hpp
+index 66aeccbe156..bf599071c54 100644
+--- a/src/plugins/intel_npu/tools/protopipe/src/graph.hpp
++++ b/src/plugins/intel_npu/tools/protopipe/src/graph.hpp
+@@ -12,6 +12,7 @@
+ #include <unordered_map>
+ #include <unordered_set>
+ #include <vector>
++#include <cstdint>
+ 
+ #include "utils/error.hpp"
+ 
+diff --git a/src/plugins/intel_npu/tools/protopipe/src/scenario/criterion.hpp 
b/src/plugins/intel_npu/tools/protopipe/src/scenario/criterion.hpp
+index 28b440a7b3b..0fb05fb1175 100644
+--- a/src/plugins/intel_npu/tools/protopipe/src/scenario/criterion.hpp
++++ b/src/plugins/intel_npu/tools/protopipe/src/scenario/criterion.hpp
+@@ -6,6 +6,7 @@
+ #pragma once
+ 
+ #include <memory>
++#include <cstdint>
+ 
+ struct ITermCriterion {
+     using Ptr = std::shared_ptr<ITermCriterion>;
+-- 
+2.46.2
+
diff --git a/recipes-core/opencv/openvino-inference-engine_2025.3.0.bb 
b/recipes-core/opencv/openvino-inference-engine_2025.3.0.bb
index d2d1759..9fe0cf0 100644
--- a/recipes-core/opencv/openvino-inference-engine_2025.3.0.bb
+++ b/recipes-core/opencv/openvino-inference-engine_2025.3.0.bb
@@ -41,6 +41,17 @@ SRCREV_telemetry = "8abddc3dbc8beb04a39b5ea40cbba5020317102f"
 SRCREV_gtest = "99760ac1776430f3df65947992bf4e8ebc0d7660"
 SRCREV_FORMAT = 
"openvino_mkl_onednn_xbyak_ade_protobuf_gflags_zlib_node-api-headers_node-addon-api_mlas_telemetry_gtest"
 
+# For NPU plugin
+SRC_URI += 
"git://github.com/oneapi-src/level-zero.git;protocol=https;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/thirdparty/level_zero/level-zero;name=level-zero;nobranch=1
 \
+            
git://github.com/intel/level-zero-npu-extensions.git;protocol=https;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/src/plugins/intel_npu/thirdparty/level-zero-ext;name=level-zero-ext;nobranch=1
 \
+            
git://github.com/jbeder/yaml-cpp.git;protocol=https;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/src/plugins/intel_npu/thirdparty/yaml-cpp;name=yaml-cpp;nobranch=1
 \
+            file://0001-Fix-intel-NPU-plugin-build-issue-with-GCC15.patch \
+           "
+SRCREV_level-zero = "9402907a3ce6987871325e4e1329e053b8e5cf2b"
+SRCREV_level-zero-ext = "f8bba8915e0a5fe8317f7aa48007ecc5a8c179ca"
+SRCREV_yaml-cpp = "da82fd982c260e7f335ce5acbceff24b270544d1"
+SRCREV_FORMAT += "_level-zero_level-zero-ext_yaml-cpp"
+
 LICENSE = "Apache-2.0 & MIT & BSD-3-Clause & Zlib"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
                     
file://thirdparty/xbyak/COPYRIGHT;md5=3c98edfaa50a86eeaef4c6109e803f16 \
@@ -76,7 +87,6 @@ EXTRA_OECMAKE += " \
                   -DENABLE_SYSTEM_FLATBUFFERS=ON \
                   -DENABLE_SYSTEM_SNAPPY=ON \
                   -DFETCHCONTENT_BASE_DIR="${S}" \
-                  -DENABLE_INTEL_NPU=OFF \
                   -DPYTHON3_CONFIG="python3-config" \
                   -DENABLE_OV_JAX_FRONTEND=OFF \
                   -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
@@ -104,6 +114,7 @@ PACKAGECONFIG[opencl] = "-DENABLE_INTEL_GPU=TRUE, 
-DENABLE_INTEL_GPU=FALSE, virt
 PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DENABLE_PYTHON_PACKAGING=ON, 
-DENABLE_PYTHON=OFF, patchelf-native, python3 python3-numpy python3-progress"
 PACKAGECONFIG[samples] = "-DENABLE_SAMPLES=ON -DENABLE_COMPILE_TOOL=ON, 
-DENABLE_SAMPLES=OFF -DENABLE_COMPILE_TOOL=OFF, opencv"
 PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0"
+PACKAGECONFIG[intel-npu] = "-DENABLE_INTEL_NPU=ON, -DENABLE_INTEL_NPU=OFF"
 
 do_configure:prepend() {
     # Dont set PROJECT_ROOT_DIR
@@ -118,11 +129,15 @@ EOF
     chmod +x ${WORKDIR}/qemuwrapper
 }
 
+NPU_INSTALL_CMD = "find ${B}/src/plugins/intel_npu/src/plugin/cross-compiled/ 
-type f -name \"*_disp.cpp\" -exec sed -i -e \"s%${S}%${TARGET_DBGSRC_DIR}%g\" 
{} + || bberror \"Failed to update dispatcher source paths\""
+
 do_install:append() {
     rm -rf ${D}${prefix}/install_dependencies
     rm -rf ${D}${prefix}/setupvars.sh
 
     find ${B}/src/plugins/intel_cpu/cross-compiled/ -type f -name *_disp.cpp 
-exec sed -i -e 's%'"${S}"'%'"${TARGET_DBGSRC_DIR}"'%g' {} +
+
+    ${@bb.utils.contains('PACKAGECONFIG', 'intel-npu', '${NPU_INSTALL_CMD}', 
'', d)}
 }
 
 # Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using 
dldt-inference-engine uses dldt-inference-engine WORKDIR
-- 
2.46.2



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8709): 
https://lists.yoctoproject.org/g/meta-intel/message/8709
Mute This Topic: https://lists.yoctoproject.org/mt/117630408/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to