Skip to content
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

Supported Ubuntu 24.04 #23905

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/workflows/android_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,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
Expand Down
2 changes: 1 addition & 1 deletion cmake/packaging/debian.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,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")

Expand Down
2 changes: 1 addition & 1 deletion install_build_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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` \
Expand Down
14 changes: 8 additions & 6 deletions scripts/install_dependencies/install_openvino_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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" ] ||
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class GraphIteratorFlatBuffer {
#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
rkazants marked this conversation as resolved.
Show resolved Hide resolved
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)) {
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/intel_cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

@lmielick lmielick Apr 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very important warning. Can we fix instead?

endif()
endif()

if (AARCH64 AND NOT APPLE AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.2)
Expand Down
9 changes: 7 additions & 2 deletions src/plugins/intel_cpu/src/compiled_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,11 @@ ov::Any CompiledModel::get_property(const std::string& name) const {
};

if (name == ov::supported_properties) {
return std::vector<ov::PropertyName>{
std::vector<ov::PropertyName> 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()),
Expand All @@ -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) {
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/intel_cpu/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ov::PropertyName> 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()),
Expand All @@ -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<ov::PropertyName> supportedProperties;
supportedProperties.reserve(roProperties.size() + rwProperties.size());
supportedProperties.insert(supportedProperties.end(), roProperties.begin(), roProperties.end());
Expand Down
1 change: 1 addition & 0 deletions src/plugins/intel_cpu/thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
14 changes: 7 additions & 7 deletions src/plugins/intel_npu/thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading