Updated pybind11 to 2.12.0 (#24140)

### Details:
 - Removed WA for cross-compilation case
- It's possible because fix https://github.com/pybind/pybind11/pull/4856
is included to latest released version
This commit is contained in:
Ilya Lavrenov 2024-04-22 15:03:02 +04:00 committed by GitHub
parent 147cf78079
commit 5b07693667
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 21 additions and 5 deletions

View File

@ -193,7 +193,6 @@ jobs:
-DENABLE_PYTHON=ON \ -DENABLE_PYTHON=ON \
-DENABLE_WHEEL=ON \ -DENABLE_WHEEL=ON \
-DPYTHON_MODULE_EXTENSION=$(riscv64-linux-gnu-python3-config --extension-suffix) \ -DPYTHON_MODULE_EXTENSION=$(riscv64-linux-gnu-python3-config --extension-suffix) \
-DPYBIND11_PYTHON_EXECUTABLE_LAST=${OPENVINO_BUILD_DIR}/env/bin/python3.10 \
-DENABLE_TESTS=ON \ -DENABLE_TESTS=ON \
-DENABLE_PYTHON_PACKAGING=ON \ -DENABLE_PYTHON_PACKAGING=ON \
-DENABLE_SYSTEM_PROTOBUF=ON \ -DENABLE_SYSTEM_PROTOBUF=ON \

View File

@ -4,7 +4,7 @@
"xbyak/6.73#250bc3bc73379f90f255876c1c00a4cd%1691853024.351", "xbyak/6.73#250bc3bc73379f90f255876c1c00a4cd%1691853024.351",
"snappy/1.1.10#916523630083f6d855cb2977de8eefb6%1689780661.062", "snappy/1.1.10#916523630083f6d855cb2977de8eefb6%1689780661.062",
"rapidjson/cci.20220822#8ca51918340f3a21127822258e95ec0f%1663194355.698", "rapidjson/cci.20220822#8ca51918340f3a21127822258e95ec0f%1663194355.698",
"pybind11/2.10.4#dd44c80a5ed6a2ef11194380daae1248%1682692198.909", "pybind11/2.12.0#1bf487c19d580200ba9b74afcc4174b4%1711607911.876",
"pugixml/1.13#f615c1fcec55122b2e177d17061276e7%1691917296.869", "pugixml/1.13#f615c1fcec55122b2e177d17061276e7%1691917296.869",
"protobuf/3.21.12#d9f5f4e3b86552552dda4c0a2e928eeb%1685218275.69", "protobuf/3.21.12#d9f5f4e3b86552552dda4c0a2e928eeb%1685218275.69",
"opencl-icd-loader/2023.04.17#5f73dd9f0c023d416a7f162e320b9c77%1692732261.088", "opencl-icd-loader/2023.04.17#5f73dd9f0c023d416a7f162e320b9c77%1692732261.088",
@ -31,5 +31,6 @@
"automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50%1688481772.751", "automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50%1688481772.751",
"autoconf/2.71#53be95d228b2dcb30dc199cb84262d8f%1693395343.513" "autoconf/2.71#53be95d228b2dcb30dc199cb84262d8f%1693395343.513"
], ],
"python_requires": [] "python_requires": [],
"config_requires": []
} }

View File

@ -8,7 +8,7 @@ rapidjson/[>=1.1.0]
xbyak/[>=6.62] xbyak/[>=6.62]
snappy/[>=1.1.7] snappy/[>=1.1.7]
onnx/1.15.0 onnx/1.15.0
pybind11/[>=2.10.1] pybind11/[>=2.12.0]
flatbuffers/[>=22.9.24] flatbuffers/[>=22.9.24]
[tool_requires] [tool_requires]

View File

@ -201,6 +201,11 @@ if(Python3_VERSION_MINOR GREATER_EQUAL 11)
else() else()
set(pybind11_min_version 2.8.0) set(pybind11_min_version 2.8.0)
endif() endif()
if(CMAKE_CROSSCOMPILING)
set(pybind11_min_version 2.12.0)
endif()
# search for FindPython3.cmake instead of legacy modules
set(PYBIND11_FINDPYTHON ON)
find_package(Python3 REQUIRED COMPONENTS Interpreter ${python3_development_component}) find_package(Python3 REQUIRED COMPONENTS Interpreter ${python3_development_component})
find_package(pybind11 ${pybind11_min_version} QUIET) find_package(pybind11 ${pybind11_min_version} QUIET)

View File

@ -99,6 +99,10 @@ void regclass_frontend_FrontEndManager(py::module m) {
}); });
} }
OPENVINO_SUPPRESS_DEPRECATED_START
// CVS-139194: migrate to new exception handling https://github.com/pybind/pybind11/pull/4772
void regclass_frontend_GeneralFailureFrontEnd(py::module m) { void regclass_frontend_GeneralFailureFrontEnd(py::module m) {
static py::exception<ov::frontend::GeneralFailure> exc(std::move(m), "GeneralFailure"); static py::exception<ov::frontend::GeneralFailure> exc(std::move(m), "GeneralFailure");
py::register_exception_translator([](std::exception_ptr p) { py::register_exception_translator([](std::exception_ptr p) {
@ -158,3 +162,5 @@ void regclass_frontend_NotImplementedFailureFrontEnd(py::module m) {
} }
}); });
} }
OPENVINO_SUPPRESS_DEPRECATED_END

@ -1 +1 @@
Subproject commit 2965fa8de3cf9e82c789f906a525a76197b186c1 Subproject commit 3e9dfa2866941655c56877882565e7577de6fc7b

View File

@ -30,6 +30,11 @@ if(Python3_VERSION_MINOR GREATER_EQUAL 11)
else() else()
set(pybind11_min_version 2.8.0) set(pybind11_min_version 2.8.0)
endif() endif()
if(CMAKE_CROSSCOMPILING)
set(pybind11_min_version 2.12.0)
endif()
# search for FindPython3.cmake instead of legacy modules
set(PYBIND11_FINDPYTHON ON)
find_package(pybind11 ${pybind11_min_version} QUIET) find_package(pybind11 ${pybind11_min_version} QUIET)