Skip to content

Commit

Permalink
Merge branch 'master' into surya/cat_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
suryasidd committed Oct 31, 2023
2 parents 72cb4f6 + 38b6092 commit 17bcf26
Show file tree
Hide file tree
Showing 42 changed files with 649 additions and 456 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/android_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ jobs:
run: |
pushd ${OPENVINO_REPO}
git submodule update --init -- ${OPENVINO_REPO}/src/plugins
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/zlib
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/json
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
lfs: 'true'

- name: Install apt-get dependencies
uses: awalsh128/[email protected].0
uses: awalsh128/[email protected].1
with:
packages: graphviz texlive liblua5.2-0 libclang1-9 libclang-cpp9
version: 3.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_snippets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
submodules: 'true'

- name: Install OpenCL
uses: awalsh128/[email protected].0
uses: awalsh128/[email protected].1
if: runner.os == 'Linux'
with:
packages: ocl-icd-opencl-dev opencl-headers
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ jobs:
-DENABLE_STRICT_DEPENDENCIES=OFF \
-DENABLE_SYSTEM_TBB=ON \
-DENABLE_SYSTEM_OPENCL=ON \
-DENABLE_SYSTEM_PUGIXML=ON \
-DENABLE_PYTHON_PACKAGING=ON \
-DCPACK_GENERATOR=TGZ \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ jobs:
-DENABLE_STRICT_DEPENDENCIES=OFF \
-DENABLE_SYSTEM_TBB=ON \
-DENABLE_SYSTEM_OPENCL=ON \
-DENABLE_SYSTEM_PUGIXML=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCPACK_GENERATOR=TGZ \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/linux_riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ jobs:
- name: Init submodules for non-Conan dependencies
run: |
pushd ${OPENVINO_REPO}
git submodule update --init -- ${OPENVINO_REPO}/src/plugins/intel_cpu
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/zlib
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/json
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gtest
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/gflags
git submodule update --init -- ${OPENVINO_REPO}/src/plugins/intel_cpu
git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo
popd
Expand Down
6 changes: 3 additions & 3 deletions cmake/developer_package/packaging/rpm/changelog
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
* Sun Jul 4 12:00:00 2010 OpenVINO Developers <[email protected]> - 2022.3.0-1
* Sun Dec 25 2022 OpenVINO Developers <[email protected]> - 2022.3.0-1
- Implemented Debian, RPM packages support
- Support of Ubuntu 22.04
- Support of python 3.10
- Introduced OpenVINO Runtime 2.0 C API

* Thu Jul 28 12:00:00 2022 OpenVINO Developers <[email protected]> - 2022.2.0-1
* Thu Jul 28 2022 OpenVINO Developers <[email protected]> - 2022.2.0-1
- Broader model and hardware support - Optimize & deploy with ease across an expanded range of deep learning models including NLP, and access AI acceleration across an expanded range of hardware.
- NEW: Support for Intel 13th Gen Core Processor for desktop (code named Raptor Lake).
- NEW: Preview support for Intel’s discrete graphics cards, Intel® Data Center GPU Flex Series and Intel® Arc™ GPU for DL inferencing workloads in intelligent cloud, edge and media analytics workloads. Hundreds of models enabled.
Expand All @@ -18,6 +18,6 @@
- NEW: Introducing new performance hint (”Cumulative throughput”) in AUTO device, enabling multiple accelerators (e.g. multiple GPUs) to be used at once to maximize inferencing performance.
- NEW: Introducing Intel® FPGA AI Suite support which enables real-time, low-latency, and low-power deep learning inference in this easy-to-use package  

* Thu Mar 22 12:00:00 2022 OpenVINO Developers <[email protected]> - 2022.1.0-1
* Thu Mar 22 2022 OpenVINO Developers <[email protected]> - 2022.1.0-1
- Implemented OpenVINO 2.0 Runtime API for both C++ and Python
- Introduced IR v11 which is aligned with frameworks model format
3 changes: 1 addition & 2 deletions cmake/developer_package/packaging/rpm/rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ macro(ov_rpm_specific_settings)
# group
set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
# changelog file
# TODO: fix "error: bad date in %changelog"
# set(CPACK_RPM_CHANGELOG_FILE "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/rpm/changelog")
set(CPACK_RPM_CHANGELOG_FILE "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/rpm/changelog")
# use rpmlint to check packages in post-build step
set(CPACK_POST_BUILD_SCRIPTS "${OpenVINODeveloperScripts_DIR}/packaging/rpm/post_build.cmake")
# enable for debug cpack run
Expand Down
13 changes: 1 addition & 12 deletions cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,6 @@ else()
set(ENABLE_SYSTEM_LIBS_DEFAULT OFF)
endif()

if(BUILD_SHARED_LIBS)
set(ENABLE_SYSTEM_PUGIXML_DEFAULT ${ENABLE_SYSTEM_LIBS_DEFAULT})
else()
# for static libraries case libpugixml.a must be compiled with -fPIC
# but we still need an ability to compile with system PugiXML and BUILD_SHARED_LIBS
# for Conan case where everything is compiled statically
set(ENABLE_SYSTEM_PUGIXML_DEFAULT OFF)
endif()

if(ANDROID)
# when protobuf from /usr/include is used, then Android toolchain ignores include paths
# but if we build for Android using vcpkg / conan / etc where flatbuffers is not located in
Expand All @@ -179,9 +170,7 @@ endif()

ov_dependent_option (ENABLE_SYSTEM_TBB "Enables use of system TBB" ${ENABLE_SYSTEM_TBB_DEFAULT}
"THREADING MATCHES TBB" OFF)
# TODO: turn it off by default during the work on cross-os distribution, because pugixml is not
# available out of box on all systems (like RHEL, UBI)
ov_option (ENABLE_SYSTEM_PUGIXML "Enables use of system PugiXML" ${ENABLE_SYSTEM_PUGIXML_DEFAULT})
ov_option (ENABLE_SYSTEM_PUGIXML "Enables use of system PugiXML" OFF)
# the option is on by default, because we use only flatc compiler and don't use any libraries
ov_dependent_option(ENABLE_SYSTEM_FLATBUFFERS "Enables use of system flatbuffers" ${ENABLE_SYSTEM_FLATBUFFERS_DEFAULT}
"ENABLE_OV_TF_LITE_FRONTEND" OFF)
Expand Down
6 changes: 0 additions & 6 deletions cmake/packaging/debian.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -347,18 +347,12 @@ macro(ov_cpack_settings)
set(samples_build_deps "cmake, g++, gcc, libc6-dev, make, pkg-config")
set(samples_build_deps_suggest "libopencv-core-dev, libopencv-imgproc-dev, libopencv-imgcodecs-dev")
set(samples_opencl_suggest "ocl-icd-opencl-dev, opencl-headers")
# Ubuntu 18.04, Debian 9 cases have nlohmann-json-dev
# newer systems have nlohmann-json3-dev
# according to https://www.debian.org/doc/debian-policy/ch-relationships.html#syntax-of-relationship-fields
# we can use | (pipe) to provide alternative package names
set(json_library "nlohmann-json3-dev | nlohmann-json-dev")

# 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}, ${samples_opencl_suggest}, ${all_plugins_suggest}")
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")
Expand Down
4 changes: 1 addition & 3 deletions cmake/packaging/rpm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,14 @@ macro(ov_cpack_settings)
# SUGGESTS may be unsupported, it's part of RPM 4.12.0 (Sep 16th 2014) only
# see https://rpm.org/timeline.html
set(CPACK_RPM_SAMPLES_PACKAGE_SUGGESTS "${samples_build_deps_suggest}, ${samples_opencl_deps_suggest}, ${plugin_packages}")
set(CPACK_RPM_SAMPLES_PACKAGE_REQUIRES "${core_dev_package}, ${samples_build_deps}, gflags-devel, json-devel, zlib-devel")
set(CPACK_RPM_SAMPLES_PACKAGE_REQUIRES "${core_dev_package}, ${samples_build_deps}")
set(CPACK_RPM_SAMPLES_PACKAGE_ARCHITECTURE "noarch")
ov_rpm_generate_conflicts(${OV_CPACK_COMP_CPP_SAMPLES} ${conflicting_versions})

ov_rpm_add_rpmlint_suppression("${OV_CPACK_COMP_CPP_SAMPLES}"
# contains samples source codes
"devel-file-in-non-devel-package /usr/${OV_CPACK_SAMPLESDIR}/cpp/*"
"devel-file-in-non-devel-package /usr/${OV_CPACK_SAMPLESDIR}/c/*"
# depends on gflags-devel
"devel-dependency gflags-devel"
# duplicated files are OK
"files-duplicate /usr/${OV_CPACK_SAMPLESDIR}/cpp/CMakeLists.txt /usr/${OV_CPACK_SAMPLESDIR}/c/CMakeLists.txt"
"files-duplicate /usr/${OV_CPACK_SAMPLESDIR}/cpp/build_samples.sh /usr/${OV_CPACK_SAMPLESDIR}/c/build_samples.sh"
Expand Down
3 changes: 0 additions & 3 deletions conan.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@
"opencl-clhpp-headers/2023.04.17#7c62fcc7ac2559d4839150d2ebaac5c8%1685450803.672",
"onnx/1.14.1#d95f4e64bedf3dc6898253847ac69005%1693130309.828",
"onetbb/2021.10.0#cbb2fc43088070b48f6e4339bc8fa0e1%1693812561.235",
"nlohmann_json/3.11.2#a35423bb6e1eb8f931423557e282c7ed%1666619820.488",
"ittapi/3.24.0#9246125f13e7686dee2b0c992b71db94%1682969872.743",
"hwloc/2.9.2#1c63e2eccac57048ae226e6c946ebf0e%1688677682.002",
"gflags/2.2.2#48d1262ffac8d30c3224befb8275a533%1676224985.343",
"flatbuffers/23.5.26#b153646f6546daab4c7326970b6cd89c%1685838458.449",
"ade/0.1.2c#8c03c130df6dc35186b38ba73a40a71d%1694253992.577"
],
"build_requires": [
"zlib/1.2.13#97d5730b529b4224045fe7090592d4c1%1692672717.049",
"protobuf/3.21.12#d9f5f4e3b86552552dda4c0a2e928eeb%1685218275.69",
"protobuf/3.21.9#515ceb0a1653cf84363d9968b812d6be%1678364058.993",
"pkgconf/1.9.5#743ca0d41d35a84b1f89af337ddaa1a0%1688570267.802",
"patchelf/0.13#0eaada8970834919c3ce14355afe7fac%1680534241.341",
"ninja/1.11.1#77587f8c8318662ac8e5a7867eb4be21%1684431244.21",
Expand Down
6 changes: 2 additions & 4 deletions conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,24 @@ onetbb/[>=2021.2.1]
pugixml/[>=1.10]
protobuf/3.21.12
ittapi/[>=3.23.0]
zlib/[>=1.2.8]
opencl-icd-loader/[>=2023.04.17]
rapidjson/[>=1.1.0]
xbyak/[>=6.62]
snappy/[>=1.1.7]
gflags/2.2.2
onnx/1.14.1
nlohmann_json/[>=3.1.1]
pybind11/[>=2.10.1]
flatbuffers/[>=22.9.24]

[tool_requires]
cmake/[>=3.20]
pkgconf/1.9.5
patchelf/[>=0.12]
protobuf/3.21.9
protobuf/3.21.12
flatbuffers/[>=22.9.24]

[options]
protobuf/*:lite=True
protobuf/*:with_zlib=False
protobuf/*:shared=False
flatbuffers/*:header_only=True

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,16 @@

.. note::

Installing OpenVINO from YUM is only supported on RHEL 8.2 and higher versions. CentOS 7 is not supported for this installation method.
OpenVINO RPM packages are compatible with and can be run on the following operating systems:
- 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 Linix 8.7, 8.8 and 9.2
- Fedora 29 and higher up to 40
- OpenEuler 20.03 and 22.03
- Anolis OS 8.6 and 8.8
- CentOS Stream 8 and 9

.. tab-item:: Processor Notes
:sync: processor-notes
Expand Down
43 changes: 8 additions & 35 deletions samples/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,42 +108,15 @@ endif()
if(TARGET gflags)
set(GFLAGS_TARGET gflags)
elseif(gflags_required)
if(EXISTS /etc/debian_version)
set(gflags_component nothreads_static)
set(GFLAGS_TARGET gflags_nothreads_static)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags")
add_subdirectory(thirdparty/gflags EXCLUDE_FROM_ALL)
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gflags")
# Allow running samples CMakeLists.txt as stand alone from openvino sources
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gflags"
"${CMAKE_CURRENT_BINARY_DIR}/thirdparty/gflags" EXCLUDE_FROM_ALL)
else()
set(gflags_component shared)
endif()
find_package(gflags QUIET OPTIONAL_COMPONENTS ${gflags_component})
if(gflags_FOUND)
if(TARGET ${GFLAGS_TARGET})
# nothing
elseif(TARGET gflags_nothreads-static)
# Debian 9: gflag_component is ignored
set(GFLAGS_TARGET gflags_nothreads-static)
elseif(TARGET gflags-shared)
# gflags shared case for CentOS / RHEL / Fedora
set(GFLAGS_TARGET gflags-shared)
elseif(TARGET gflags::gflags)
# gflags case for Conan
set(GFLAGS_TARGET gflags::gflags)
else()
message(FATAL_ERROR "Internal error: failed to find imported target 'gflags' using '${gflags_component}' component")
endif()

message(STATUS "gflags (${gflags_VERSION}) is found at ${gflags_DIR} using '${gflags_component}' component")
endif()

if(NOT gflags_FOUND)
set(GFLAGS_TARGET gflags_nothreads_static)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gflags")
add_subdirectory(thirdparty/gflags EXCLUDE_FROM_ALL)
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gflags")
# Allow running samples CMakeLists.txt as stand alone from openvino sources
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/gflags"
"${CMAKE_CURRENT_BINARY_DIR}/thirdparty/gflags" EXCLUDE_FROM_ALL)
else()
message(FATAL_ERROR "Failed to find 'gflags' library using '${gflags_component}' component")
endif()
message(FATAL_ERROR "Failed to find 'gflags' library using '${gflags_component}' component")
endif()
endif()

Expand Down
70 changes: 14 additions & 56 deletions samples/cpp/benchmark_app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,62 +15,20 @@ ov_add_sample(NAME ${TARGET_NAME}
# Required nlohmann_json dependency

if(NOT TARGET nlohmann_json::nlohmann_json)
find_package(PkgConfig QUIET)
find_package(nlohmann_json QUIET
# exception for Ubuntu 18.04, where cmake files for nlohmann_json
# are located in a wrong directory
HINTS /usr/lib/cmake)
if(TARGET nlohmann_json)
# Ubuntu 18.04 case where target 'nlohmann_json' is here, but nlohmann_json_FOUND is OFF
if(NOT TARGET nlohmann_json::nlohmann_json)
set_target_properties(nlohmann_json PROPERTIES IMPORTED_GLOBAL ON)
add_library(nlohmann_json::nlohmann_json ALIAS nlohmann_json)
endif()
set(nlohmann_json_FOUND ON)
endif()
if(nlohmann_json_FOUND)
message(STATUS "nlohmann_json (${nlohmann_json_VERSION}) is found at ${nlohmann_json_DIR}")
elseif(PkgConfig_FOUND)
pkg_search_module(nlohmann_json QUIET
IMPORTED_TARGET GLOBAL
nlohmann_json)
if(nlohmann_json_FOUND)
add_library(nlohmann_json::nlohmann_json ALIAS PkgConfig::nlohmann_json)
endif()
endif()

if(NOT nlohmann_json_FOUND)
# try to find header file json.hpp
# for example, on debian 9 there is no cmake / pkgconfig files
find_file(nlohmann_include_file
NAMES "json.hpp"
"Path to json.hpp (nlohmann-json-dev)")
if(nlohmann_include_file)
add_library(nlohmann_json::nlohmann_json INTERFACE IMPORTED)
get_filename_component(nlohmann_include_dir "${nlohmann_include_file}" PATH)
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${nlohmann_include_dir}"
INTERFACE_COMPILE_DEFINITIONS JSON_HEADER)
set(nlohmann_json_FOUND ON)
endif()
endif()

if(NOT nlohmann_json_FOUND)
if(EXISTS "${Samples_SOURCE_DIR}/thirdparty/nlohmann_json")
# OpenVINO package puts thirdparty to samples dir
# suppress shadowing names warning
set(JSON_SystemInclude ON CACHE BOOL "" FORCE)
add_subdirectory("${Samples_SOURCE_DIR}/thirdparty/nlohmann_json"
"${Samples_BINARY_DIR}/thirdparty/nlohmann_json" EXCLUDE_FROM_ALL)
elseif(EXISTS "${Samples_SOURCE_DIR}/../../thirdparty/json/nlohmann_json")
# Allow running samples CMakeLists.txt as stand alone from openvino sources
# suppress shadowing names warning
set(JSON_SystemInclude ON CACHE BOOL "" FORCE)
add_subdirectory("${Samples_SOURCE_DIR}/../../thirdparty/json/nlohmann_json"
"${Samples_BINARY_DIR}/thirdparty/nlohmann_json" EXCLUDE_FROM_ALL)
else()
message(FATAL_ERROR "Failed to find / build nlohmann_json library")
endif()
if(EXISTS "${Samples_SOURCE_DIR}/thirdparty/nlohmann_json")
# OpenVINO package puts thirdparty to samples dir
# suppress shadowing names warning
set(JSON_SystemInclude ON CACHE BOOL "" FORCE)
add_subdirectory("${Samples_SOURCE_DIR}/thirdparty/nlohmann_json"
"${Samples_BINARY_DIR}/thirdparty/nlohmann_json" EXCLUDE_FROM_ALL)
elseif(EXISTS "${Samples_SOURCE_DIR}/../../thirdparty/json/nlohmann_json")
# Allow running samples CMakeLists.txt as stand alone from openvino sources
# suppress shadowing names warning
set(JSON_SystemInclude ON CACHE BOOL "" FORCE)
add_subdirectory("${Samples_SOURCE_DIR}/../../thirdparty/json/nlohmann_json"
"${Samples_BINARY_DIR}/thirdparty/nlohmann_json" EXCLUDE_FROM_ALL)
else()
message(FATAL_ERROR "Failed to find / build nlohmann_json library")
endif()
endif()

Expand Down
16 changes: 1 addition & 15 deletions samples/cpp/speech_sample/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,8 @@ file (GLOB HDR ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)

# Required zlib and cnpy dependencies

find_package(ZLIB QUIET)

if(NOT TARGET ZLIB::ZLIB)
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND)
pkg_search_module(zlib QUIET
IMPORTED_TARGET GLOBAL
zlib)
if(zlib_FOUND)
add_library(ZLIB::ZLIB ALIAS PkgConfig::zlib)
endif()
endif()

if(zlib_FOUND)
message(STATUS "${PKG_CONFIG_EXECUTABLE}: zlib (${zlib_VERSION}) is found at ${zlib_PREFIX}")
elseif(EXISTS "${Samples_SOURCE_DIR}/thirdparty/zlib")
if(EXISTS "${Samples_SOURCE_DIR}/thirdparty/zlib")
# OpenVINO package puts thirdparty to samples dir
add_subdirectory("${Samples_SOURCE_DIR}/thirdparty/zlib"
"${Samples_BINARY_DIR}/thirdparty/zlib" EXCLUDE_FROM_ALL)
Expand Down
Loading

0 comments on commit 17bcf26

Please sign in to comment.