Ubuntu 22.04 support (#11472)
* Ubuntu 22.04 support * Try to fix setuptools * Try to fix arm * Try to add more packages * Test 2 * test 3 * Turn dependnecies download off * Fix * Fix * Fix * Fix * Fix * test * Fix * restore eveything * Try to restore * Restore install_openvino_dependencies.sh * clean-up raspbian * New if conditions * Removed excess dependencies * COsmetic chnages * Removed autools * Removed libgkt-2 * Added HDLDL libs * Test * Removed some dependnecies * Better fixes * Removed some dependencies * Fixed compilation * Removed all extra
This commit is contained in:
@@ -278,7 +278,10 @@ if(ENABLE_OPENCV)
|
||||
elseif(LINUX_OS_NAME STREQUAL "Ubuntu 18.04" AND X86_64)
|
||||
set(OPENCV_SUFFIX "ubuntu18")
|
||||
set(OPENCV_HASH "db087dfd412eedb8161636ec083ada85ff278109948d1d62a06b0f52e1f04202")
|
||||
elseif((LINUX_OS_NAME STREQUAL "Ubuntu 20.04" OR LINUX_OS_NAME STREQUAL "LinuxMint 20.1") AND X86_64)
|
||||
elseif((LINUX_OS_NAME STREQUAL "Ubuntu 20.04" OR
|
||||
LINUX_OS_NAME STREQUAL "Ubuntu 21.10" OR
|
||||
LINUX_OS_NAME STREQUAL "Ubuntu 22.04" OR
|
||||
LINUX_OS_NAME STREQUAL "LinuxMint 20.1") AND X86_64)
|
||||
set(OPENCV_SUFFIX "ubuntu20")
|
||||
set(OPENCV_HASH "2fe7bbc40e1186eb8d099822038cae2821abf617ac7a16fadf98f377c723e268")
|
||||
elseif(NOT DEFINED OpenCV_DIR AND NOT DEFINED ENV{OpenCV_DIR})
|
||||
|
||||
@@ -113,9 +113,9 @@ if(ENABLE_TESTS)
|
||||
endif()
|
||||
|
||||
set(reqs "${OpenVINO_SOURCE_DIR}/src/core/tests/requirements_test_onnx.txt")
|
||||
add_custom_target(test_pip_prerequsites ALL
|
||||
add_custom_target(test_pip_prerequisites ALL
|
||||
"${PYTHON_EXECUTABLE}" -m pip install ${args} -r ${reqs}
|
||||
COMMENT "Install requirements_test.txt"
|
||||
COMMENT "Install requirements_test_onnx.txt"
|
||||
VERBATIM
|
||||
SOURCES ${reqs})
|
||||
endif()
|
||||
@@ -127,8 +127,8 @@ if(ENABLE_TESTS)
|
||||
${ie_onnx_import_out_files}
|
||||
${docs_onnx_out_files})
|
||||
|
||||
if(TARGET test_pip_prerequsites)
|
||||
add_dependencies(test_model_zoo test_pip_prerequsites)
|
||||
if(TARGET test_pip_prerequisites)
|
||||
add_dependencies(test_model_zoo test_pip_prerequisites)
|
||||
endif()
|
||||
|
||||
if (ENABLE_OV_PADDLE_FRONTEND AND ENABLE_OV_CORE_UNIT_TESTS)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
int main() {
|
||||
ov::Core core;
|
||||
std::shared_ptr<ov::Model> model;
|
||||
std::shared_ptr<ov::Model> model = core.read_model("model.xml");
|
||||
ov::CompiledModel compiled_model;
|
||||
|
||||
//! [create_infer_request]
|
||||
|
||||
@@ -108,7 +108,8 @@ void visualize_example(const std::shared_ptr<ov::Model>& m) {
|
||||
// ! [ov:visualize]
|
||||
|
||||
void model_inputs() {
|
||||
std::shared_ptr<ov::Model> model;
|
||||
ov::Core core;
|
||||
std::shared_ptr<ov::Model> model = core.read_model("model.xml");
|
||||
//! [all_inputs_ouputs]
|
||||
/* Take information about all topology inputs */
|
||||
auto inputs = model->inputs();
|
||||
|
||||
@@ -40,45 +40,48 @@ if [ -f /etc/lsb-release ]; then
|
||||
ca-certificates \
|
||||
git \
|
||||
git-lfs \
|
||||
libboost-regex-dev \
|
||||
$x86_64_specific_packages \
|
||||
libgtk2.0-dev \
|
||||
pkg-config \
|
||||
libgflags-dev \
|
||||
zlib1g-dev \
|
||||
unzip \
|
||||
automake \
|
||||
libtool \
|
||||
autoconf \
|
||||
shellcheck \
|
||||
patchelf \
|
||||
libenchant1c2a \
|
||||
`# openvino` \
|
||||
libtbb-dev \
|
||||
`# python` \
|
||||
python3-pip \
|
||||
python3-enchant \
|
||||
python3-setuptools \
|
||||
libcairo2-dev \
|
||||
libpango1.0-dev \
|
||||
libglib2.0-dev \
|
||||
libgtk2.0-dev \
|
||||
libswscale-dev \
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libgstreamer1.0-0 \
|
||||
gstreamer1.0-plugins-base \
|
||||
`# samples` \
|
||||
pkg-config \
|
||||
libgflags-dev \
|
||||
zlib1g-dev \
|
||||
`# hddl` \
|
||||
libudev1 \
|
||||
libusb-1.0-0 \
|
||||
`# myriad` \
|
||||
libusb-1.0-0-dev \
|
||||
libtbb-dev \
|
||||
libtinfo5 \
|
||||
libopenblas-dev
|
||||
if apt-cache search --names-only '^libjson-c2'| grep -q libjson-c2; then
|
||||
sudo -E apt-get install -y libjson-c2
|
||||
else
|
||||
sudo -E apt-get install -y libjson-c3
|
||||
`# cl_compiler` \
|
||||
libtinfo5
|
||||
# hddl
|
||||
if apt-cache search --names-only '^libjson-c3'| grep -q libjson-c3; then
|
||||
# ubuntu 18.04
|
||||
sudo -E apt-get install -y \
|
||||
libjson-c3 \
|
||||
libboost-filesystem1.65.1 \
|
||||
libboost-program-options1.65.1 \
|
||||
libboost-system1.65.1
|
||||
elif apt-cache search --names-only '^libjson-c4'| grep -q libjson-c4; then
|
||||
# ubuntu 20.04
|
||||
sudo -E apt-get install -y \
|
||||
libjson-c4 \
|
||||
libboost-filesystem1.71.0 \
|
||||
libboost-program-options1.71.0
|
||||
fi
|
||||
if apt-cache search --names-only '^libpng12-dev'| grep -q libpng12; then
|
||||
sudo -E apt-get install -y libpng12-dev
|
||||
else
|
||||
sudo -E apt-get install -y libpng-dev
|
||||
# for python3-enchant
|
||||
if apt-cache search --names-only 'libenchant1c2a'| grep -q libenchant1c2a; then
|
||||
sudo -E apt-get install -y libenchant1c2a
|
||||
fi
|
||||
# samples
|
||||
if apt-cache search --names-only '^nlohmann-json3-dev'| grep -q nlohmann-json3; then
|
||||
sudo -E apt-get install -y nlohmann-json3-dev
|
||||
else
|
||||
@@ -154,42 +157,21 @@ elif [ -f /etc/os-release ] && grep -q "raspbian" /etc/os-release; then
|
||||
sudo -E apt update
|
||||
sudo -E apt-get install -y \
|
||||
build-essential \
|
||||
curl \
|
||||
wget \
|
||||
libssl-dev \
|
||||
ca-certificates \
|
||||
git \
|
||||
libboost-regex-dev \
|
||||
libgtk2.0-dev \
|
||||
pkg-config \
|
||||
libgflags-dev \
|
||||
zlib1g-dev \
|
||||
nlohmann-json-dev \
|
||||
unzip \
|
||||
automake \
|
||||
libtool \
|
||||
autoconf \
|
||||
libcairo2-dev \
|
||||
libpango1.0-dev \
|
||||
libglib2.0-dev \
|
||||
libgtk2.0-dev \
|
||||
libswscale-dev \
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libgstreamer1.0-0 \
|
||||
gstreamer1.0-plugins-base \
|
||||
libusb-1.0-0-dev \
|
||||
libopenblas-dev
|
||||
if apt-cache search --names-only '^libpng12-dev'| grep -q libpng12; then
|
||||
sudo -E apt-get install -y libpng12-dev
|
||||
else
|
||||
sudo -E apt-get install -y libpng-dev
|
||||
fi
|
||||
libusb-1.0-0-dev
|
||||
else
|
||||
echo "Unknown OS, please install build dependencies manually"
|
||||
fi
|
||||
|
||||
# cmake 3.13 or higher is required to build OpenVINO
|
||||
# cmake 3.17 or higher is required to build OpenVINO
|
||||
current_cmake_version=$(cmake --version | sed -ne 's/[^0-9]*\(\([0-9]\.\)\{0,4\}[0-9][^.]\).*/\1/p')
|
||||
required_cmake_ver=3.17
|
||||
if [ ! "$(printf '%s\n' "$required_cmake_ver" "$current_cmake_version" | sort -V | head -n1)" = "$required_cmake_ver" ]; then
|
||||
|
||||
@@ -55,7 +55,7 @@ fi
|
||||
# Selftest
|
||||
|
||||
if [ -n "$selftest" ] ; then
|
||||
for image in ubuntu:18.04 ubuntu:20.04 redhat/ubi8 ; do
|
||||
for image in ubuntu:18.04 ubuntu:20.04 ubuntu:21.10 ubuntu:22.04 redhat/ubi8 ; do
|
||||
for opt in "-h" "-p" "-e -p" "-n" "-n -e" "-y" "-y -e" ; do
|
||||
echo "||"
|
||||
echo "|| Test $image / '$opt'"
|
||||
@@ -87,7 +87,7 @@ if [ "$os" == "auto" ] ; then
|
||||
os="rhel8"
|
||||
fi
|
||||
case $os in
|
||||
rhel8|ubuntu18.04|ubuntu20.04) [ -z "$print" ] && echo "Detected OS: ${os}" ;;
|
||||
rhel8|ubuntu18.04|ubuntu20.04|ubuntu21.10|ubuntu22.04) [ -z "$print" ] && echo "Detected OS: ${os}" ;;
|
||||
*) echo "Unsupported OS: ${os:-detection failed}" >&2 ; exit 1 ;;
|
||||
esac
|
||||
fi
|
||||
@@ -100,7 +100,7 @@ extra_repos=()
|
||||
if [ "$os" == "ubuntu18.04" ] ; then
|
||||
|
||||
pkgs_opencv_req=(libgtk-3-0 libgl1)
|
||||
pkgs_python=(python3 python3-dev python3-venv python3-setuptools python3-pip)
|
||||
pkgs_python=(python3 python3-venv python3-pip)
|
||||
pkgs_dev=(cmake pkg-config libgflags-dev zlib1g-dev nlohmann-json-dev g++ gcc libc6-dev make curl sudo)
|
||||
pkgs_myriad=(libusb-1.0-0)
|
||||
pkgs_cl_compiler=(libtinfo5)
|
||||
@@ -118,10 +118,10 @@ if [ "$os" == "ubuntu18.04" ] ; then
|
||||
libswscale4
|
||||
)
|
||||
|
||||
elif [ "$os" == "ubuntu20.04" ] ; then
|
||||
elif [ "$os" == "ubuntu20.04" ] || [ "$os" == "ubuntu21.10" ] || [ "$os" == "ubuntu22.04" ] ; then
|
||||
|
||||
pkgs_opencv_req=(libgtk-3-0 libgl1)
|
||||
pkgs_python=(python3 python3-dev python3-venv python3-setuptools python3-pip)
|
||||
pkgs_python=(python3 python3-venv python3-pip)
|
||||
pkgs_dev=(cmake pkg-config g++ gcc libc6-dev libgflags-dev zlib1g-dev nlohmann-json3-dev make curl sudo)
|
||||
pkgs_myriad=(libusb-1.0-0)
|
||||
pkgs_cl_compiler=(libtinfo5)
|
||||
@@ -133,16 +133,19 @@ elif [ "$os" == "ubuntu20.04" ] ; then
|
||||
gstreamer1.0-tools
|
||||
libavcodec58
|
||||
libavformat58
|
||||
libavresample4
|
||||
libavutil56
|
||||
libgstreamer1.0-0
|
||||
libswscale5
|
||||
)
|
||||
|
||||
if [ "$os" == "ubuntu20.04" ] ; then
|
||||
pkgs_opencv_opt=(${pkgs_opencv_opt[@]} libavresample4)
|
||||
fi
|
||||
|
||||
elif [ "$os" == "rhel8" ] ; then
|
||||
|
||||
pkgs_opencv_req=(gtk3)
|
||||
pkgs_python=(python3 python3-devel python3-setuptools python3-pip)
|
||||
pkgs_python=(python3 python3-pip)
|
||||
pkgs_dev=(gcc gcc-c++ make glibc libstdc++ libgcc cmake pkg-config gflags-devel.i686 zlib-devel.i686 curl sudo)
|
||||
pkgs_myriad=()
|
||||
pkgs_opencv_opt=(
|
||||
@@ -193,13 +196,14 @@ fi
|
||||
|
||||
iopt=
|
||||
|
||||
if [ "$os" == "ubuntu18.04" ] || [ "$os" == "ubuntu20.04" ] ; then
|
||||
if [ "$os" == "ubuntu18.04" ] || [ "$os" == "ubuntu20.04" ] || \
|
||||
[ "$os" == "ubuntu21.10" ] || [ "$os" == "ubuntu22.04" ] ; then
|
||||
|
||||
[ -z "$interactive" ] && iopt="-y"
|
||||
[ -n "$dry" ] && iopt="--dry-run"
|
||||
[ -n "$keepcache" ] && rm -f /etc/apt/apt.conf.d/docker-clean
|
||||
|
||||
apt-get update && apt-get install --no-install-recommends $iopt ${pkgs[@]}
|
||||
apt-get update && apt-get install -y --no-install-recommends $iopt ${pkgs[@]}
|
||||
|
||||
elif [ "$os" == "rhel8" ] ; then
|
||||
|
||||
|
||||
@@ -56,12 +56,23 @@ size_t bfloat16::size() const {
|
||||
return sizeof(m_value);
|
||||
}
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ == 11
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wuninitialized"
|
||||
#endif
|
||||
|
||||
bfloat16::operator float() const {
|
||||
uint32_t tmp = (static_cast<uint32_t>(m_value) << 16);
|
||||
const float* f = reinterpret_cast<const float*>(&tmp);
|
||||
uint32_t tmp = 0;
|
||||
uint32_t* ptmp = &tmp;
|
||||
*ptmp = (static_cast<uint32_t>(m_value) << 16);
|
||||
const float* f = reinterpret_cast<const float*>(ptmp);
|
||||
return *f;
|
||||
}
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ == 11
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
uint16_t bfloat16::to_bits() const {
|
||||
return m_value;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ QueryNetworkResult Engine::QueryNetwork(
|
||||
consoleOutput());
|
||||
std::set<std::string> namesToExclude;
|
||||
const auto supportedNetworks = vpu::FrontEnd::checkSupportedNetworks(network, namesToExclude);
|
||||
for (const auto supportedNetwork : supportedNetworks) {
|
||||
for (const auto & supportedNetwork : supportedNetworks) {
|
||||
const auto supportedLayers = getSupportedLayers(
|
||||
supportedNetwork,
|
||||
parsedConfigCopy,
|
||||
|
||||
@@ -702,6 +702,7 @@ namespace Bf16TestUtils {
|
||||
#if defined __GNUC__
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
# pragma GCC diagnostic ignored "-Wuninitialized"
|
||||
#endif
|
||||
|
||||
inline float reducePrecisionBitwise(const float in) {
|
||||
|
||||
@@ -29,7 +29,7 @@ struct MVNParams {
|
||||
size_t N;
|
||||
size_t C;
|
||||
size_t H;
|
||||
size_t W;
|
||||
size_t W = 0;
|
||||
size_t num_parts;
|
||||
float eps;
|
||||
ngraph::op::MVNEpsMode eps_mode;
|
||||
|
||||
5
thirdparty/CMakeLists.txt
vendored
5
thirdparty/CMakeLists.txt
vendored
@@ -74,6 +74,11 @@ target_include_directories(ocv_hal INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/ocv")
|
||||
|
||||
add_subdirectory(ade EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(fluid/modules/gapi EXCLUDE_FROM_ALL)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11 AND NOT OV_COMPILER_IS_CLANG)
|
||||
target_compile_options(fluid PRIVATE "-Wno-maybe-uninitialized")
|
||||
endif()
|
||||
|
||||
set_target_properties(ade fluid PROPERTIES FOLDER thirdparty)
|
||||
openvino_developer_export_targets(COMPONENT openvino_common TARGETS ade fluid)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user