Skip to content

Cherry pick fixes from master to releases/2024/3 #26077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dockerfiles/docker_tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pr-25303
pr-26077
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ endif()
if(NOT OV_LIBC_VERSION VERSION_EQUAL 0.0)
message (STATUS "LIBC_VERSION .......................... " ${OV_LIBC_VERSION})
endif()
if(DEFINED OPENVINO_STDLIB)
message (STATUS "STDLIB ................................ " ${OPENVINO_STDLIB})
endif()

# remove file with exported targets to force its regeneration
file(REMOVE "${CMAKE_BINARY_DIR}/OpenVINOTargets.cmake")
Expand Down
2 changes: 2 additions & 0 deletions cmake/developer_package/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ if(POLICY CMP0127)
cmake_policy(SET CMP0127 NEW)
endif()

unset(OV_OPTIONS CACHE)

macro(ov_option variable description value)
option(${variable} "${description}" ${value})
list(APPEND OV_OPTIONS ${variable})
Expand Down
6 changes: 4 additions & 2 deletions cmake/developer_package/packaging/archive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,7 @@ ov_define_component_include_rules()

# New in version 3.18
set(CPACK_ARCHIVE_THREADS 8)
# multiple packages are generated
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
# multiple packages are generated by default
if(NOT DEFINED CPACK_ARCHIVE_COMPONENT_INSTALL)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
endif()
23 changes: 20 additions & 3 deletions cmake/developer_package/target_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,23 @@ get_property(OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG

function(ov_detect_libc_type)
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
# include <string>
# ifndef _GLIBCXX_USE_CXX11_ABI
# error \"GlibCXX ABI is not defined\"
# endif

int main() {
return 0;
}"
OPENVINO_STDLIB_GNU)

if(OPENVINO_STDLIB_GNU)
set(OPENVINO_STDLIB "GNU" PARENT_SCOPE)
else()
set(OPENVINO_STDLIB "CPP" PARENT_SCOPE)
endif()

check_cxx_source_compiles("
# ifndef _GNU_SOURCE
# define _GNU_SOURCE
Expand All @@ -140,9 +157,9 @@ function(ov_detect_libc_type)
int main() {
return 0;
}"
OPENVINO_MUSL_LIBC)
OPENVINO_GLIBC_MUSL)

if(OPENVINO_MUSL_LIBC)
if(OPENVINO_GLIBC_MUSL)
set(OPENVINO_MUSL_LIBC ON PARENT_SCOPE)
else()
set(OPENVINO_GNU_LIBC ON PARENT_SCOPE)
Expand Down Expand Up @@ -213,7 +230,7 @@ ov_libc_version()
# Detects default value for _GLIBCXX_USE_CXX11_ABI for current compiler
#
macro(ov_get_glibcxx_use_cxx11_abi)
if(LINUX)
if(LINUX AND OPENVINO_STDLIB STREQUAL "GNU")
ov_get_compiler_definition("_GLIBCXX_USE_CXX11_ABI" OV_GLIBCXX_USE_CXX11_ABI)
endif()
endmacro()
Expand Down
4 changes: 4 additions & 0 deletions cmake/extra_modules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ function(_ov_register_extra_modules)
add_library(${NS}::${exported_target_clean_name} ALIAS ${exported_target})
endif()\n")
endforeach()

configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOConfig-version.cmake.in"
"${OpenVINODeveloperPackage_DIR}/OpenVINODeveloperPackageConfig-version.cmake"
@ONLY)
endfunction()

_ov_generate_fake_developer_package("openvino")
Expand Down
5 changes: 2 additions & 3 deletions cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ endif()

ov_dependent_option (ENABLE_INTEL_GPU "GPU OpenCL-based plugin for OpenVINO Runtime" ${ENABLE_INTEL_GPU_DEFAULT} "X86_64 OR AARCH64;NOT APPLE;NOT WINDOWS_STORE;NOT WINDOWS_PHONE" OFF)

if (ANDROID OR MINGW OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) OR (NOT BUILD_SHARED_LIBS AND ENABLE_INTEL_CPU))
# oneDNN doesn't support old compilers and android builds for now, so we'll build GPU plugin without oneDNN
# also, in case of static build CPU's and GPU's oneDNNs will conflict, so we are disabling GPU's one in this case
if (ANDROID OR MINGW OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0))
# oneDNN doesn't support old compilers and Android builds for now, so we'll build GPU plugin without oneDNN
set(ENABLE_ONEDNN_FOR_GPU_DEFAULT OFF)
else()
set(ENABLE_ONEDNN_FOR_GPU_DEFAULT ON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ Install OpenVINO™ Runtime on Linux From YUM Repository

- RHEL 8.2 and higher
- Amazon Linux 2022 and 2023
- Rocky Linux 8.7, 8.8 and 9.2
- Alma Linux 8.7, 8.8 and 9.2
- Oracle Linux 8.7, 8.8 and 9.2
- Fedora 29 and higher up to 40
- OpenEuler 20.03 and 22.03
- Rocky Linux 8.7, 8.8 and 9.2-9.3
- Alma Linux 8.7, 8.8 and 9.2-9.4
- Oracle Linux 8.7, 8.8 and 9.2-9.4
- Fedora 29 and higher up to 41
- OpenEuler 20.03, 22.03, 23.03 and 24.03
- Anolis OS 8.6 and 8.8
- CentOS Stream 8 and 9

Expand Down
3 changes: 3 additions & 0 deletions docs/dev/cmake_options_for_custom_compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ This document provides description and default values for CMake options that can
* `ON` is default for x86 platforms; `OFF`, otherwise.
* `ENABLE_INTEL_GPU` enables Intel GPU plugin compilation:
* `ON` is default for x86 platforms; not available, otherwise.
* `ENABLE_INTEL_NPU` enables Intel NPU plugin compilation:
* `ON` is default for Windows and Linux x86 platforms; not available, otherwise.
* `ENABLE_HETERO` enables HETERO plugin build:
* `ON` is default.
* `ENABLE_MULTI` enables MULTI plugin build:
Expand Down Expand Up @@ -191,3 +193,4 @@ In this case OpenVINO CMake scripts take `TBBROOT` environment variable into acc
[PyTorch]:https://pytorch.org/
[FlatBuffers]:https://google.github.io/flatbuffers/
[oneTBB]:https://github.com/oneapi-src/oneTBB
[JAX]:https://github.com/google/jax
14 changes: 5 additions & 9 deletions docs/dev/static_libaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ It is possible because not all interface symbols of OpenVINO Runtime libraries a
## Configure OpenVINO Runtime in the CMake stage

The default architecture of OpenVINO Runtime assumes that the following components are subject to dynamic loading during execution:
* (Device) Inference backends (CPU, GPU, MULTI, HETERO, etc.)
* (Model) Frontends (IR, ONNX, PDPD, etc.)
* Preprocessing library (to perform preprocessing, e.g. resize and color space conversions)
* (Device) Inference backends (CPU, GPU, NPU, MULTI, HETERO, etc.)
* (Model) Frontends (IR, ONNX, PDPD, TF, JAX, etc.)

With the static OpenVINO Runtime, all these modules should be linked into a final user application and **the list of modules/configuration must be known for the CMake configuration stage**. To minimize the total binary size, you can explicitly turn `OFF` unnecessary components. Use [[CMake Options for Custom Compilation|CMakeOptionsForCustomCompilation ]] as a reference for OpenVINO CMake configuration.

For example, to enable only IR v11 reading and CPU inference capabilities, use:
```sh
cmake -DENABLE_INTEL_GPU=OFF \
-DENABLE_INTEL_NPU=OFF \
-DENABLE_TEMPLATE=OFF \
-DENABLE_HETERO=OFF \
-DENABLE_MULTI=OFF \
Expand All @@ -46,6 +46,7 @@ cmake -DENABLE_INTEL_GPU=OFF \
-DENABLE_OV_PADDLE_FRONTEND=OFF \
-DENABLE_OV_TF_FRONTEND=OFF \
-DENABLE_OV_TF_LITE_FRONTEND=OFF \
-DENABLE_OV_JAX_FRONTEND=OFF \
-DENABLE_OV_PYTORCH_FRONTEND=OFF \
-DENABLE_OV_JAX_FRONTEND=OFF \
-DENABLE_INTEL_CPU=ON \
Expand Down Expand Up @@ -133,21 +134,16 @@ cmake -DCMAKE_TOOLCHAIN_FILE=<openvino source dir>/cmake/toolchains/mt.runtime.w
* The enabled and tested capabilities of OpenVINO Runtime in a static build:
* OpenVINO common runtime - work with `ov::Model`, perform model loading on particular device
* MULTI, HETERO, AUTO, and BATCH inference modes
* IR, ONNX, PDPD, and TF frontends to read `ov::Model`
* IR, ONNX, PDPD, TF and TF Lite frontends to read `ov::Model`
* Static build support for building static libraries only for OpenVINO Runtime libraries. All other third-party prebuilt dependencies remain in the same format:
* `libGNA` is a shared library.
* `TBB` is a shared library; to provide your own TBB build from [[oneTBB source code|https://github.com/oneapi-src/oneTBB]] use `export TBBROOT=<tbb_root>` before OpenVINO CMake scripts are run.

> **NOTE**: The TBB team does not recommend using oneTBB as a static library, see [[Why onetbb does not like a static library?|https://github.com/oneapi-src/oneTBB/issues/646]]

* `TBBBind_2_5` is not available on Windows x64 during a static OpenVINO build (see description for `ENABLE_TBBBIND_2_5` CMake option [[here|CMakeOptionsForCustomCompilation]] to understand what this library is responsible for). So, capabilities enabled by `TBBBind_2_5` are not available. To enable them, build [[oneTBB from source code|https://github.com/oneapi-src/oneTBB]] and provide the path to built oneTBB artifacts via `TBBROOT` environment variable before OpenVINO CMake scripts are run.

* `ov::Op::type_info` static member is deprecated and not available in static build. Don't use `type_info` during implementation of your own custom operations, use `ov::Op::get_type_info_static()` instead.

## See also

* [OpenVINO README](../../README.md)
* [OpenVINO Developer Documentation](index.md)
* [How to Build OpenVINO](build.md)


58 changes: 36 additions & 22 deletions scripts/install_dependencies/install_openvino_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,17 @@ if [ "$os" == "auto" ] ; then
fi
case $os in
centos7|centos8|centos9|\
rhel8|rhel9.1|\
rhel8|rhel9.1|rhel9.2|rhel9.3|rhel9.4|\
opencloudos8.5|opencloudos8.6|opencloudos8.8|opencloudos9.0|opencloudos9.2|\
tencentos3.1|tencentos3.2|tencentos3.3|tencentos4.0|tencentos4.2|\
anolis8.6|anolis8.8|\
openEuler20.03|openEuler22.03|openEuler23.03|\
almalinux8.7|almalinux8.8|almalinux9.2|\
openEuler20.03|openEuler22.03|openEuler23.03|openEuler24.03|\
almalinux8.7|almalinux8.8|almalinux9.2|almalinux9.3|almalinux9.4|\
amzn2|amzn2022|amzn2023|\
ol8.7|ol8.8|ol9.2|\
rocky8.7|rocky8.8|rocky9.2|\
fedora29|fedora30|fedora31|fedora32|fedora33|fedora34|fedora35|fedora36|fedora37|fedora38|fedora39|fedora40|\
ol8.7|ol8.8|ol9.2|ol9.3|ol9.4|\
rocky8.7|rocky8.8|rocky9.2|rocky9.3|rocky9.4|\
fedora29|fedora30|fedora31|fedora32|fedora33|fedora34|fedora35|fedora36|\
fedora37|fedora38|fedora39|fedora40|fedora41|\
opensuse-leap15.3|\
raspbian9|debian9|ubuntu18.04|\
raspbian10|debian10|ubuntu20.04|ubuntu20.10|ubuntu21.04|\
Expand Down Expand Up @@ -161,19 +162,24 @@ elif [ "$os" == "ubuntu20.04" ] || [ "$os" == "debian10" ] || [ "$os" == "raspbi
fi

elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] || [ "$os" == "centos9" ] ||
[ "$os" == "rhel8" ] || [ "$os" == "rhel9.1" ] ||
[ "$os" == "rhel8" ] ||
[ "$os" == "rhel9.1" ] || [ "$os" == "rhel9.2" ] || [ "$os" == "rhel9.3" ] || [ "$os" == "rhel9.4" ] ||
[ "$os" == "opencloudos8.5" ] || [ "$os" == "opencloudos8.6" ] || [ "$os" == "opencloudos8.8" ] ||
[ "$os" == "opencloudos9.0" ] || [ "$os" == "opencloudos9.2" ] ||
[ "$os" == "tencentos3.1" ] || [ "$os" == "tencentos3.2" ] || [ "$os" == "tencentos3.3" ] ||
[ "$os" == "tencentos4.0" ] || [ "$os" == "tencentos4.2" ] ||
[ "$os" == "anolis8.6" ] || [ "$os" == "anolis8.8" ] ||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] ||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] || [ "$os" == "openEuler24.03" ] ||
[ "$os" == "fedora29" ] || [ "$os" == "fedora30" ] || [ "$os" == "fedora31" ] || [ "$os" == "fedora32" ] ||
[ "$os" == "fedora33" ] || [ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
[ "$os" == "fedora37" ] || [ "$os" == "fedora38" ] || [ "$os" == "fedora39" ] || [ "$os" == "fedora40" ] ||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] || [ "$os" == "ol9.2" ] ||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] || [ "$os" == "rocky9.2" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] || [ "$os" == "almalinux9.2" ] ||
[ "$os" == "fedora41" ] ||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] ||
[ "$os" == "ol9.2" ] || [ "$os" == "ol9.3" ] || [ "$os" == "ol9.4" ] ||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] ||
[ "$os" == "rocky9.2" ] || [ "$os" == "rocky9.3" ] || [ "$os" == "rocky9.4" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] ||
[ "$os" == "almalinux9.2" ] || [ "$os" == "almalinux9.3" ] || [ "$os" == "almalinux9.4" ]||
[ "$os" == "amzn2" ] || [ "$os" == "amzn2022" ] || [ "$os" == "amzn2023" ] ; then

arch=$(uname -m)
Expand All @@ -195,13 +201,17 @@ elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] || [ "$os" == "centos9" ]
if [ "$os" == "fedora29" ] || [ "$os" == "fedora30" ] || [ "$os" == "fedora31" ] || [ "$os" == "fedora32" ] ||
[ "$os" == "fedora33" ] || [ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
[ "$os" == "fedora37" ] || [ "$os" == "fedora38" ] || [ "$os" == "fedora39" ] || [ "$os" == "fedora40" ] ||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] || [ "$os" == "ol9.2" ] ||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] || [ "$os" == "rocky9.2" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] || [ "$os" == "almalinux9.2" ] ||
[ "$os" == "fedora41" ] ||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] ||
[ "$os" == "ol9.2" ] || [ "$os" == "ol9.3" ] || [ "$os" == "ol9.4" ]
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] ||
[ "$os" == "rocky9.2" ] || [ "$os" == "rocky9.3" ] || [ "$os" == "rocky9.4" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] ||
[ "$os" == "almalinux9.2" ] || [ "$os" == "almalinux9.3" ] || [ "$os" == "almalinux9.4" ] ||
[ "$os" == "centos8" ] || [ "$os" == "centos9" ] ||
[ "$os" == "amzn2022" ] || [ "$os" == "amzn2023" ] ||
[ "$os" == "anolis8.6" ] || [ "$os" == "anolis8.8" ] ||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] ; then
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] || [ "$os" == "openEuler24.03" ] ; then
pkgs_python+=(python3 python3-pip)
fi

Expand All @@ -212,7 +222,7 @@ elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] || [ "$os" == "centos9" ]
pkgs_gpu+=("http://mirror.centos.org/centos/8-stream/AppStream/$arch/os/Packages/ocl-icd-2.2.12-1.el8.$arch.rpm")
pkgs_python+=(python38 python38-pip)
extra_repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm")
elif [ "$os" == "rhel9.1" ] ; then
elif [ "$os" == "rhel9.1" ] || [ "$os" == "rhel9.2" ] || [ "$os" == "rhel9.3" ] || [ "$os" == "rhel9.4" ] ; then
pkgs_gpu+=("https://mirror.stream.centos.org/9-stream/AppStream/$arch/os/Packages/ocl-icd-2.2.13-4.el9.$arch.rpm")
pkgs_python+=(python3 python3-pip)
extra_repos+=("https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm")
Expand Down Expand Up @@ -273,16 +283,20 @@ if [ "$os" == "debian9" ] || [ "$os" == "raspbian9" ] || [ "$os" == "ubuntu18.04
apt-get update && apt-get install --no-install-recommends "$iopt" "${pkgs[@]}"

elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] || [ "$os" == "centos9" ] ||
[ "$os" == "rhel8" ] || [ "$os" == "rhel9.1" ] ||
[ "$os" == "rhel8" ] ||
[ "$os" == "rhel9.1" ] || [ "$os" == "rhel9.2" ] || [ "$os" == "rhel9.3" ] || [ "$os" == "rhel9.4" ] ||
[ "$os" == "anolis8.6" ] || [ "$os" == "anolis8.8" ] ||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] ||
[ "$os" == "openEuler20.03" ] || [ "$os" == "openEuler22.03" ] || [ "$os" == "openEuler23.03" ] || [ "$os" == "openEuler24.03" ] ||
[ "$os" == "fedora29" ] || [ "$os" == "fedora30" ] || [ "$os" == "fedora31" ] || [ "$os" == "fedora32" ] ||
[ "$os" == "fedora33" ] || [ "$os" == "fedora34" ] || [ "$os" == "fedora35" ] || [ "$os" == "fedora36" ] ||
[ "$os" == "fedora37" ] || [ "$os" == "fedora38" ] || [ "$os" == "fedora39" ] || [ "$os" == "fedora40" ] ||
[ "$os" == "fedora36" ] || [ "$os" == "fedora38" ] ||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] || [ "$os" == "ol9.2" ] ||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] || [ "$os" == "rocky9.2" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] || [ "$os" == "almalinux9.2" ] ||
[ "$os" == "fedora41" ] ||
[ "$os" == "ol8.7" ] || [ "$os" == "ol8.8" ] ||
[ "$os" == "ol9.2" ] || [ "$os" == "ol9.3" ] || [ "$os" == "ol9.4" ] ||
[ "$os" == "rocky8.7" ] || [ "$os" == "rocky8.8" ] ||
[ "$os" == "rocky9.2" ] || [ "$os" == "rocky9.3" ] || [ "$os" == "rocky9.4" ] ||
[ "$os" == "almalinux8.7" ] || [ "$os" == "almalinux8.8" ] ||
[ "$os" == "almalinux9.2" ] || [ "$os" == "almalinux9.3" ] || [ "$os" == "almalinux9.4" ] ||
[ "$os" == "amzn2" ] || [ "$os" == "amzn2022" ] || [ "$os" == "amzn2023" ] ; then

[ -z "$interactive" ] && iopt="--assumeyes"
Expand Down
Loading
Loading