public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: aanokhov <artyom.anokhov@intel.com>
To: git-commits@fedoraproject.org
Subject: [rpms/openvino] rawhide: Added patch for newest pybind11
Date: Thu, 11 Jun 2026 16:12:39 GMT	[thread overview]
Message-ID: <178119435909.1.12779423143735046009.rpms-openvino-cabd48b056ae@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/openvino
Branch : rawhide
Commit : cabd48b056ae480bfb8f4281a324191fd033a617
Author : aanokhov <artyom.anokhov@intel.com>
Date   : 2026-06-11T13:41:06+00:00
Stats  : +50/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/openvino/c/cabd48b056ae480bfb8f4281a324191fd033a617?branch=rawhide

Log:
Added patch for newest pybind11

---
diff --git a/openvino.spec b/openvino.spec
index 9750b84..b55ed63 100644
--- a/openvino.spec
+++ b/openvino.spec
@@ -33,7 +33,13 @@ Source3:        https://github.com/oneapi-src/oneDNN/archive/929fe4e5629be2a5e89
 Patch0: protobuf_version.patch
 Patch1: xbyak-gflags-system-modules.patch
 Patch2: samples-system-gflags-json.patch
+# pybind11 3.x (Fedora > 44) forbids py::call_guard<> on the def_property
+# family; older pybind11 needs the original variant.
+%if 0%{?fedora} > 44
+Patch3: pybind11-call_guard-compat-3x.patch
+%else
 Patch3: pybind11-call_guard-compat.patch
+%endif
 
 ExclusiveArch:  x86_64
 

diff --git a/pybind11-call_guard-compat-3x.patch b/pybind11-call_guard-compat-3x.patch
new file mode 100644
index 0000000..1e72fc3
--- /dev/null
+++ b/pybind11-call_guard-compat-3x.patch
@@ -0,0 +1,44 @@
+Fix build with pybind11 3.x (Fedora rawhide / fedora > 44)
+
+pybind11 3.x added a static_assert that forbids py::call_guard<> on the
+def_property / def_property_readonly family:
+
+    error: static assertion failed: def_property family does not currently
+    support call_guard. Use a py::cpp_function instead.
+
+Convert the two affected read-only properties to wrap their getter in a
+py::cpp_function that releases the GIL internally, preserving the original
+"GIL is released while running this function" behaviour. Regular cls.def()
+calls keep using py::call_guard<> and are intentionally left unchanged.
+
+--- a/src/bindings/python/src/pyopenvino/core/core.cpp
++++ b/src/bindings/python/src/pyopenvino/core/core.cpp
+@@ -769,8 +769,10 @@ void regclass_Core(py::module m) {
+             )");
+ 
+     cls.def_property_readonly("available_devices",
+-                              &ov::Core::get_available_devices,
+-                              py::call_guard<py::gil_scoped_release>(),
++                              py::cpp_function([](ov::Core& self) {
++                                  py::gil_scoped_release release;
++                                  return self.get_available_devices();
++                              }),
+                               R"(
+                                     Returns devices available for inference Core objects goes over all registered plugins.
+ 
+--- a/src/bindings/python/src/pyopenvino/core/infer_request.cpp
++++ b/src/bindings/python/src/pyopenvino/core/infer_request.cpp
+@@ -819,10 +819,10 @@ void regclass_InferRequest(py::module m) {
+ 
+     cls.def_property_readonly(
+         "profiling_info",
+-        [](InferRequestWrapper& self) {
++        py::cpp_function([](InferRequestWrapper& self) {
++            py::gil_scoped_release release;
+             return self.m_request.get_profiling_info();
+-        },
+-        py::call_guard<py::gil_scoped_release>(),
++        }),
+         R"(
+             Performance is measured per layer to get feedback on the most time-consuming operation.
+             Not all plugins provide meaningful data!

                 reply	other threads:[~2026-06-11 16:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178119435909.1.12779423143735046009.rpms-openvino-cabd48b056ae@fedoraproject.org \
    --to=artyom.anokhov@intel.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox