public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/openvino] rawhide: Added patch for newest pybind11
@ 2026-06-11 16:12 aanokhov
  0 siblings, 0 replies; only message in thread
From: aanokhov @ 2026-06-11 16:12 UTC (permalink / raw)
  To: git-commits

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!

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-11 16:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-11 16:12 [rpms/openvino] rawhide: Added patch for newest pybind11 aanokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox