From eb025fad1e800280746eb2d543818bece701c9c6 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 16 Apr 2024 18:26:41 +0400 Subject: [PATCH] Supported Ubuntu 24.04 (#23905) ### Details: - Supported Ubuntu 24.04 --- .github/workflows/android_arm64.yml | 2 +- cmake/packaging/debian.cmake | 2 +- install_build_dependencies.sh | 2 +- .../install_openvino_dependencies.sh | 14 ++++++++------ .../src/graph_iterator_flatbuffer.hpp | 2 +- src/plugins/intel_cpu/CMakeLists.txt | 4 ++++ src/plugins/intel_cpu/src/compiled_model.cpp | 9 +++++++-- src/plugins/intel_cpu/src/plugin.cpp | 5 ++++- src/plugins/intel_cpu/thirdparty/CMakeLists.txt | 1 + src/plugins/intel_npu/thirdparty/CMakeLists.txt | 14 +++++++------- 10 files changed, 35 insertions(+), 20 deletions(-) diff --git a/.github/workflows/android_arm64.yml b/.github/workflows/android_arm64.yml index 31e4ec4358f..b3dbd98ecbe 100644 --- a/.github/workflows/android_arm64.yml +++ b/.github/workflows/android_arm64.yml @@ -121,7 +121,7 @@ jobs: # vcpkg 'python3' port dependencies apt --assume-yes install autoconf libtool autoconf-archive # vcpkg tree of dependencies require extra packages - apt --assume-yes install pkg-config linux-libc-dev + apt --assume-yes install pkgconf linux-libc-dev # Install Android SDK, NDK and Tools apt -y --no-install-recommends install unzip wget default-jdk diff --git a/cmake/packaging/debian.cmake b/cmake/packaging/debian.cmake index 49b489da237..2935b00e7bd 100644 --- a/cmake/packaging/debian.cmake +++ b/cmake/packaging/debian.cmake @@ -347,7 +347,7 @@ macro(ov_cpack_settings) # Samples # - set(samples_build_deps "cmake, g++, gcc, libc6-dev, make, pkg-config") + set(samples_build_deps "cmake, g++, gcc, libc6-dev, make, pkgconf") set(samples_build_deps_suggest "libopencv-core-dev, libopencv-imgproc-dev, libopencv-imgcodecs-dev") set(samples_opencl_suggest "ocl-icd-opencl-dev, opencl-headers") diff --git a/install_build_dependencies.sh b/install_build_dependencies.sh index 6fc053a3293..097f8f466aa 100755 --- a/install_build_dependencies.sh +++ b/install_build_dependencies.sh @@ -37,7 +37,7 @@ if [ -f /etc/lsb-release ] || [ -f /etc/debian_version ] ; then "${cmake_packages[@]}" \ "${x86_64_specific_packages[@]}" \ `# to find dependencies` \ - pkg-config \ + pkgconf \ `# to deternime product version via git` \ git \ `# check bash scripts for correctness` \ diff --git a/scripts/install_dependencies/install_openvino_dependencies.sh b/scripts/install_dependencies/install_openvino_dependencies.sh index ad489419755..e31813d7c23 100755 --- a/scripts/install_dependencies/install_openvino_dependencies.sh +++ b/scripts/install_dependencies/install_openvino_dependencies.sh @@ -61,7 +61,7 @@ if [ -n "$selftest" ] ; then raspbian:9 debian:9 ubuntu:18.04 \ raspbian:10 debian:10 ubuntu:20.04 ubuntu:20.10 ubuntu:21.04 \ raspbian:11 debian:11 ubuntu:21.10 ubuntu:22.04 \ - raspbian:12 debian:12 ubuntu:22.10 ubuntu:23.04 ; do + raspbian:12 debian:12 ubuntu:22.10 ubuntu:23.04 ubuntu:24.04 ; do for opt in "-h" "-p" "-e -p" "-n" "-n -e" "-y" "-y -e" ; do echo "||" echo "|| Test $image / '$opt'" @@ -107,7 +107,7 @@ if [ "$os" == "auto" ] ; then raspbian9|debian9|ubuntu18.04|\ raspbian10|debian10|ubuntu20.04|ubuntu20.10|ubuntu21.04|\ raspbian11|debian11|ubuntu21.10|ubuntu22.04|\ - raspbian12|debian12|ubuntu22.10) [ -z "$print" ] && echo "Detected OS: ${os}" ;; + raspbian12|debian12|ubuntu22.10:ubuntu23.04|ubuntu23.10|ubuntu24.04) [ -z "$print" ] && echo "Detected OS: ${os}" ;; *) echo "Unsupported OS: ${os:-detection failed}" >&2 ; exit 1 ;; esac fi @@ -138,14 +138,14 @@ elif [ "$os" == "ubuntu18.04" ] ; then elif [ "$os" == "ubuntu20.04" ] || [ "$os" == "debian10" ] || [ "$os" == "raspbian10" ] || [ "$os" == "ubuntu21.10" ] || [ "$os" == "ubuntu22.04" ] || [ "$os" == "debian11" ] || [ "$os" == "raspbian11" ] || - [ "$os" == "ubuntu22.10" ] || [ "$os" == "ubuntu23.04" ] || [ "$os" == "debian12" ] || [ "$os" == "raspbian12" ]; then + [ "$os" == "ubuntu22.10" ] || [ "$os" == "ubuntu23.04" ] || [ "$os" == "ubuntu24.04" ] || [ "$os" == "debian12" ] || [ "$os" == "raspbian12" ]; then pkgs_core=() pkgs_gpu=(ocl-icd-libopencl1) pkgs_python=(python3 python3-venv python3-pip) - pkgs_dev=(cmake pkg-config g++ gcc libc6-dev make sudo) + pkgs_dev=(cmake pkgconf g++ gcc libc6-dev make sudo) - if [ "$os" == "ubuntu22.04" ] || [ "$os" == "ubuntu22.10" ] || [ "$os" == "ubuntu23.04" ] || + if [ "$os" == "ubuntu22.04" ] || [ "$os" == "ubuntu22.10" ] || [ "$os" == "ubuntu23.04" ] || [ "$os" == "ubuntu24.04" ] || [ "$os" == "debian12" ] || [ "$os" == "raspbian12" ] ; then pkgs_core+=(libtbb12) else @@ -164,6 +164,8 @@ elif [ "$os" == "ubuntu20.04" ] || [ "$os" == "debian10" ] || [ "$os" == "raspbi pkgs_python+=(libpython3.10) elif [ "$os" == "ubuntu23.04" ] ; then pkgs_python+=(libpython3.11) + elif [ "$os" == "ubuntu24.04" ] ; then + pkgs_python+=(libpython3.12) fi elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] || [ "$os" == "centos9" ] || @@ -271,7 +273,7 @@ iopt= if [ "$os" == "debian9" ] || [ "$os" == "raspbian9" ] || [ "$os" == "ubuntu18.04" ] || [ "$os" == "debian10" ] || [ "$os" == "raspbian10" ] || [ "$os" == "ubuntu20.04" ] || [ "$os" == "ubuntu20.10" ] || [ "$os" == "ubuntu21.04" ] || [ "$os" == "debian11" ] || [ "$os" == "raspbian11" ] || [ "$os" == "ubuntu21.10" ] || [ "$os" == "ubuntu22.04" ] || - [ "$os" == "debian12" ] || [ "$os" == "raspbian12" ] || [ "$os" == "ubuntu22.10" ] ; then + [ "$os" == "debian12" ] || [ "$os" == "raspbian12" ] || [ "$os" == "ubuntu22.10" ] || [ "$os" == "ubuntu23.04" ] || [ "$os" == "ubuntu23.10" ] || [ "$os" == "ubuntu24.04" ] ; then [ -z "$interactive" ] && iopt="-y" [ -n "$dry" ] && iopt="--dry-run" diff --git a/src/frontends/tensorflow_lite/src/graph_iterator_flatbuffer.hpp b/src/frontends/tensorflow_lite/src/graph_iterator_flatbuffer.hpp index c9a889125af..2261d40d650 100644 --- a/src/frontends/tensorflow_lite/src/graph_iterator_flatbuffer.hpp +++ b/src/frontends/tensorflow_lite/src/graph_iterator_flatbuffer.hpp @@ -72,7 +72,7 @@ public: #else std::ifstream tflite_stream(path, std::ios::in | std::ifstream::binary); #endif - char buf[offset_size * 2] = {}; + char buf[offset_size * 2 + 1] = {}; // +1 is used to overcome gcc's -Wstringop-overread warning tflite_stream.read(buf, offset_size * 2); // If we have enough readed bytes - try to detect prefixed identifier, else try without size prefix if ((tflite_stream.gcount() == offset_size * 2) && ::tflite::ModelBufferHasIdentifier(buf + offset_size)) { diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txt index 074d4fd6c36..ff28c82fe0a 100644 --- a/src/plugins/intel_cpu/CMakeLists.txt +++ b/src/plugins/intel_cpu/CMakeLists.txt @@ -28,6 +28,10 @@ elseif(OV_COMPILER_IS_CLANG) else() ov_add_compiler_flags(-Wno-delete-non-virtual-dtor) endif() +elseif(CMAKE_COMPILER_IS_GNUCXX) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11) + ov_add_compiler_flags(-Wno-array-bounds) + endif() endif() if (AARCH64 AND NOT APPLE AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2) diff --git a/src/plugins/intel_cpu/src/compiled_model.cpp b/src/plugins/intel_cpu/src/compiled_model.cpp index 96bfe2f4672..69203da95a2 100644 --- a/src/plugins/intel_cpu/src/compiled_model.cpp +++ b/src/plugins/intel_cpu/src/compiled_model.cpp @@ -202,12 +202,11 @@ ov::Any CompiledModel::get_property(const std::string& name) const { }; if (name == ov::supported_properties) { - return std::vector{ + std::vector ro_properties{ RO_property(ov::supported_properties.name()), RO_property(ov::model_name.name()), RO_property(ov::optimal_number_of_infer_requests.name()), RO_property(ov::num_streams.name()), - RO_property(ov::affinity.name()), RO_property(ov::inference_num_threads.name()), RO_property(ov::enable_profiling.name()), RO_property(ov::hint::inference_precision.name()), @@ -225,6 +224,12 @@ ov::Any CompiledModel::get_property(const std::string& name) const { RO_property(ov::hint::dynamic_quantization_group_size.name()), RO_property(ov::hint::kv_cache_precision.name()), }; + + OPENVINO_SUPPRESS_DEPRECATED_START + ro_properties.insert(ro_properties.end(), RO_property(ov::affinity.name())); + OPENVINO_SUPPRESS_DEPRECATED_END + + return ro_properties; } if (name == ov::model_name) { diff --git a/src/plugins/intel_cpu/src/plugin.cpp b/src/plugins/intel_cpu/src/plugin.cpp index 2c083b8cc3a..11195c8f920 100644 --- a/src/plugins/intel_cpu/src/plugin.cpp +++ b/src/plugins/intel_cpu/src/plugin.cpp @@ -441,7 +441,6 @@ ov::Any Plugin::get_ro_property(const std::string& name, const ov::AnyMap& optio // the whole config is RW before model is loaded. std::vector rwProperties{ RW_property(ov::num_streams.name()), - RW_property(ov::affinity.name()), RW_property(ov::inference_num_threads.name()), RW_property(ov::enable_profiling.name()), RW_property(ov::hint::inference_precision.name()), @@ -460,6 +459,10 @@ ov::Any Plugin::get_ro_property(const std::string& name, const ov::AnyMap& optio RW_property(ov::hint::kv_cache_precision.name()), }; + OPENVINO_SUPPRESS_DEPRECATED_START + rwProperties.insert(rwProperties.end(), RW_property(ov::affinity.name())); + OPENVINO_SUPPRESS_DEPRECATED_END + std::vector supportedProperties; supportedProperties.reserve(roProperties.size() + rwProperties.size()); supportedProperties.insert(supportedProperties.end(), roProperties.begin(), roProperties.end()); diff --git a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt index 71969ae0330..9660b9d7086 100644 --- a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt +++ b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt @@ -87,6 +87,7 @@ function(ov_add_onednn) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11 AND CMAKE_COMPILER_IS_GNUCXX) ov_add_compiler_flags(-Wno-array-bounds) ov_add_compiler_flags(-Wno-stringop-overflow) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-overloaded-virtual") if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12) ov_add_compiler_flags(-Wno-restrict) endif() diff --git a/src/plugins/intel_npu/thirdparty/CMakeLists.txt b/src/plugins/intel_npu/thirdparty/CMakeLists.txt index 4c0cf2494b1..7e1343bbc8f 100644 --- a/src/plugins/intel_npu/thirdparty/CMakeLists.txt +++ b/src/plugins/intel_npu/thirdparty/CMakeLists.txt @@ -21,16 +21,16 @@ if(ENABLE_ZEROAPI_BACKEND) set(USE_Z7 ON) # Close spectre for ze loader add_compile_options("/Qspectre-") - else() - string(REPLACE "-Werror " " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - string(REPLACE "-Werror " " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + elseif(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) + string(REPLACE "-Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + string(REPLACE "-Werror" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \ - -Wno-error=undef \ - -Wno-error=unused-but-set-variable \ - -Wno-error=missing-declarations") + -Wno-undef \ + -Wno-unused-but-set-variable \ + -Wno-missing-declarations") if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.1) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \ - -Wno-error=stringop-truncation") + -Wno-stringop-truncation") endif() endif() set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)