Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[PyOV] Bump pybind to 3.0.2 and fix new issues (#34468)

Przemyslaw Wysocki3ca3d437c2f7
diff --git a/src/bindings/python/src/pyopenvino/core/core.cpp b/src/bindings/python/src/pyopenvino/core/core.cpp
index 6da879546cc..6a76e6dd4f9 100644
--- a/src/bindings/python/src/pyopenvino/core/core.cpp
+++ b/src/bindings/python/src/pyopenvino/core/core.cpp
@@ -768,8 +768,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([](const 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.
diff --git a/src/bindings/python/src/pyopenvino/core/infer_request.cpp b/src/bindings/python/src/pyopenvino/core/infer_request.cpp
index b7e41b3153e..437ee70ac81 100644
--- a/src/bindings/python/src/pyopenvino/core/infer_request.cpp
+++ b/src/bindings/python/src/pyopenvino/core/infer_request.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018-2026 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
+//
#include "pyopenvino/core/infer_request.hpp"
@@ -817,13 +818,12 @@ void regclass_InferRequest(py::module m) {
:rtype: float
)");
- cls.def_property_readonly(
- "profiling_info",
- [](InferRequestWrapper& self) {
- return self.m_request.get_profiling_info();
- },
- py::call_guard<py::gil_scoped_release>(),
- R"(
+ cls.def_property_readonly("profiling_info",
+ py::cpp_function([](InferRequestWrapper& self) {
+ py::gil_scoped_release release;
+ return self.m_request.get_profiling_info();
+ }),
+ R"(
Performance is measured per layer to get feedback on the most time-consuming operation.
Not all plugins provide meaningful data!
diff --git a/src/bindings/python/thirdparty/pybind11 b/src/bindings/python/thirdparty/pybind11
index f5fbe867d2d..45fab4087ea 160000
--- a/src/bindings/python/thirdparty/pybind11
+++ b/src/bindings/python/thirdparty/pybind11
@@ -1 +1 @@
-Subproject commit f5fbe867d2d26e4a0a9177a51f6e568868ad3dc8
+Subproject commit 45fab4087eaaff234227a10cf7845e8b07f28a98