Added older pugixml version support (#14260)
* Added pugixml finding w/o cmake, pkg-config * Fixed findings * Pugixml * Removed sudo from install_build_dependencies.sh * Fixed compilation with old pugixml * Fixed Azure pipelines * Updated clang-format step * Add new approach for pugixml find to OpenVINO Developer package * Fixed compilation with older pugixml * Added openssl-devel for cmake build * Fixed finding pugixml in developer package
This commit is contained in:
1 parent
6bcdaa782a
commit
79c6968024
21 files changed
+222
-166
No files matched your search
@@ -107,7 +107,7 @@ jobs:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
$(OPENVINO_REPO_DIR)/install_build_dependencies.sh
|
||||
sudo -E $(OPENVINO_REPO_DIR)/install_build_dependencies.sh
|
||||
# Move into contrib install_build_dependencies.sh
|
||||
sudo apt --assume-yes install scons crossbuild-essential-arm64 libprotoc-dev protobuf-compiler default-jdk
|
||||
# Speed up build
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@ jobs:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
$(REPO_DIR)/install_build_dependencies.sh
|
||||
sudo -E $(REPO_DIR)/install_build_dependencies.sh
|
||||
# Move jdk into contrib
|
||||
# 'clang' compiler is to check that samples can be built using it
|
||||
sudo apt --assume-yes install openjdk-11-jdk libbz2-dev clang
|
||||
|
||||
@@ -127,7 +127,7 @@ jobs:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
$(OPENVINO_REPO_DIR)/install_build_dependencies.sh
|
||||
sudo -E $(OPENVINO_REPO_DIR)/install_build_dependencies.sh
|
||||
export CCACHE_TEMPDIR=$(TMP_DIR)/ccache
|
||||
export CCACHE_BASEDIR=$(Pipeline.Workspace)
|
||||
export CCACHE_MAXSIZE=50G
|
||||
|
||||
@@ -85,7 +85,7 @@ jobs:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
$(REPO_DIR)/install_build_dependencies.sh
|
||||
sudo -E $(REPO_DIR)/install_build_dependencies.sh
|
||||
wget https://www.python.org/ftp/python/3.10.6/Python-3.10.6.tgz
|
||||
tar -xzf Python-3.10.6.tgz
|
||||
cd Python-3.10.6 || exit
|
||||
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
$(REPO_DIR)/install_build_dependencies.sh
|
||||
sudo -E $(REPO_DIR)/install_build_dependencies.sh
|
||||
# Move jdk into contrib
|
||||
sudo apt --assume-yes install openjdk-11-jdk
|
||||
# Speed up build
|
||||
|
||||
@@ -121,7 +121,7 @@ jobs:
|
||||
sudo docker run --volume $(REPO_DIR)/../:/root/repos --volume $(WORK_DIR):/root/w
|
||||
openvino.azurecr.io/openvino_ci/cuda-ubuntu2004:2022.1
|
||||
bash -c "
|
||||
/root/repos/openvino/install_build_dependencies.sh &&
|
||||
sudo -E /root/repos/openvino/install_build_dependencies.sh &&
|
||||
python3 -m pip install -r /root/repos/openvino/src/bindings/python/requirements.txt &&
|
||||
cd /root/w/build &&
|
||||
cmake -GNinja
|
||||
|
||||
@@ -118,7 +118,7 @@ jobs:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
$(REPO_DIR)/install_build_dependencies.sh
|
||||
sudo -E $(REPO_DIR)/install_build_dependencies.sh
|
||||
# Move jdk into contrib
|
||||
# 'clang' compiler is to check that samples can be built using it
|
||||
sudo apt --assume-yes install openjdk-11-jdk clang
|
||||
|
||||
@@ -92,7 +92,7 @@ jobs:
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
$(REPO_DIR)/install_build_dependencies.sh
|
||||
sudo -E $(REPO_DIR)/install_build_dependencies.sh
|
||||
wget https://www.python.org/ftp/python/"$PYTHON_VERSION"/Python-"$PYTHON_VERSION".tgz
|
||||
tar -xzf Python-"$PYTHON_VERSION".tgz
|
||||
cd Python-"$PYTHON_VERSION" || exit
|
||||
|
||||
@@ -260,8 +260,8 @@ if(ENABLE_OPENCV)
|
||||
CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9") AND X86_64)
|
||||
set(OPENCV_SUFFIX "centos7")
|
||||
set(OPENCV_HASH "5fa76985c84fe7c64531682ef0b272510c51ac0d0565622514edf1c88b33404a")
|
||||
elseif((LINUX_OS_NAME MATCHES "CentOS 8" OR
|
||||
LINUX_OS_NAME MATCHES "CentOS 9") AND X86_64)
|
||||
elseif((LINUX_OS_NAME STREQUAL "CentOS 8" OR
|
||||
LINUX_OS_NAME STREQUAL "CentOS 9") AND X86_64)
|
||||
set(OPENCV_SUFFIX "centos8")
|
||||
set(OPENCV_HASH "db087dfd412eedb8161636ec083ada85ff278109948d1d62a06b0f52e1f04202")
|
||||
elseif(LINUX_OS_NAME STREQUAL "Ubuntu 16.04" AND X86_64)
|
||||
|
||||
@@ -3,22 +3,23 @@
|
||||
#
|
||||
|
||||
if(ENABLE_CLANG_FORMAT)
|
||||
set(CLANG_FORMAT_FILENAME clang-format-9 clang-format)
|
||||
set(clang_format_required_version 9)
|
||||
set(CLANG_FORMAT_FILENAME clang-format-${clang_format_required_version} clang-format)
|
||||
find_host_program(CLANG_FORMAT NAMES ${CLANG_FORMAT_FILENAME} PATHS ENV PATH)
|
||||
if(CLANG_FORMAT)
|
||||
execute_process(COMMAND ${CLANG_FORMAT} ${CMAKE_CURRENT_SOURCE_DIR} ARGS --version OUTPUT_VARIABLE CLANG_VERSION)
|
||||
if(NOT CLANG_VERSION)
|
||||
message(WARNING "Supported clang-format version is 9!")
|
||||
message(WARNING "Supported clang-format version is ${clang_format_required_version}!")
|
||||
set(ENABLE_CLANG_FORMAT OFF)
|
||||
else()
|
||||
string(REGEX REPLACE "[^0-9]+([0-9]+)\\..*" "\\1" CLANG_FORMAT_MAJOR_VERSION ${CLANG_VERSION})
|
||||
if(NOT CLANG_FORMAT_MAJOR_VERSION EQUAL 9)
|
||||
if(NOT CLANG_FORMAT_MAJOR_VERSION EQUAL clang_format_required_version)
|
||||
message(WARNING "Supported clang-format version is 9! Provided version ${CLANG_FORMAT_MAJOR_VERSION}")
|
||||
set(ENABLE_CLANG_FORMAT OFF)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
message(WARNING "Supported clang-format version is not found!")
|
||||
message(WARNING "Supported clang-format-${clang_format_required_version} is not found!")
|
||||
set(ENABLE_CLANG_FORMAT OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -320,13 +320,18 @@ macro(ov_cpack_settings)
|
||||
|
||||
set(samples_build_deps "cmake, g++, gcc, libc6-dev, make")
|
||||
set(samples_build_deps_suggest "libopencv-core-dev, libopencv-imgproc-dev, libopencv-imgcodecs-dev")
|
||||
if(LINUX_OS_NAME MATCHES "^(Ubuntu 18.04|Debian 9)$")
|
||||
set(json_library "nlohmann-json-dev")
|
||||
else()
|
||||
set(json_library "nlohmann-json3-dev")
|
||||
endif()
|
||||
|
||||
# c_samples / cpp_samples
|
||||
set(CPACK_COMPONENT_SAMPLES_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit C / C++ Samples")
|
||||
set(CPACK_COMPONENT_SAMPLES_DEPENDS "${OV_CPACK_COMP_CORE_DEV}")
|
||||
set(CPACK_DEBIAN_SAMPLES_PACKAGE_NAME "openvino-samples-${cpack_name_ver}")
|
||||
set(CPACK_DEBIAN_SAMPLES_PACKAGE_SUGGESTS "${samples_build_deps_suggest}, ${all_plugins_suggest}")
|
||||
set(CPACK_DEBIAN_SAMPLES_PACKAGE_DEPENDS "libgflags-dev, nlohmann-json3-dev, zlib1g-dev")
|
||||
set(CPACK_DEBIAN_SAMPLES_PACKAGE_DEPENDS "libgflags-dev, zlib1g-dev, ${json_library}")
|
||||
# can be skipped with --no-install-recommends
|
||||
set(CPACK_DEBIAN_SAMPLES_PACKAGE_RECOMMENDS "${samples_build_deps}")
|
||||
set(CPACK_DEBIAN_SAMPLES_PACKAGE_ARCHITECTURE "all")
|
||||
|
||||
@@ -91,9 +91,10 @@ endif()
|
||||
|
||||
if(ENABLE_SYSTEM_PUGIXML)
|
||||
set(_ov_pugixml_pkgconfig_interface "@pugixml_FOUND@")
|
||||
set(_ov_pugixml_cmake_interface "@PugiXML_FOUND@")
|
||||
if(_ov_pugixml_pkgconfig_interface)
|
||||
find_dependency(PkgConfig)
|
||||
else()
|
||||
elseif(_ov_pugixml_cmake_interface)
|
||||
find_dependency(PugiXML)
|
||||
endif()
|
||||
if(PugiXML_FOUND)
|
||||
@@ -127,6 +128,17 @@ if(ENABLE_SYSTEM_PUGIXML)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# debian 9 case: no cmake, no pkg-config files
|
||||
if(NOT TARGET IE::pugixml)
|
||||
find_library(PUGIXML_LIBRARY NAMES pugixml DOC "Path to pugixml library")
|
||||
if(PUGIXML_LIBRARY)
|
||||
add_library(IE::pugixml INTERFACE IMPORTED GLOBAL)
|
||||
set_target_properties(IE::pugixml PROPERTIES INTERFACE_LINK_LIBRARIES "${PUGIXML_LIBRARY}")
|
||||
else()
|
||||
message(FATAL_ERROR "Failed to find system pugixml in OpenVINO Developer Package")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# inherit OpenCV from main IE project if enabled
|
||||
|
||||
@@ -63,9 +63,10 @@ endforeach()
|
||||
|
||||
if(ENABLE_SYSTEM_PUGIXML)
|
||||
set(_ov_pugixml_pkgconfig_interface "@pugixml_FOUND@")
|
||||
set(_ov_pugixml_cmake_interface "@PugiXML_FOUND@")
|
||||
if(_ov_pugixml_pkgconfig_interface)
|
||||
find_dependency(PkgConfig)
|
||||
else()
|
||||
elseif(_ov_pugixml_cmake_interface)
|
||||
find_dependency(PugiXML)
|
||||
endif()
|
||||
if(PugiXML_FOUND)
|
||||
@@ -99,6 +100,17 @@ if(ENABLE_SYSTEM_PUGIXML)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# debian 9 case: no cmake, no pkg-config files
|
||||
if(NOT TARGET openvino::pugixml)
|
||||
find_library(PUGIXML_LIBRARY NAMES pugixml DOC "Path to pugixml library")
|
||||
if(PUGIXML_LIBRARY)
|
||||
add_library(openvino::pugixml INTERFACE IMPORTED GLOBAL)
|
||||
set_target_properties(openvino::pugixml PROPERTIES INTERFACE_LINK_LIBRARIES "${PUGIXML_LIBRARY}")
|
||||
else()
|
||||
message(FATAL_ERROR "Failed to find system pugixml in OpenVINO Developer Package")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# inherit OpenCV from main OpenVINO project if enabled
|
||||
|
||||
+108
-97
@@ -19,8 +19,14 @@ yes_or_no() {
|
||||
done
|
||||
}
|
||||
|
||||
if [ $EUID -ne 0 ]; then
|
||||
echo "ERROR: this script must be run as root to install 3rd party packages." >&2
|
||||
echo "Please try again with \"sudo -E $0\", or as root." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# install dependencies
|
||||
if [ -f /etc/lsb-release ]; then
|
||||
if [ -f /etc/lsb-release ] || [ -f /etc/debian_version ] ; then
|
||||
# Ubuntu
|
||||
host_cpu=$(uname -m)
|
||||
if [ "$host_cpu" = "x86_64" ]; then
|
||||
@@ -33,123 +39,128 @@ if [ -f /etc/lsb-release ]; then
|
||||
cmake_packages=(cmake)
|
||||
fi
|
||||
|
||||
sudo -E apt update
|
||||
sudo -E apt-get install -y \
|
||||
build-essential \
|
||||
"${cmake_packages[@]}" \
|
||||
ccache \
|
||||
curl \
|
||||
wget \
|
||||
libssl-dev \
|
||||
ca-certificates \
|
||||
git \
|
||||
git-lfs \
|
||||
"${x86_64_specific_packages[@]}" \
|
||||
libgtk2.0-dev \
|
||||
unzip \
|
||||
shellcheck \
|
||||
patchelf \
|
||||
fdupes \
|
||||
lintian \
|
||||
file \
|
||||
gzip \
|
||||
`# openvino` \
|
||||
libtbb-dev \
|
||||
libpugixml-dev \
|
||||
`# gpu plugin extensions` \
|
||||
libva-dev \
|
||||
`# python` \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
python3-enchant \
|
||||
python3-setuptools \
|
||||
libpython3-dev \
|
||||
`# samples` \
|
||||
pkg-config \
|
||||
libgflags-dev \
|
||||
zlib1g-dev \
|
||||
`# hddl` \
|
||||
libudev1 \
|
||||
libusb-1.0-0 \
|
||||
`# myriad` \
|
||||
libusb-1.0-0-dev \
|
||||
`# cl_compiler` \
|
||||
libtinfo5
|
||||
apt update
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
"${cmake_packages[@]}" \
|
||||
ccache \
|
||||
curl \
|
||||
wget \
|
||||
libssl-dev \
|
||||
ca-certificates \
|
||||
git \
|
||||
"${x86_64_specific_packages[@]}" \
|
||||
libgtk2.0-dev \
|
||||
unzip \
|
||||
shellcheck \
|
||||
patchelf \
|
||||
fdupes \
|
||||
lintian \
|
||||
file \
|
||||
gzip \
|
||||
`# openvino` \
|
||||
libtbb-dev \
|
||||
libpugixml-dev \
|
||||
`# gpu plugin extensions` \
|
||||
libva-dev \
|
||||
`# python` \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
python3-enchant \
|
||||
python3-setuptools \
|
||||
libpython3-dev \
|
||||
`# samples` \
|
||||
pkg-config \
|
||||
libgflags-dev \
|
||||
zlib1g-dev \
|
||||
`# hddl` \
|
||||
libudev1 \
|
||||
libusb-1.0-0 \
|
||||
`# myriad` \
|
||||
libusb-1.0-0-dev \
|
||||
`# cl_compiler` \
|
||||
libtinfo5
|
||||
# git-lfs is not available on debian9
|
||||
if apt-cache search --names-only '^git-lfs'| grep -q git-lfs; then
|
||||
apt-get install -y git-lfs
|
||||
fi
|
||||
# hddl
|
||||
if apt-cache search --names-only '^libjson-c3'| grep -q libjson-c3; then
|
||||
if apt-cache search --names-only '^libboost-filesystem1.65.1' | grep -q libboost-filesystem1.65.1 ; then
|
||||
# ubuntu 18.04
|
||||
sudo -E apt-get install -y \
|
||||
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 \
|
||||
apt-get install -y \
|
||||
libjson-c4 \
|
||||
libboost-filesystem1.71.0 \
|
||||
libboost-program-options1.71.0
|
||||
fi
|
||||
# for python3-enchant
|
||||
if apt-cache search --names-only 'libenchant1c2a'| grep -q libenchant1c2a; then
|
||||
sudo -E apt-get install -y libenchant1c2a
|
||||
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
|
||||
apt-get install -y nlohmann-json3-dev
|
||||
else
|
||||
sudo -E apt-get install -y nlohmann-json-dev
|
||||
apt-get install -y nlohmann-json-dev
|
||||
fi
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
# RHEL 8 / CentOS 7
|
||||
sudo -E yum install -y centos-release-scl epel-release
|
||||
sudo -E yum install -y \
|
||||
wget \
|
||||
curl \
|
||||
cmake3 \
|
||||
tar \
|
||||
xz \
|
||||
p7zip \
|
||||
ccache \
|
||||
rpm-build \
|
||||
rpmlint \
|
||||
ShellCheck \
|
||||
unzip \
|
||||
which \
|
||||
ca-certificates \
|
||||
git \
|
||||
git-lfs \
|
||||
boost-devel \
|
||||
python3-pip \
|
||||
python3-devel \
|
||||
libtool \
|
||||
tbb-devel \
|
||||
pugixml-devel \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
make \
|
||||
patchelf \
|
||||
fdupes \
|
||||
libusbx-devel \
|
||||
file \
|
||||
zlib-devel \
|
||||
gflags-devel \
|
||||
libva-devel
|
||||
yum update
|
||||
yum install -y centos-release-scl epel-release
|
||||
yum install -y \
|
||||
wget \
|
||||
curl \
|
||||
cmake3 \
|
||||
tar \
|
||||
xz \
|
||||
p7zip \
|
||||
ccache \
|
||||
openssl-devel \
|
||||
rpm-build \
|
||||
rpmlint \
|
||||
ShellCheck \
|
||||
unzip \
|
||||
which \
|
||||
ca-certificates \
|
||||
git \
|
||||
git-lfs \
|
||||
boost-devel \
|
||||
python3-pip \
|
||||
python3-devel \
|
||||
libtool \
|
||||
tbb-devel \
|
||||
pugixml-devel \
|
||||
gcc \
|
||||
gcc-c++ \
|
||||
make \
|
||||
patchelf \
|
||||
fdupes \
|
||||
libusbx-devel \
|
||||
file \
|
||||
zlib-devel \
|
||||
gflags-devel \
|
||||
libva-devel
|
||||
elif [ -f /etc/os-release ] && grep -q "raspbian" /etc/os-release; then
|
||||
# Raspbian
|
||||
sudo -E apt update
|
||||
sudo -E apt-get install -y \
|
||||
build-essential \
|
||||
wget \
|
||||
libssl-dev \
|
||||
ca-certificates \
|
||||
git \
|
||||
pkg-config \
|
||||
libgflags-dev \
|
||||
zlib1g-dev \
|
||||
nlohmann-json-dev \
|
||||
unzip \
|
||||
libusb-1.0-0-dev
|
||||
apt update
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
wget \
|
||||
libssl-dev \
|
||||
ca-certificates \
|
||||
git \
|
||||
pkg-config \
|
||||
libgflags-dev \
|
||||
zlib1g-dev \
|
||||
nlohmann-json-dev \
|
||||
unzip \
|
||||
libusb-1.0-0-dev
|
||||
else
|
||||
echo "Unknown OS, please install build dependencies manually"
|
||||
fi
|
||||
@@ -161,6 +172,6 @@ if [ ! "$(printf '%s\n' "$required_cmake_ver" "$current_cmake_ver" | sort -V | h
|
||||
installed_cmake_ver=3.23.2
|
||||
wget "https://github.com/Kitware/CMake/releases/download/v${installed_cmake_ver}/cmake-${installed_cmake_ver}.tar.gz"
|
||||
tar xf cmake-${installed_cmake_ver}.tar.gz
|
||||
(cd cmake-${installed_cmake_ver} && ./bootstrap --parallel="$(nproc --all)" && make --jobs="$(nproc --all)" && sudo make install)
|
||||
rm -rf cmake-${installed_cmake_ver} cmake-${installed_cmake_ver}.tar.gz
|
||||
(cd cmake-${installed_cmake_ver} && ./bootstrap --parallel="$(nproc --all)" && make --jobs="$(nproc --all)" && make install)
|
||||
rm -rf "cmake-${installed_cmake_ver}" "cmake-${installed_cmake_ver}.tar.gz"
|
||||
fi
|
||||
@@ -66,7 +66,7 @@ function(ov_check_python_build_conditions)
|
||||
# check pyopenvino requirements to OV 2.0 API
|
||||
ov_check_pip_packages(REQUIREMENTS_FILE ${ov_python_req}
|
||||
RESULT_VAR ov_python_req_FOUND
|
||||
WARNING_MESSAGE "install python3 -m install -r ${ov_python_req} for OV API 2.0 requirements"
|
||||
WARNING_MESSAGE "install python3 -m pip install -r ${ov_python_req} for OV API 2.0 requirements"
|
||||
MESSAGE_MODE TRACE)
|
||||
# ov_python_req are not mandatory for build
|
||||
set(ov_python_req_FOUND ON)
|
||||
|
||||
@@ -265,7 +265,7 @@ std::size_t FillXmlDoc(const InferenceEngine::CNNNetwork& network, pugi::xml_doc
|
||||
// no need to print this information for executable graph information serialization because it is not IR.
|
||||
if (!execGraphInfoSerialization) {
|
||||
netXml.append_attribute("version").set_value("6");
|
||||
netXml.append_attribute("batch").set_value(network.getBatchSize());
|
||||
netXml.append_attribute("batch").set_value(static_cast<unsigned long long>(network.getBatchSize()));
|
||||
}
|
||||
|
||||
pugi::xml_node layers = netXml.append_child("layers");
|
||||
@@ -285,7 +285,7 @@ std::size_t FillXmlDoc(const InferenceEngine::CNNNetwork& network, pugi::xml_doc
|
||||
layer.append_attribute("name").set_value(node->name.c_str());
|
||||
layer.append_attribute("type").set_value(node->type.c_str());
|
||||
layer.append_attribute("precision").set_value(precision.name());
|
||||
layer.append_attribute("id").set_value(i);
|
||||
layer.append_attribute("id").set_value(static_cast<unsigned long long>(i));
|
||||
|
||||
if (!execGraphInfoSerialization) {
|
||||
UpdateStdLayerParams(node);
|
||||
@@ -307,10 +307,10 @@ std::size_t FillXmlDoc(const InferenceEngine::CNNNetwork& network, pugi::xml_doc
|
||||
const DataPtr d = node->insData[iport].lock();
|
||||
pugi::xml_node port = input.append_child("port");
|
||||
|
||||
port.append_attribute("id").set_value(iport);
|
||||
port.append_attribute("id").set_value(static_cast<unsigned long long>(iport));
|
||||
|
||||
for (auto dim : d->getDims()) {
|
||||
port.append_child("dim").text().set(dim);
|
||||
port.append_child("dim").text().set(static_cast<unsigned long long>(dim));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -319,11 +319,11 @@ std::size_t FillXmlDoc(const InferenceEngine::CNNNetwork& network, pugi::xml_doc
|
||||
for (size_t oport = 0; oport < node->outData.size(); oport++) {
|
||||
pugi::xml_node port = output.append_child("port");
|
||||
|
||||
port.append_attribute("id").set_value(node->insData.size() + oport);
|
||||
port.append_attribute("id").set_value(static_cast<unsigned long long>(node->insData.size() + oport));
|
||||
port.append_attribute("precision").set_value(node->outData[oport]->getPrecision().name());
|
||||
|
||||
for (const auto dim : node->outData[oport]->getDims()) {
|
||||
port.append_child("dim").text().set(dim);
|
||||
port.append_child("dim").text().set(static_cast<unsigned long long>(dim));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -333,8 +333,8 @@ std::size_t FillXmlDoc(const InferenceEngine::CNNNetwork& network, pugi::xml_doc
|
||||
if (!dataIt.second) continue;
|
||||
size_t dataSize = dataIt.second->byteSize();
|
||||
pugi::xml_node data = blobsNode.append_child(dataIt.first.c_str());
|
||||
data.append_attribute("offset").set_value(dataOffset);
|
||||
data.append_attribute("size").set_value(dataSize);
|
||||
data.append_attribute("offset").set_value(static_cast<unsigned long long>(dataOffset));
|
||||
data.append_attribute("size").set_value(static_cast<unsigned long long>(dataSize));
|
||||
data.append_attribute("precision").set_value(dataIt.second->getTensorDesc().getPrecision().name());
|
||||
|
||||
dataOffset += dataSize;
|
||||
@@ -364,11 +364,11 @@ std::size_t FillXmlDoc(const InferenceEngine::CNNNetwork& network, pugi::xml_doc
|
||||
<< inputTo.first << "during serialization of IR";
|
||||
}
|
||||
pugi::xml_node edge = edges.append_child("edge");
|
||||
edge.append_attribute("from-layer").set_value(itFrom->second);
|
||||
edge.append_attribute("from-port").set_value(oport + node->insData.size());
|
||||
edge.append_attribute("from-layer").set_value(static_cast<unsigned long long>(itFrom->second));
|
||||
edge.append_attribute("from-port").set_value(static_cast<unsigned long long>(oport + node->insData.size()));
|
||||
|
||||
edge.append_attribute("to-layer").set_value(itTo->second);
|
||||
edge.append_attribute("to-port").set_value(iport);
|
||||
edge.append_attribute("to-layer").set_value(static_cast<unsigned long long>(itTo->second));
|
||||
edge.append_attribute("to-port").set_value(static_cast<unsigned long long>(iport));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
|
||||
void on_adapter(const std::string& name, ngraph::ValueAccessor<int64_t>& adapter) override {
|
||||
check_attribute_name(name);
|
||||
m_node.append_attribute(name.c_str()).set_value(adapter.get());
|
||||
m_node.append_attribute(name.c_str()).set_value(static_cast<long long>(adapter.get()));
|
||||
}
|
||||
|
||||
void on_adapter(const std::string& name, ngraph::ValueAccessor<double>& adapter) override {
|
||||
@@ -275,17 +275,18 @@ class XmlSerializer : public ngraph::AttributeVisitor {
|
||||
|
||||
for (const auto& input_description : input_descriptions) {
|
||||
pugi::xml_node input = port_map.append_child("input");
|
||||
input.append_attribute("external_port_id").set_value(input_description->m_input_index);
|
||||
input.append_attribute("external_port_id")
|
||||
.set_value(static_cast<unsigned long long>(input_description->m_input_index));
|
||||
input.append_attribute("internal_layer_id")
|
||||
.set_value(parameter_mapping[input_description->m_body_parameter_index].c_str());
|
||||
|
||||
if (auto slice_input =
|
||||
ov::as_type_ptr<ngraph::op::util::SubGraphOp::SliceInputDescription>(input_description)) {
|
||||
input.prepend_attribute("axis").set_value(slice_input->m_axis);
|
||||
input.append_attribute("start").set_value(slice_input->m_start);
|
||||
input.append_attribute("end").set_value(slice_input->m_end);
|
||||
input.append_attribute("stride").set_value(slice_input->m_stride);
|
||||
input.append_attribute("part_size").set_value(slice_input->m_part_size);
|
||||
input.prepend_attribute("axis").set_value(static_cast<long long>(slice_input->m_axis));
|
||||
input.append_attribute("start").set_value(static_cast<long long>(slice_input->m_start));
|
||||
input.append_attribute("end").set_value(static_cast<long long>(slice_input->m_end));
|
||||
input.append_attribute("stride").set_value(static_cast<long long>(slice_input->m_stride));
|
||||
input.append_attribute("part_size").set_value(static_cast<long long>(slice_input->m_part_size));
|
||||
} else if (auto merged_input =
|
||||
ov::as_type_ptr<ngraph::op::util::SubGraphOp::MergedInputDescription>(input_description)) {
|
||||
pugi::xml_node back_edges = m_xml_node.parent().child("back_edges");
|
||||
@@ -314,17 +315,18 @@ class XmlSerializer : public ngraph::AttributeVisitor {
|
||||
|
||||
for (const auto& output_description : output_descriptions) {
|
||||
pugi::xml_node output = port_map.append_child("output");
|
||||
output.append_attribute("external_port_id").set_value(input_count + output_description->m_output_index);
|
||||
output.append_attribute("external_port_id")
|
||||
.set_value(static_cast<unsigned long long>(input_count + output_description->m_output_index));
|
||||
output.append_attribute("internal_layer_id")
|
||||
.set_value(result_mapping[output_description->m_body_value_index].c_str());
|
||||
|
||||
if (auto concat_output =
|
||||
ov::as_type_ptr<ngraph::op::util::SubGraphOp::ConcatOutputDescription>(output_description)) {
|
||||
output.prepend_attribute("axis").set_value(concat_output->m_axis);
|
||||
output.append_attribute("start").set_value(concat_output->m_start);
|
||||
output.append_attribute("end").set_value(concat_output->m_end);
|
||||
output.append_attribute("stride").set_value(concat_output->m_stride);
|
||||
output.append_attribute("part_size").set_value(concat_output->m_part_size);
|
||||
output.prepend_attribute("axis").set_value(static_cast<long long>(concat_output->m_axis));
|
||||
output.append_attribute("start").set_value(static_cast<long long>(concat_output->m_start));
|
||||
output.append_attribute("end").set_value(static_cast<long long>(concat_output->m_end));
|
||||
output.append_attribute("stride").set_value(static_cast<long long>(concat_output->m_stride));
|
||||
output.append_attribute("part_size").set_value(static_cast<long long>(concat_output->m_part_size));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -426,8 +428,8 @@ public:
|
||||
const int64_t size = a->get()->size();
|
||||
int64_t offset = m_constant_write_handler.write(static_cast<const char*>(a->get()->get_ptr()), size);
|
||||
|
||||
m_xml_node.append_attribute("offset").set_value(offset);
|
||||
m_xml_node.append_attribute("size").set_value(size);
|
||||
m_xml_node.append_attribute("offset").set_value(static_cast<unsigned long long>(offset));
|
||||
m_xml_node.append_attribute("size").set_value(static_cast<unsigned long long>(size));
|
||||
}
|
||||
} else if (const auto& a =
|
||||
ngraph::as_type<ngraph::AttributeAdapter<ov::op::util::FrameworkNodeAttrs>>(&adapter)) {
|
||||
@@ -480,7 +482,7 @@ public:
|
||||
m_xml_node.append_attribute(name.c_str()).set_value(adapter.get().c_str());
|
||||
}
|
||||
void on_adapter(const std::string& name, ngraph::ValueAccessor<int64_t>& adapter) override {
|
||||
m_xml_node.append_attribute(name.c_str()).set_value(adapter.get());
|
||||
m_xml_node.append_attribute(name.c_str()).set_value(static_cast<long long>(adapter.get()));
|
||||
}
|
||||
void on_adapter(const std::string& name, ngraph::ValueAccessor<double>& adapter) override {
|
||||
m_xml_node.append_attribute(name.c_str()).set_value(adapter.get());
|
||||
@@ -793,7 +795,7 @@ void ngfunction_2_ir(pugi::xml_node& netXml,
|
||||
if (!deterministic || !is_name_auto_generated(f)) {
|
||||
netXml.append_attribute("name").set_value(f.get_friendly_name().c_str());
|
||||
}
|
||||
netXml.append_attribute("version").set_value(version);
|
||||
netXml.append_attribute("version").set_value(static_cast<long long>(version));
|
||||
pugi::xml_node layers = netXml.append_child("layers");
|
||||
|
||||
const std::unordered_map<ngraph::Node*, int> layer_ids = create_layer_ids(f);
|
||||
|
||||
@@ -126,12 +126,12 @@ void OPCache::serialize_meta_info(const LayerTestsUtils::OPInfo &info, const std
|
||||
for (const auto &model : info.found_in_models) {
|
||||
pugi::xml_node model_node = models.append_child("model");
|
||||
model_node.append_attribute("name").set_value(model.first.c_str());
|
||||
model_node.append_attribute("count").set_value(model.second);
|
||||
model_node.append_attribute("count").set_value(static_cast<unsigned long long>(model.second));
|
||||
}
|
||||
auto ports_info = root.append_child("ports_info");
|
||||
for (const auto &port : info.ports_info) {
|
||||
auto port_node = ports_info.append_child("port");
|
||||
port_node.append_attribute("id").set_value(port.first);
|
||||
port_node.append_attribute("id").set_value(static_cast<unsigned long long>(port.first));
|
||||
if (port.second.min == std::numeric_limits<double>::min()) {
|
||||
port_node.append_attribute("max").set_value("undefined");
|
||||
port_node.append_attribute("min").set_value("undefined");
|
||||
|
||||
@@ -200,11 +200,11 @@ void ApiSummary::saveReport() {
|
||||
for (const auto& stat_device : stat_entity.second) {
|
||||
pugi::xml_node entry = currentEntity.append_child(stat_device.first.c_str());
|
||||
entry.append_attribute("implemented").set_value(stat_device.second.isImplemented);
|
||||
entry.append_attribute("passed").set_value(stat_device.second.passed);
|
||||
entry.append_attribute("failed").set_value(stat_device.second.failed);
|
||||
entry.append_attribute("skipped").set_value(stat_device.second.skipped);
|
||||
entry.append_attribute("crashed").set_value(stat_device.second.crashed);
|
||||
entry.append_attribute("hanged").set_value(stat_device.second.hanged);
|
||||
entry.append_attribute("passed").set_value(static_cast<unsigned long long>(stat_device.second.passed));
|
||||
entry.append_attribute("failed").set_value(static_cast<unsigned long long>(stat_device.second.failed));
|
||||
entry.append_attribute("skipped").set_value(static_cast<unsigned long long>(stat_device.second.skipped));
|
||||
entry.append_attribute("crashed").set_value(static_cast<unsigned long long>(stat_device.second.crashed));
|
||||
entry.append_attribute("hanged").set_value(static_cast<unsigned long long>(stat_device.second.hanged));
|
||||
entry.append_attribute("passrate").set_value(stat_device.second.getPassrate());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,11 +302,11 @@ void OpSummary::saveReport() {
|
||||
opList.insert(name);
|
||||
pugi::xml_node entry = currentDeviceNode.append_child(name.c_str());
|
||||
entry.append_attribute("implemented").set_value(it.second.isImplemented);
|
||||
entry.append_attribute("passed").set_value(it.second.passed);
|
||||
entry.append_attribute("failed").set_value(it.second.failed);
|
||||
entry.append_attribute("skipped").set_value(it.second.skipped);
|
||||
entry.append_attribute("crashed").set_value(it.second.crashed);
|
||||
entry.append_attribute("hanged").set_value(it.second.hanged);
|
||||
entry.append_attribute("passed").set_value(static_cast<unsigned long long>(it.second.passed));
|
||||
entry.append_attribute("failed").set_value(static_cast<unsigned long long>(it.second.failed));
|
||||
entry.append_attribute("skipped").set_value(static_cast<unsigned long long>(it.second.skipped));
|
||||
entry.append_attribute("crashed").set_value(static_cast<unsigned long long>(it.second.crashed));
|
||||
entry.append_attribute("hanged").set_value(static_cast<unsigned long long>(it.second.hanged));
|
||||
entry.append_attribute("passrate").set_value(it.second.getPassrate());
|
||||
}
|
||||
|
||||
@@ -317,11 +317,11 @@ void OpSummary::saveReport() {
|
||||
if (opList.find(item.first) == opList.end()) {
|
||||
entry = currentDeviceNode.append_child(item.first.c_str());
|
||||
entry.append_attribute("implemented").set_value(item.second.isImplemented);
|
||||
entry.append_attribute("passed").set_value(item.second.passed);
|
||||
entry.append_attribute("failed").set_value(item.second.failed);
|
||||
entry.append_attribute("skipped").set_value(item.second.skipped);
|
||||
entry.append_attribute("crashed").set_value(item.second.crashed);
|
||||
entry.append_attribute("hanged").set_value(item.second.hanged);
|
||||
entry.append_attribute("passed").set_value(static_cast<unsigned long long>(item.second.passed));
|
||||
entry.append_attribute("failed").set_value(static_cast<unsigned long long>(item.second.failed));
|
||||
entry.append_attribute("skipped").set_value(static_cast<unsigned long long>(item.second.skipped));
|
||||
entry.append_attribute("crashed").set_value(static_cast<unsigned long long>(item.second.crashed));
|
||||
entry.append_attribute("hanged").set_value(static_cast<unsigned long long>(item.second.hanged));
|
||||
entry.append_attribute("passrate").set_value(item.second.getPassrate());
|
||||
} else {
|
||||
entry = currentDeviceNode.child(item.first.c_str());
|
||||
@@ -336,11 +336,11 @@ void OpSummary::saveReport() {
|
||||
(implStatus || obj.isImplemented)
|
||||
? entry.attribute("implemented").set_value(true)
|
||||
: entry.attribute("implemented").set_value(false);
|
||||
entry.attribute("passed").set_value(obj.passed);
|
||||
entry.attribute("failed").set_value(obj.failed);
|
||||
entry.attribute("skipped").set_value(obj.skipped);
|
||||
entry.attribute("crashed").set_value(obj.crashed);
|
||||
entry.attribute("hanged").set_value(obj.hanged);
|
||||
entry.attribute("passed").set_value(static_cast<unsigned long long>(obj.passed));
|
||||
entry.attribute("failed").set_value(static_cast<unsigned long long>(obj.failed));
|
||||
entry.attribute("skipped").set_value(static_cast<unsigned long long>(obj.skipped));
|
||||
entry.attribute("crashed").set_value(static_cast<unsigned long long>(obj.crashed));
|
||||
entry.attribute("hanged").set_value(static_cast<unsigned long long>(obj.hanged));
|
||||
entry.attribute("passrate").set_value(obj.getPassrate());
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+13
@@ -77,6 +77,8 @@ if(ENABLE_SYSTEM_PUGIXML)
|
||||
else()
|
||||
message(FATAL_ERROR "Failed to detect pugixml library target name")
|
||||
endif()
|
||||
# to property generate OpenVINO Developer packages files
|
||||
set(PugiXML_FOUND ${PugiXML_FOUND} CACHE BOOL "" FORCE)
|
||||
elseif(PkgConfig_FOUND AND NOT ANDROID)
|
||||
# U18 case when cmake interface is not available
|
||||
pkg_search_module(pugixml QUIET
|
||||
@@ -97,6 +99,17 @@ if(ENABLE_SYSTEM_PUGIXML)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# debian 9 case: no cmake, no pkg-config files
|
||||
if(NOT TARGET ${pugixml_target})
|
||||
find_library(PUGIXML_LIBRARY NAMES pugixml DOC "Path to pugixml library")
|
||||
if(PUGIXML_LIBRARY)
|
||||
add_library(pugixml INTERFACE IMPORTED GLOBAL)
|
||||
set_target_properties(pugixml PROPERTIES INTERFACE_LINK_LIBRARIES "${PUGIXML_LIBRARY}")
|
||||
set(pugixml_target pugixml)
|
||||
set(PugiXML_FOUND ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TARGET ${pugixml_target})
|
||||
# we need to install dynamic library for wheel package
|
||||
get_target_property(target_type ${pugixml_target} TYPE)
|
||||
|
||||
Reference in new issue
Block a user