Compare commits

..

65 Commits

Author SHA1 Message Date
Luwei Zhou
1f39925343 Revert reorder WR. 2022-05-27 10:55:22 +08:00
Li, Tingqian
997337c33d Add OV_CPU_DEBUG_LOG controls debug logs to show 2022-05-26 21:08:58 -04:00
Li, Tingqian
595523e6d3 fix cpplint 2022-05-26 22:35:31 +08:00
Li, Tingqian
0b21f70339 fix oneDNN register_jit_code log 2022-05-26 22:32:10 +08:00
Li, Tingqian
bb429a855a change VERBOSE_LOG to DEBUG_LOG 2022-05-26 22:31:41 +08:00
Li, Tingqian
ff38537aea Merge branch 'luocheng/onednn_2.6' of github.com:luo-cheng2021/openvino into luocheng/onednn_2.6 2022-05-26 22:07:08 +08:00
Li, Tingqian
d570dc4e16 Add a new CPU_DEBUG_CAPS: OV_CPU_SUMMARY_PERF 2022-05-26 22:07:00 +08:00
Li, Tingqian
0f23ee9ad6 Merge branch 'luocheng/onednn_2.6' of github.com:luo-cheng2021/openvino into luocheng/onednn_2.6 2022-05-26 09:22:54 -04:00
Li, Tingqian
9f5e3c50b9 cpu dump check supports compare dump files 2022-05-26 09:22:42 -04:00
Luwei Zhou
fa38c36b2f Update ONEDNN version to fix AVX2 bug. 2022-05-26 19:59:11 +08:00
Li, Tingqian
c533aa6b8b fix cpplint 2022-05-26 07:32:18 -04:00
Li, Tingqian
5b6827649c fix binary prelu post Ops 2022-05-26 06:21:55 -04:00
Li, Tingqian
f037208b3f Generate exec graph in cpu dump check tool 2022-05-26 05:52:41 -04:00
Li, Tingqian
a1ccf115df Add verbose log 2022-05-26 02:46:15 -04:00
Li, Tingqian
8b7f7d6391 Add CPU dump check tool 2022-05-25 21:07:02 -04:00
Zhang Yi3
6a8b37fe4f [CPU] Add BF16 AMX test for Matmul 2022-05-25 17:28:57 +08:00
Luo Cheng
f326f0b824 make nightly case run. tested on amx/avx512/avx2. 2022-05-25 13:25:56 +08:00
Luo Cheng
ecdda2c909 mix legacy/new binary postops 2022-05-24 20:21:42 +08:00
Zhang Yi3
c9304c5c7f [WA] skip fakequantize fusing in bf16 2022-05-24 17:26:46 +08:00
Luwei Zhou
04ba093dca Compiling issue fix. 2022-05-23 16:01:29 +08:00
Luwei Zhou
d81896502f WR enforce reorder bug and add NSPC into deconv supported list. 2022-05-23 14:53:35 +08:00
Luo Cheng
26a20e5875 testcase for conv brgconv avx512/amx 2022-05-23 09:48:50 +08:00
Luo Cheng
d7d4097418 testcase for conv brgconv avx512/amx 2022-05-22 21:10:08 +08:00
Luo Cheng
91ec6b0806 testcase init support amx check 2022-05-20 22:30:27 +08:00
Luo Cheng
841b2dc47a disable BF16 fusing fakequant testcase 2022-05-20 20:57:30 +08:00
Luo Cheng
b53bc6bac5 MemoryInput/Output support bf16; Enforce bf16 'NO' should enable snipptes 2022-05-20 20:01:19 +08:00
Li, Tingqian
f5af87f810 Fix cpplint error 2022-05-20 11:59:55 +03:00
Li, Tingqian
c4021f8e6e Fix primType check issue 2022-05-20 11:15:55 +03:00
Luo Cheng
a1f21f3797 fix clang check 2022-05-19 20:12:50 +08:00
Luo Cheng
b08bf8a9de testcase subgraph sets default ENFORCE_BF16 to NO 2022-05-19 19:55:35 +08:00
Luo Cheng
cecd11457e OVClassBasicTest case typo 2022-05-19 19:55:35 +08:00
Luo Cheng
d9d934bf86 [WA] bf16 crash due to MemoryInput/Output 2022-05-19 19:55:35 +08:00
Li, Tingqian
c302bc94da Add cpuDebugFuncTests target 2022-05-19 03:59:19 +03:00
Li, Tingqian
c20d762af8 Fix ConcatConvSumInPlaceTest 2022-05-19 02:55:58 +03:00
Luo Cheng
f5ea549d97 fix gemm bf16 fail 2022-05-18 10:40:35 +08:00
Luo Cheng
b2ba3d5055 add gemm int8 binary postops to fix GroupConvolutionQDqTransformation fail 2022-05-18 08:08:49 +08:00
Luo Cheng
a9104e1a88 add gemm int8 binary postops to fix GroupConvolutionQDqTransformation fail 2022-05-17 19:51:24 +08:00
Luwei Zhou
fbf241d9d8 WR to disable the LPT multiplyToGroupConv test because the transformation was disabled in d5e16f 2022-05-16 11:27:33 +08:00
Zhang Yi3
63b283fe88 [WA] remove invalid FQ tests 2022-05-16 15:43:26 +08:00
Luo Cheng
167f74a7bc fix avx2 groupconv accuracy problem 2022-05-16 07:24:33 +08:00
Luo Cheng
36be40c7e9 fix gemm bf16 win crash 2022-05-14 11:58:25 +08:00
Luo Cheng
543963bf8d test subgraph added nhwc format check 2022-05-13 19:07:23 +08:00
Luo Cheng
901210fa6c testcase conv maxpool will check brgconv instead of jit 2022-05-13 18:50:39 +08:00
Luo Cheng
eb87aacc49 [WA] Remove the moc fail case by #af4731a1 2022-05-13 18:17:10 +08:00
Luo Cheng
a56e1a9c4b group deconv may crash on memory out of bound 2022-05-13 17:26:16 +08:00
Luo Cheng
11238a504c Merge pull request #43 from liubo-intel/liubo/onednn_2.6_bugfix
fix CPU 'ConvolutionBackpropDataLayerTest' fail issue
2022-05-13 13:59:24 +08:00
Luwei Zhou
6955c389d6 [WR] Removed failed the ReduceMean tests caused by 21f3555. 2022-05-13 11:42:38 +08:00
liubo-intel
9e9e3dd01b reopen 'FuseDeconvolutionAndSimpleOperation' Transform to fix CPU 'ConvolutionBackpropDataLayerTest' fail issue 2022-05-13 11:31:21 +08:00
Zhang Yi3
3bfc042a35 fix xmm zero check 2022-05-12 23:52:31 +08:00
Luo Cheng
4696b9e58a [WA] make cpu case to run completed 2022-05-12 15:35:16 +08:00
Luo Cheng
e17179d795 Merge remote-tracking branch 'upstream/master' into luocheng/onednn_2.6 2022-05-06 13:38:39 +08:00
Luo Cheng
bacc15c275 cherry pick from 2.7 to 2.6 2022-04-25 18:59:07 +08:00
Luo Cheng
04fabe7b20 rebase onednn master 2022-04-25 15:58:51 +08:00
Luo Cheng
bd09a6a218 fix compiler error 2022-04-25 15:58:51 +08:00
dmitrygo
21f3555f59 [CPU][WA] Enabled ReduceSum -> AvgPool transformation due to perf issues 2022-04-25 15:58:51 +08:00
dmitrygo
eae4782284 [CPU] Optimize processing for FQ + Sum + FQ post ops pattern 2022-04-25 15:58:51 +08:00
Vladislav Golubev
af4731a1f1 [WA] remove layout compatibility chheck that leads to the fase-positive exceptions 2022-04-25 15:58:51 +08:00
Vladislav Golubev
cd4150c8ef [WA] Add node name if tensor names are empty 2022-04-25 15:58:51 +08:00
dmitrygo
5e1a5aef3e [CPU] Optimize post ops processing 2022-04-25 15:58:51 +08:00
dmitrygo
8ee5514629 Fixed FQ post op optimization 2022-04-25 15:58:51 +08:00
dmitrygo
7e4539f6df [CPU][WA] Disabled Deconvolution + post ops fusing optimization 2022-04-25 15:58:51 +08:00
dmitrygo
3bebf4a76d [CPU] Enabled I8 precision on activations for Convolution node 2022-04-25 15:58:51 +08:00
dmitrygo
d5e16f7844 Post ops optimizations 2022-04-25 15:58:51 +08:00
dmitrygo
838f71eb9a [CPU] Enabled brconv implementation 2022-04-25 15:58:51 +08:00
dmitrygo
81b1fbd5c1 Migrate on OneDNN 2.7 2022-04-25 15:58:51 +08:00
7050 changed files with 101123 additions and 225677 deletions

View File

@@ -4,27 +4,8 @@ trigger:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- src/tests/functional/plugin/conformance/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- src/tests/functional/plugin/conformance/**
exclude:
- docs/*
resources:
repositories:
@@ -123,25 +104,27 @@ jobs:
inputs:
cmakeArgs: >
-GNinja
-DCMAKE_VERBOSE_MAKEFILE=ON
-DVERBOSE_BUILD=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DCMAKE_TOOLCHAIN_FILE=$(ANDROID_TOOLS)/ndk-bundle/build/cmake/android.toolchain.cmake
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DANDROID_ABI=$(ANDROID_ABI_CONFIG)
-DANDROID_STL=c++_shared
-DANDROID_PLATFORM=$(ANDROID_SDK_VERSION)
-DENABLE_OPENCV=OFF
-DENABLE_TESTS=ON
-DENABLE_SAMPLES=ON
-DENABLE_INTEL_MYRIAD=OFF
-DBUILD_java_api=ON
-DBUILD_nvidia_plugin=OFF
-DOPENVINO_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
-DCMAKE_CXX_LINKER_LAUNCHER=ccache
-DCMAKE_C_LINKER_LAUNCHER=ccache
-DTHREADING=SEQ
-DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=ccache
$(OPENVINO_REPO_DIR)
workingDirectory: $(BUILD_DIR)
- script: ls -alR $(OPENVINO_REPO_DIR)/temp/
displayName: 'List temp SDKs'
- script: ccache --zero-stats --max-size=50G --show-config
displayName: 'Clean ccache stats'

View File

@@ -5,24 +5,7 @@ trigger:
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- docs/*
resources:
repositories:
@@ -45,24 +28,9 @@ jobs:
# Dynamic:
# CMAKE_BUILD_SHARED_LIBS: 'ON'
# PYTHON_STATIC_ARGS:
# CMAKE_CPACK_GENERATOR:
# SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/samples
# PYTHON_SAMPLES_INSTALL_DIR: $(SAMPLES_INSTALL_DIR)/python
# RUN_PREFIX: . $(SETUPVARS) -pyver 3.8 &&
# Debian:
# CMAKE_BUILD_SHARED_LIBS: 'ON'
# PYTHON_STATIC_ARGS:
# CMAKE_CPACK_GENERATOR: 'DEB'
# SAMPLES_INSTALL_DIR: /usr/share/openvino/samples
# PYTHON_SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/share/openvino/samples/python
# RUN_PREFIX: LD_LIBRARY_PATH=$(INSTALL_TEST_DIR):$(INSTALL_DIR)/opencv/lib:$LD_LIBRARY_PATH
Static:
CMAKE_BUILD_SHARED_LIBS: 'OFF'
PYTHON_STATIC_ARGS: -m "not dynamic_library and not template_plugin"
CMAKE_CPACK_GENERATOR:
SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/samples
PYTHON_SAMPLES_INSTALL_DIR: $(SAMPLES_INSTALL_DIR)/python
RUN_PREFIX: . $(SETUPVARS) -pyver 3.8 &&
maxParallel: 2
# About 150% of total time
@@ -91,9 +59,30 @@ jobs:
TMP_DIR: /mnt/tmp
SHARE_DIR: /mount/cinfsshare/onnxtestdata
CCACHE_DIR: $(SHARE_DIR)/ccache/master/linux
CMAKE_VERSION: 3.24.0
steps:
- script: |
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
whoami
uname -a
echo Python3 info ; which python3 ; python3 --version
echo Python info ; which python ; python --version
echo Java info ; which java ; java -version
echo gcc info ; which gcc ; gcc --version
echo cmake info ; which cmake ; cmake --version
lsb_release
env
cat /proc/cpuinfo
cat /proc/meminfo
cat /etc/fstab
vmstat -s
df
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
free -h
echo TargetBranch: $(System.PullRequest.TargetBranch)
echo SourceBranch: $(Build.SourceBranch)
displayName: 'System info'
- script: |
set -e
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
@@ -118,13 +107,6 @@ jobs:
submodules: recursive
path: openvino_contrib
- script: |
wget "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh"
chmod +x ./cmake-${CMAKE_VERSION}-linux-x86_64.sh
sudo ./cmake-${CMAKE_VERSION}-linux-x86_64.sh --prefix=/usr/local/ --skip-license
rm -rf ./cmake-${CMAKE_VERSION}-linux-x86_64.sh
displayName: 'Install cmake'
- script: |
set -e
$(REPO_DIR)/install_build_dependencies.sh
@@ -135,13 +117,12 @@ jobs:
python3 -m pip install --upgrade pip
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/src/compatibility/openvino/requirements.txt
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/requirements.txt
# For running Python API tests
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running Paddle frontend unit tests
python3 -m pip install -r $(REPO_DIR)/src/frontends/paddle/tests/requirements.txt
python3 -m pip install -r $(REPO_DIR)/src/core/tests/frontend/paddle/requirements_dev.txt
# For running ONNX frontend unit tests
python3 -m pip install -r $(REPO_DIR)/src/frontends/onnx/tests/requirements.txt
python3 -m pip install -r $(REPO_DIR)/src/core/tests/requirements_test_onnx.txt
# For MO unit tests
python3 -m pip install -r $(REPO_DIR)/tools/mo/requirements.txt
python3 -m pip install -r $(REPO_DIR)/tools/mo/requirements_dev.txt
@@ -154,29 +135,6 @@ jobs:
workingDirectory: $(WORK_DIR)
displayName: 'Install dependencies'
- script: |
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
whoami
uname -a
echo Python3 info ; which python3 ; python3 --version
echo Python info ; which python ; python --version
echo Java info ; which java ; java -version
echo gcc info ; which gcc ; gcc --version
echo cmake info ; which cmake ; cmake --version
lsb_release
env
cat /proc/cpuinfo
cat /proc/meminfo
cat /etc/fstab
vmstat -s
df
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
free -h
echo TargetBranch: $(System.PullRequest.TargetBranch)
echo SourceBranch: $(Build.SourceBranch)
displayName: 'System info'
# Should be after 'Install dependencies' because Git lfs is not installed
- checkout: testdata
clean: true
@@ -188,27 +146,23 @@ jobs:
# CMake must get Python 3.x version by default
cmakeArgs: >
-GNinja
-DCMAKE_VERBOSE_MAKEFILE=ON
-DVERBOSE_BUILD=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DENABLE_PYTHON=ON
-DBUILD_SHARED_LIBS=$(CMAKE_BUILD_SHARED_LIBS)
-DENABLE_ONEDNN_FOR_GPU=$(CMAKE_BUILD_SHARED_LIBS)
-DPYTHON_EXECUTABLE=/usr/bin/python3.8
-DENABLE_WHEEL=ON
-DENABLE_TESTS=ON
-DENABLE_OV_ONNX_FRONTEND=ON
-DENABLE_FASTER_BUILD=ON
-DENABLE_STRICT_DEPENDENCIES=OFF
-DENABLE_REQUIREMENTS_INSTALL=OFF
-DOPENVINO_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
-DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_LINKER_LAUNCHER=ccache
-DCMAKE_C_LINKER_LAUNCHER=ccache
-DCPACK_GENERATOR=$(CMAKE_CPACK_GENERATOR)
-DBUILD_nvidia_plugin=OFF
-S $(REPO_DIR)
-B $(BUILD_DIR)
$(REPO_DIR)
workingDirectory: $(BUILD_DIR)
- script: ls -alR $(REPO_DIR)/temp/
displayName: 'List temp SDKs'
@@ -221,7 +175,8 @@ jobs:
export CCACHE_TEMPDIR=$(TMP_DIR)/ccache
export CCACHE_BASEDIR=$(Pipeline.Workspace)
export CCACHE_MAXSIZE=50G
ninja -C $(BUILD_DIR)
ninja
workingDirectory: $(BUILD_DIR)
displayName: 'Build Lin'
- script: ccache --show-stats
@@ -230,126 +185,57 @@ jobs:
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List bin files'
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_DIR)
displayName: 'Install'
- task: CMake@1
inputs:
cmakeArgs: >
-GNinja
-S $(REPO_DIR)/tests/layer_tests
-B $(BUILD_LAYER_TESTS_DIR)
$(REPO_DIR)/tests/layer_tests
workingDirectory: $(BUILD_LAYER_TESTS_DIR)
- script: ninja -C $(BUILD_LAYER_TESTS_DIR)
- script: ninja
workingDirectory: $(BUILD_LAYER_TESTS_DIR)
displayName: 'Build Layer Tests'
- script: sudo apt-get remove libtbb2 -y
displayName: 'Remove debian dependencies'
condition: eq(variables['CMAKE_CPACK_GENERATOR'], 'DEB')
continueOnError: false
- script: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake
displayName: 'Install wheel packages'
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_LAYER_TESTS_DIR)/cmake_install.cmake
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_LAYER_TESTS_DIR)
displayName: 'Install Layer Tests'
- script: ls -alR $(INSTALL_DIR)
displayName: 'List install files'
- script: python3 -m pip install openvino-dev --find-links=$(INSTALL_DIR)/tools
displayName: 'Install python wheels'
displayName: 'Install wheels'
- script: |
set -e
cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P $(BUILD_DIR)/cmake_install.cmake
mkdir -p $(INSTALL_DIR)/opencv/
cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P cmake_install.cmake
cp -R $(REPO_DIR)/temp/opencv_4.5.2_ubuntu20/opencv/* $(INSTALL_DIR)/opencv/
workingDirectory: $(BUILD_DIR)
displayName: 'Install tests'
- script: ls -alR $(INSTALL_DIR)
displayName: 'List install test files'
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
# because of static build libgna is needed for python binary
export LD_LIBRARY_PATH=$(REPO_DIR)/temp/gna_03.00.00.1815.1/linux/x64:$LD_LIBRARY_PATH
python3 -m pytest -s $(INSTALL_TEST_DIR)/pyngraph $(PYTHON_STATIC_ARGS) \
--junitxml=$(INSTALL_TEST_DIR)/TEST-Pyngraph.xml \
--ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_zoo_models.py \
--ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_backend.py
displayName: 'nGraph and IE Python Bindings Tests'
continueOnError: false
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
# because of static build libgna is needed for python binary and mock_py frontend library
export LD_LIBRARY_PATH=$(REPO_DIR)/temp/gna_03.00.00.1815.1/linux/x64:$(INSTALL_TEST_DIR):$LD_LIBRARY_PATH
# For python imports to import pybind_mock_frontend
export PYTHONPATH=$(INSTALL_TEST_DIR):$(INSTALL_DIR)/python/python3.8:$PYTHONPATH
# For frontend manager to load mock_py library
export OV_FRONTEND_PATH=$(INSTALL_TEST_DIR)
python3 -m pytest -sv $(INSTALL_TEST_DIR)/pyopenvino $(PYTHON_STATIC_ARGS) \
--junitxml=$(INSTALL_TEST_DIR)/TEST-Pyngraph.xml \
--ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_utils/test_utils.py \
--ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_zoo_models.py \
--ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_backend.py
displayName: 'Python API 2.0 Tests'
continueOnError: false
- script: |
# because of static build libgna is needed for python binary
export LD_LIBRARY_PATH=$(REPO_DIR)/temp/gna_03.00.00.1815.1/linux/x64:$LD_LIBRARY_PATH
python3 -m pytest -s $(INSTALL_TEST_DIR)/mo/unit_tests --junitxml=$(INSTALL_TEST_DIR)/TEST-ModelOptimizer.xml
displayName: 'Model Optimizer UT'
continueOnError: false
- script: |
sudo apt-get install libtbb-dev libpugixml-dev -y
cmake --build $(BUILD_DIR) --target package -j8
condition: eq(variables['CMAKE_CPACK_GENERATOR'], 'DEB')
displayName: 'Build Debian packages'
continueOnError: false
- script: |
# install debian packages from previous release
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-get install --no-install-recommends gnupg -y
echo "deb https://apt.repos.intel.com/openvino/2022 focal main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2022.list
sudo apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/intel-openvino-2022.list
# sudo apt-get install openvino -y
# install our local one and make sure the conflicts are resolved
sudo apt-get install --no-install-recommends dpkg-dev -y
rm -r _CPack_Packages
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
echo "deb [trusted=yes] file:$(BUILD_DIR) ./" | sudo tee /etc/apt/sources.list.d/openvino-local.list
sudo apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/openvino-local.list
sudo apt-get install openvino -y
workingDirectory: $(BUILD_DIR)
condition: eq(variables['CMAKE_CPACK_GENERATOR'], 'DEB')
displayName: 'Install Debian packages'
continueOnError: false
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake
condition: ne(variables['CMAKE_CPACK_GENERATOR'], 'DEB')
displayName: 'Install openvino'
continueOnError: false
- script: ls -alR $(INSTALL_DIR)
condition: ne(variables['CMAKE_CPACK_GENERATOR'], 'DEB')
displayName: 'List install files'
- script: $(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR) -b $(BUILD_DIR)/cpp_samples
- script: $(INSTALL_DIR)/samples/cpp/build_samples.sh -i $(INSTALL_DIR)
workingDirectory: $(BUILD_SAMPLES_DIR)
displayName: 'Build cpp samples'
continueOnError: false
- script: |
export CC=clang
export CXX=clang++
$(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -b $(BUILD_DIR)/cpp_samples_clang
$(INSTALL_DIR)/samples/cpp/build_samples.sh -i $(INSTALL_DIR)
workingDirectory: $(BUILD_SAMPLES_DIR)
displayName: 'Build cpp samples - clang'
continueOnError: false
- script: |
export VERBOSE=1
$(SAMPLES_INSTALL_DIR)/c/build_samples.sh -i $(INSTALL_DIR) -b $(BUILD_DIR)/c_samples
- script: $(INSTALL_DIR)/samples/c/build_samples.sh -i $(INSTALL_DIR)
workingDirectory: $(BUILD_SAMPLES_DIR)
displayName: 'Build c samples'
continueOnError: false
@@ -357,99 +243,108 @@ jobs:
displayName: 'Clean build dir'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-NGraphUT.xml
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_TEST_DIR)/pyngraph $(PYTHON_STATIC_ARGS) --junitxml=TEST-Pyngraph.xml --ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_zoo_models.py --ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_backend.py
displayName: 'nGraph and IE Python Bindings Tests'
continueOnError: false
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_TEST_DIR)/pyopenvino $(PYTHON_STATIC_ARGS) --junitxml=TEST-Pyngraph.xml --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_utils/test_utils.py --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_zoo_models.py --ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_backend.py
displayName: 'Python API 2.0 Tests'
continueOnError: false
- script: |
export MO_ROOT=$(INSTALL_DIR)/tools/mo
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_DIR)/tests/mo/unit_tests --junitxml=TEST-ModelOptimizer.xml
displayName: 'Model Optimizer UT'
continueOnError: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
workingDirectory: $(INSTALL_TEST_DIR)
displayName: 'OV Core UT'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_ir_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-IRFrontend.xml
displayName: 'IR Frontend Tests'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ONNXFrontend.xml
displayName: 'ONNX Frontend Tests'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/paddle_tests --gtest_print_time=1 --gtest_output=xml:TEST-Paddle.xml
displayName: 'Paddle Frontend UT'
continueOnError: false
- script: |
# tensorflow frontend is not distributed to end users, we have to find it manually
export OV_FRONTEND_PATH=$(INSTALL_TEST_DIR)
$(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml
displayName: 'TensorFlow Frontend Unit Tests'
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/tensorflow_tests --gtest_print_time=1 --gtest_output=xml:TEST-Tensorflow.xml
displayName: 'Tensorflow Frontend UT'
continueOnError: false
# python3 $(WORK_DIR)/gtest-parallel/gtest_parallel.py $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --workers=16 --dump_json_test_results=InferenceEngineUnitTests.json --gtest_filter=*smoke* -- --gtest_print_time=1
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineUnitTests.xml
# . $(SETUPVARS) && python3 $(WORK_DIR)/gtest-parallel/gtest_parallel.py $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --workers=16 --dump_json_test_results=InferenceEngineUnitTests.json --gtest_filter=*smoke* -- --gtest_print_time=1
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:TEST-InferenceEngineUnitTests.xml
displayName: 'IE UT old'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ieUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieUnitTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieUnitTests --gtest_output=xml:TEST-ieUnitTests.xml
displayName: 'IE UT'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_cpu_unit_tests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_cpu_unit_tests.xml
displayName: 'Intel CPU Unit Tests'
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/cpuUnitTests --gtest_output=xml:TEST-cpuUnitTests.xml
displayName: 'CPU UT'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_gna_unit_tests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_gna_unit_tests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/gnaUnitTests --gtest_output=xml:TEST-gnaUnitTests.xml
displayName: 'GNA UT'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/vpuUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-vpuUnitTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/vpuUnitTests --gtest_output=xml:TEST-vpuUnitTests.xml
displayName: 'VPU UT'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/XLinkTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-XLinkTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/XLinkTests --gtest_output=xml:TEST-XLinkTests.xml
displayName: 'XLink Tests'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ieMultiPluginUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieMultiPluginUnitTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieMultiPluginUnitTests --gtest_output=xml:TEST-ieMultiPluginUnitTests.xml
displayName: 'MULTI UT'
continueOnError: false
- script: |
# because of IR reader v7
export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR)
$(RUN_PREFIX) $(INSTALL_TEST_DIR)/ieFuncTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieFuncTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/onnxImporterUnitTests --gtest_output=xml:TEST-onnxImporterUnitTests.xml
displayName: 'ONNX Importer UT'
continueOnError: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieFuncTests --gtest_output=xml:TEST-ieFuncTests.xml
displayName: 'IE FuncTests'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_template_func_tests --gtest_filter=*smoke* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-templateFuncTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_template_func_tests --gtest_filter=*smoke* --gtest_output=xml:TEST-templateFuncTests.xml
displayName: 'TEMPLATE FuncTests'
continueOnError: false
- script: $(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_cpu_func_tests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_cpu_func_tests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/cpuFuncTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:TEST-cpuFuncTests.xml
displayName: 'CPU FuncTests'
continueOnError: false
condition: and(succeeded(), eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'OFF'))
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'OFF')
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
$(RUN_PREFIX) $(INSTALL_TEST_DIR)/InferenceEngineCAPITests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineCAPITests.xml
. $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineCAPITests --gtest_output=xml:TEST-InferenceEngineCAPITests.xml
displayName: 'IE CAPITests'
continueOnError: false
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
$(RUN_PREFIX) $(INSTALL_TEST_DIR)/ov_capi_test --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_capi_test.xml
displayName: 'OV CAPITests'
continueOnError: false
- task: CMake@1
inputs:
cmakeArgs: >
-GNinja
-S $(REPO_DIR)/tests/samples_tests
-B $(BUILD_SAMPLES_TESTS_DIR)
$(REPO_DIR)/tests/samples_tests
workingDirectory: $(BUILD_SAMPLES_TESTS_DIR)
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_SAMPLES_TESTS_DIR)/cmake_install.cmake
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_SAMPLES_TESTS_DIR)
displayName: 'Install Samples Tests'
- script: python3 -m pip install -r $(INSTALL_TEST_DIR)/smoke_tests/requirements.txt
- script: |
python3 -m pip install -r $(INSTALL_DIR)/tests/smoke_tests/requirements.txt
workingDirectory: $(INSTALL_DIR)
displayName: 'Install dependencies for samples smoke tests'
continueOnError: false
@@ -457,44 +352,22 @@ jobs:
export PATH=$HOME/.local/bin:$PATH
export IE_APP_PATH=$(INSTALL_DIR)/samples_bin
export LD_LIBRARY_PATH=$IE_APP_PATH:$LD_LIBRARY_PATH
export IE_APP_PYTHON_PATH=$(PYTHON_SAMPLES_INSTALL_DIR)/
export SHARE=$(INSTALL_TEST_DIR)/smoke_tests/samples_smoke_tests_data/
export IE_APP_PYTHON_PATH=$(INSTALL_DIR)/samples/python/
export SHARE=$(INSTALL_DIR)/tests/smoke_tests/samples_smoke_tests_data/
export WORKSPACE=$(INSTALL_DIR)
$(RUN_PREFIX) python3 -m pytest $(INSTALL_TEST_DIR)/smoke_tests/ --env_conf $(INSTALL_TEST_DIR)/smoke_tests/env_config.yml -s --junitxml=$(INSTALL_TEST_DIR)/TEST-SamplesSmokeTests.xml
. $(SETUPVARS) && python3 -m pytest $(INSTALL_DIR)/tests/smoke_tests/ --env_conf $(INSTALL_DIR)/tests/smoke_tests/env_config.yml -s --junitxml=$(BUILD_DIR)/TEST-SamplesSmokeTests.xml
workingDirectory: $(INSTALL_DIR)/samples_bin
displayName: 'Samples Smoke Tests'
continueOnError: false
- script: |
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
export PYTHONPATH=$(REPO_DIR)/tools/mo/:$(LAYER_TESTS_DIR):$PYTHONPATH
export OV_FRONTEND_PATH=$(INSTALL_DIR)/runtime/lib/intel64
export TEST_DEVICE=CPU
$(RUN_PREFIX) python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=$(INSTALL_TEST_DIR)/TEST-tf_fe.xmlTEST
displayName: 'TensorFlow 1 Layer Tests - TF FE'
continueOnError: false
- script: |
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
export PYTHONPATH=$(REPO_DIR)/tools/mo/:$(LAYER_TESTS_DIR):$PYTHONPATH
export OV_FRONTEND_PATH=$(INSTALL_DIR)/runtime/lib/intel64
export TEST_DEVICE=CPU
$(RUN_PREFIX) python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow2_keras_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=$(INSTALL_TEST_DIR)/TEST-tf2_fe.xmlTEST
displayName: 'TensorFlow 2 Layer Tests - TF FE'
continueOnError: false
- script: |
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
. $(SETUPVARS)
python3 -m pip install -r requirements.txt
export MO_ROOT=$(INSTALL_DIR)/tools/mo
export PYTHONPATH=$(LAYER_TESTS_DIR):$PYTHONPATH
$(RUN_PREFIX) python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=$(INSTALL_TEST_DIR)/TEST-tf_Roll.xmlTEST
displayName: 'TensorFlow 1 Layer Tests - Legacy FE'
continueOnError: false
- script: |
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
export PYTHONPATH=$(LAYER_TESTS_DIR):$PYTHONPATH
export TEST_DEVICE=CPU
$(RUN_PREFIX) python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow2_keras_tests/test_tf2_keras_activation.py --ir_version=11 --junitxml=./TEST-tf2_Activation.xmlTEST -k "sigmoid"
displayName: 'TensorFlow 2 Layer Tests - Legacy FE'
python3 -m pytest tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=TEST-tf_Roll.xmlTEST
workingDirectory: $(LAYER_TESTS_DIR)
displayName: 'Layer Tests'
continueOnError: false
- task: PublishTestResults@2

View File

@@ -4,27 +4,8 @@ trigger:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- src/tests/functional/plugin/conformance/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- src/tests/functional/plugin/conformance/**
exclude:
- docs/*
resources:
repositories:
@@ -54,17 +35,13 @@ jobs:
OPENVINO_REPO_DIR: $(Build.Repository.LocalPath)
OPENVINO_CONTRIB_REPO_DIR: $(OPENVINO_REPO_DIR)/../openvino_contrib
OPENCV_REPO_DIR: $(OPENVINO_REPO_DIR)/../opencv
ONETBB_REPO_DIR: $(OPENVINO_CONTRIB_REPO_DIR)/../oneTBB
BUILD_PYTHON: $(WORK_DIR)/build_python
BUILD_OPENCV: $(WORK_DIR)/build_opencv
BUILD_ONETBB: $(WORK_DIR)/build_onetbb
BUILD_OPENVINO: $(WORK_DIR)/build
BUILD_OPENVINO_PYTHON: $(WORK_DIR)/build_python
BUILD_OPEN_MODEL_ZOO: $(WORK_DIR)/build_open_model_zoo
INSTALL_OPENVINO: $(WORK_DIR)/install_openvino
INSTALL_PYTHON: $(INSTALL_OPENVINO)/extras/python
INSTALL_ONETBB: $(WORK_DIR)/build/extras/oneTBB
INSTALL_ONETBB_PACKAGE: $(INSTALL_OPENVINO)/extras/oneTBB
INSTALL_OPENCV: $(INSTALL_OPENVINO)/extras/opencv
INSTALL_OPEN_MODEL_ZOO: $(INSTALL_OPENVINO)/extras/open_model_zoo
WORK_DIR: $(Pipeline.Workspace)/_w
@@ -72,7 +49,6 @@ jobs:
TMP_DIR: /mnt/tmp
OPENVINO_CCACHE_DIR: $(SHARE_DIR)/ccache/master/linux_arm64
OPENCV_CCACHE_DIR: $(SHARE_DIR)/ccache/master/linux_arm64_opencv
ONETBB_CCACHE_DIR: $(SHARE_DIR)/ccache/master/linux_arm64_onetbb
steps:
- script: |
@@ -99,15 +75,14 @@ jobs:
- script: |
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
mkdir -p $(BUILD_ONETBB) $(BUILD_OPENCV) $(BUILD_OPENVINO) $(BUILD_OPENVINO_PYTHON) $(BUILD_PYTHON) $(BUILD_OPEN_MODEL_ZOO)
mkdir -p $(INSTALL_ONETBB) $(INSTALL_ONETBB_PACKAGE) $(INSTALL_OPENVINO) $(INSTALL_PYTHON) $(INSTALL_OPENCV) $(INSTALL_OPEN_MODEL_ZOO)
mkdir -p $(BUILD_OPENCV) $(BUILD_OPENVINO) $(BUILD_OPENVINO_PYTHON) $(BUILD_PYTHON) $(BUILD_OPEN_MODEL_ZOO)
mkdir -p $(INSTALL_OPENVINO) $(INSTALL_PYTHON) $(INSTALL_OPENCV) $(INSTALL_OPEN_MODEL_ZOO)
sudo rm -rf $(TMP_DIR) ; sudo mkdir $(TMP_DIR) ; sudo chmod 777 -R $(TMP_DIR)
sudo mkdir -p $(SHARE_DIR)
sudo apt --assume-yes update && sudo apt --assume-yes install nfs-common
sudo mount -vvv -t nfs cinfsshare.file.core.windows.net:/cinfsshare/onnxtestdata $(SHARE_DIR) -o vers=4,minorversion=1,sec=sys
mkdir -p $(OPENVINO_CCACHE_DIR)
mkdir -p $(OPENCV_CCACHE_DIR)
mkdir -p $(ONETBB_CCACHE_DIR)
displayName: 'Make directories'
- checkout: self
@@ -125,12 +100,11 @@ jobs:
- script: |
set -e
$(OPENVINO_REPO_DIR)/install_build_dependencies.sh
export CCACHE_DIR=$(OPENCV_CCACHE_DIR)
export CCACHE_TEMPDIR=$(TMP_DIR)/ccache
export CCACHE_BASEDIR=$(Pipeline.Workspace)
export CCACHE_MAXSIZE=50G
export USE_CCACHE=1
export OPENCV_CCACHE_DIR=$(OPENCV_CCACHE_DIR)
export ONETBB_CCACHE_DIR=$(ONETBB_CCACHE_DIR)
export PYTHON_ARM_VERSION=$(PYTHON_ARM_VERSION)
export NUM_PROC=$(NUM_PROC)
export BUILD_PYTHON=$(BUILD_PYTHON)
@@ -138,49 +112,44 @@ jobs:
export INSTALL_PYTHON=$(INSTALL_PYTHON)
export BUILD_TYPE=$(BUILD_TYPE)
export OPENVINO_REPO_DIR=$(OPENVINO_REPO_DIR)
export BUILD_ONETBB=$(BUILD_ONETBB)
export INSTALL_ONETBB=$(INSTALL_ONETBB)
export INSTALL_OPENCV=$(INSTALL_OPENCV)
export PYTHON_EXEC=$(PYTHON_EXEC)
export ONETBB_REPO_DIR=$(ONETBB_REPO_DIR)
export OPENCV_REPO_DIR=$(OPENCV_REPO_DIR)
export BUILD_OPENCV=$(BUILD_OPENCV)
export INSTALL_OPENVINO=$(INSTALL_OPENVINO)
$(OPENVINO_CONTRIB_REPO_DIR)/modules/arm_plugin/scripts/install_build_dependencies.sh
python3 -m pip install --upgrade pip
python3 -m pip install -r $(OPENVINO_REPO_DIR)/src/bindings/python/src/compatibility/openvino/requirements.txt
python3 -m pip install -r $(OPENVINO_REPO_DIR)/src/bindings/python/wheel/requirements-dev.txt
workingDirectory: $(BUILD_OPENVINO)
displayName: 'Install dependencies'
- task: CMake@1
inputs:
cmakeArgs: >
-GNinja
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF
-DVERBOSE_BUILD=ON
-DOpenCV_DIR=$(INSTALL_OPENCV)/cmake
-DENABLE_OPENCV=OFF
-DPYTHON_INCLUDE_DIRS=$(INSTALL_PYTHON)/include/python3.8
-DPYTHON_LIBRARY=$(INSTALL_PYTHON)/lib/libpython3.8.so
-DENABLE_PYTHON=ON
-DPYTHON_MODULE_EXTENSION=".cpython-38-x86_64-linux-gnu.so"
-DPYTHON_MODULE_EXTENSION=".so"
-DENABLE_TESTS=ON
-DENABLE_FUNCTIONAL_TESTS=ON
-DENABLE_GAPI_TESTS=OFF
-DENABLE_GAPI_PREPROCESSING=OFF
-DENABLE_DATA=OFF
-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath-link,$(INSTALL_OPENCV)/lib
-DENABLE_LTO=ON
-DTHREADING=SEQ -DENABLE_LTO=ON
-DCMAKE_TOOLCHAIN_FILE=$(OPENVINO_REPO_DIR)/cmake/arm64.toolchain.cmake
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DENABLE_SAMPLES=ON
-DBUILD_java_api=OFF
-DENABLE_INTEL_MYRIAD=OFF
-DTHREADING=TBB
-DTBB_DIR=$(INSTALL_ONETBB)/lib/cmake/TBB
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-DOPENVINO_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules/arm_plugin
-DTHREADING=SEQ
-DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_LINKER_LAUNCHER=ccache
-DCMAKE_C_LINKER_LAUNCHER=ccache
-DARM_COMPUTE_SCONS_JOBS=$(NUM_PROC)
-DOUTPUT_ROOT=$(INSTALL_OPENVINO)
-DCMAKE_INSTALL_PREFIX=$(INSTALL_OPENVINO)
$(OPENVINO_REPO_DIR)
workingDirectory: $(BUILD_OPENVINO)
@@ -204,9 +173,8 @@ jobs:
inputs:
cmakeArgs: >
-GNinja
-DOpenVINODeveloperPackage_DIR=$(BUILD_OPENVINO)
-DInferenceEngineDeveloperPackage_DIR=$(BUILD_OPENVINO)
-DENABLE_PYTHON=ON
-DTHREADING=TBB
-DPYTHON_EXECUTABLE=$(INSTALL_PYTHON)/bin/python3.8
-DPYTHON_INCLUDE_DIRS=$(INSTALL_PYTHON)/include/python3.8
-DPYTHON_LIBRARIES=$(INSTALL_PYTHON)/lib
@@ -221,8 +189,6 @@ jobs:
-DCMAKE_TOOLCHAIN_FILE=$(OPENVINO_REPO_DIR)/cmake/arm64.toolchain.cmake
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_LINKER_LAUNCHER=ccache
-DCMAKE_C_LINKER_LAUNCHER=ccache
-DCMAKE_INSTALL_PREFIX=$(INSTALL_OPENVINO)
$(OPENVINO_REPO_DIR)/src/bindings/python
workingDirectory: $(BUILD_OPENVINO_PYTHON)
@@ -253,7 +219,10 @@ jobs:
-DPYTHON_LIBRARY=$(INSTALL_PYTHON)/lib
-DCMAKE_TOOLCHAIN_FILE=$(OPENVINO_REPO_DIR)/cmake/arm64.toolchain.cmake
-DOpenVINO_DIR=$(BUILD_OPENVINO)
-DInferenceEngine_DIR=$(BUILD_OPENVINO)
-DOpenCV_DIR=$(INSTALL_OPENCV)/cmake
-Dngraph_DIR=$(BUILD_OPENVINO)
-DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
-DCMAKE_INSTALL_PREFIX=$(INSTALL_OPEN_MODEL_ZOO)
$(OPENVINO_REPO_DIR)/thirdparty/open_model_zoo/demos
workingDirectory: $(BUILD_OPEN_MODEL_ZOO)
@@ -269,7 +238,6 @@ jobs:
- script: |
cp -r $(BUILD_OPEN_MODEL_ZOO)/$(OPENVINO_ARCH)/$(BUILD_TYPE)/* $(INSTALL_OPEN_MODEL_ZOO)/
cp -r $(INSTALL_ONETBB)/* $(INSTALL_ONETBB_PACKAGE)/
zip -9 -r $(Build.ArtifactStagingDirectory)/openvino_$(OPENVINO_ARCH)_linux.zip ./*
workingDirectory: $(INSTALL_OPENVINO)
displayName: 'Create OpenVINO ARM64 linux package'

View File

@@ -4,25 +4,8 @@ trigger:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
exclude:
- docs/*
jobs:
- job: LinCC
@@ -38,6 +21,7 @@ jobs:
VSTS_HTTP_TIMEOUT: 200
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
OPENVINO_CONTRIB_REPO_DIR: $(REPO_DIR)/../openvino_contrib
MODELS_PATH: $(REPO_DIR)/../testdata
WORK_DIR: $(Pipeline.Workspace)/_w
BUILD_DIR: $(WORK_DIR)/build
@@ -91,8 +75,7 @@ jobs:
inputs:
cmakeArgs: >
-GNinja
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DVERBOSE_BUILD=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DENABLE_FASTER_BUILD=ON
-DENABLE_PROFILING_ITT=ON

View File

@@ -26,9 +26,6 @@ jobs:
BUILD_SAMPLES_DIR: $(WORK_DIR)/build_samples
INSTALL_DIR: $(WORK_DIR)/install_pkg
SETUPVARS: $(INSTALL_DIR)/setupvars.sh
TMP_DIR: /mnt/tmp
SHARE_DIR: /mount/cinfsshare/onnxtestdata
CCACHE_DIR: $(SHARE_DIR)/ccache/master/linux_coverity
steps:
- script: |
@@ -55,11 +52,6 @@ jobs:
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
rm -rf $(BUILD_SAMPLES_DIR) ; mkdir $(BUILD_SAMPLES_DIR)
sudo rm -rf $(TMP_DIR) ; sudo mkdir $(TMP_DIR) ; sudo chmod 777 -R $(TMP_DIR)
sudo mkdir -p $(SHARE_DIR)
sudo apt --assume-yes update && sudo apt --assume-yes install nfs-common
sudo mount -vvv -t nfs cinfsshare.file.core.windows.net:/cinfsshare/onnxtestdata $(SHARE_DIR) -o vers=4,minorversion=1,sec=sys
mkdir -p $(CCACHE_DIR)
displayName: 'Make dir'
- checkout: self
@@ -91,24 +83,18 @@ jobs:
# Coverity has too many PARSE_ERROR errors with ENABLE_FASTER_BUILD=ON. Disabling FASTER_BUILD.
cmakeArgs: >
-GNinja
-DCMAKE_VERBOSE_MAKEFILE=ON
-DVERBOSE_BUILD=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DENABLE_FASTER_BUILD=OFF
-DENABLE_STRICT_DEPENDENCIES=OFF
-DENABLE_REQUIREMENTS_INSTALL=OFF
-DBUILD_nvidia_plugin=OFF
-DOPENVINO_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
$(REPO_DIR)
workingDirectory: $(BUILD_DIR)
- script: ls -alR $(REPO_DIR)/temp/
displayName: 'List temp SDKs'
- script: ccache --zero-stats --max-size=50G --show-config
displayName: 'Clean ccache stats'
- script: |
set -e
wget https://scan.coverity.com/download/linux64 --post-data "token=$(COVERITY_TOKEN)&project=openvino" -O coverity_tool.tgz
@@ -117,18 +103,10 @@ jobs:
workingDirectory: $(WORK_DIR)
displayName: 'Install coverity tool'
- script: |
export CCACHE_DIR=$(CCACHE_DIR)
export CCACHE_TEMPDIR=$(TMP_DIR)/ccache
export CCACHE_BASEDIR=$(Pipeline.Workspace)
export CCACHE_MAXSIZE=50G
$(WORK_DIR)/cov-analysis*/bin/cov-build --dir $(BUILD_DIR)/cov-int ninja
- script: $(WORK_DIR)/cov-analysis*/bin/cov-build --dir $(BUILD_DIR)/cov-int ninja
workingDirectory: $(BUILD_DIR)
displayName: 'Build Lin with Coverity'
- script: ccache --show-stats
displayName: 'Show ccache stats'
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List bin files'

View File

@@ -1,145 +0,0 @@
trigger:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- src/tests/functional/plugin/conformance/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- src/tests/functional/plugin/conformance/**
resources:
repositories:
- repository: openvino
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/openvino
- repository: openvino_contrib
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/openvino_contrib
- repository: testdata
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/testdata
jobs:
- job: CUDAPlugin_Lin
timeoutInMinutes: 60
pool:
name: LIN_VMSS_VENV_F16S_U20_WU2
variables:
system.debug: true
VSTS_HTTP_RETRY: 5
VSTS_HTTP_TIMEOUT: 200
BUILD_TYPE: Release
HOME_DIR: $(Agent.HomeDirectory)
REPO_DIR: $(Build.Repository.LocalPath)
OPENVINO_REPO_DIR: $(REPO_DIR)/../openvino
MODELS_PATH: $(REPO_DIR)/../testdata
WORK_DIR: $(Pipeline.Workspace)/_w
BUILD_DIR: $(WORK_DIR)/build
BIN_DIR: $(OPENVINO_REPO_DIR)/bin/intel64/$(BUILD_TYPE)
INSTALL_DIR: $(WORK_DIR)/install_pkg
SETUPVARS: $(INSTALL_DIR)/setupvars.sh
GRADLE_VER: 7.1.1
steps:
- script: |
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
echo # prev line output doesn't end with eol
whoami
uname -a
echo Python3 info ; which python3 ; python3 --version
echo Python info ; which python ; python --version
echo Java info ; which java ; java -version
echo gcc info ; which gcc ; gcc --version
echo cmake info ; which cmake ; cmake --version
lsb_release
env
cat /proc/cpuinfo
cat /proc/meminfo
cat /etc/fstab
vmstat -s
df
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
free -h
displayName: 'System info'
- script: |
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
displayName: 'Make dir'
- checkout: self
clean: true
lfs: false
submodules: recursive
path: openvino
- checkout: openvino_contrib
clean: true
lfs: false
submodules: recursive
path: openvino_contrib
- script: |
set -e
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Speed up build
sudo apt --assume-yes install unzip
wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
unzip ninja-linux.zip
workingDirectory: $(WORK_DIR)
displayName: 'Install dependencies'
- script: >
sudo docker pull openvino.azurecr.io/openvino_ci/cuda-ubuntu2004:2022.1 &&
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 &&
python3 -m pip install -r /root/repos/openvino/src/bindings/python/requirements.txt &&
cd /root/w/build &&
cmake -GNinja
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DOPENVINO_EXTRA_MODULES=/root/repos/openvino_contrib/modules
-DENABLE_INTEL_CPU=OFF
-DENABLE_INTEL_GPU=OFF
-DENABLE_INTEL_GNA=OFF
-DBUILD_arm_plugin=OFF
-DBUILD_java_api=OFF
-DENABLE_PYTHON=OFF
-DENABLE_NVIDIA=ON
-DENABLE_TESTS=ON
/root/repos/openvino &&
/root/w/ninja -v CudaFuncTests CudaUnitTests"
workingDirectory: $(WORK_DIR)
displayName: 'Docker build Lin'
- script: ls -alR $(OPENVINO_REPO_DIR)/bin/
displayName: 'List bin files'

View File

@@ -1,450 +0,0 @@
trigger:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
resources:
repositories:
- repository: openvino_contrib
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/openvino_contrib
ref: master
- repository: testdata
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/testdata
ref: master
jobs:
- job: Lin_Debian
# About 150% of total time
timeoutInMinutes: 120
pool:
name: LIN_VMSS_VENV_F16S_U20_WU2
variables:
system.debug: true
VSTS_HTTP_RETRY: 5
VSTS_HTTP_TIMEOUT: 200
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
OPENVINO_CONTRIB_REPO_DIR: $(REPO_DIR)/../openvino_contrib
MODELS_PATH: $(REPO_DIR)/../testdata
WORK_DIR: $(Pipeline.Workspace)/_w
BUILD_DIR: $(WORK_DIR)/build
BUILD_SAMPLES_DIR: $(WORK_DIR)/build_samples
BUILD_LAYER_TESTS_DIR: $(WORK_DIR)/build_layer_tests
BUILD_SAMPLES_TESTS_DIR: $(WORK_DIR)/build_samples_tests
INSTALL_DIR: $(WORK_DIR)/install_pkg
INSTALL_TEST_DIR: $(INSTALL_DIR)/tests
LAYER_TESTS_DIR: $(INSTALL_TEST_DIR)/layer_tests
SAMPLES_INSTALL_DIR: /usr/share/openvino/samples
PYTHON_SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/share/openvino/samples/python
PYTHON_WHEEL_INSTALL_DIR: $HOME/.local/lib/python3.8/site-packages
TMP_DIR: /mnt/tmp
SHARE_DIR: /mount/cinfsshare/onnxtestdata
CCACHE_DIR: $(SHARE_DIR)/ccache/master/linux
steps:
- script: |
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
whoami
uname -a
echo Python3 info ; which python3 ; python3 --version
echo Python info ; which python ; python --version
echo Java info ; which java ; java -version
echo gcc info ; which gcc ; gcc --version
echo cmake info ; which cmake ; cmake --version
lsb_release
env
cat /proc/cpuinfo
cat /proc/meminfo
cat /etc/fstab
vmstat -s
df
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
free -h
echo TargetBranch: $(System.PullRequest.TargetBranch)
echo SourceBranch: $(Build.SourceBranch)
displayName: 'System info'
- script: |
set -e
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
rm -rf $(BUILD_SAMPLES_DIR) ; mkdir $(BUILD_SAMPLES_DIR)
sudo rm -rf $(TMP_DIR) ; sudo mkdir $(TMP_DIR) ; sudo chmod 777 -R $(TMP_DIR)
sudo mkdir -p $(SHARE_DIR)
sudo apt --assume-yes update && sudo apt --assume-yes install nfs-common
sudo mount -vvv -t nfs cinfsshare.file.core.windows.net:/cinfsshare/onnxtestdata $(SHARE_DIR) -o vers=4,minorversion=1,sec=sys
mkdir -p $(CCACHE_DIR)
displayName: 'Make dir'
- checkout: self
clean: true
lfs: false
submodules: recursive
path: openvino
- checkout: openvino_contrib
clean: true
lfs: false
submodules: recursive
path: openvino_contrib
- script: |
set -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
sudo apt --assume-yes install --no-install-recommends libopencv-imgproc-dev libopencv-imgcodecs-dev
# For opencv-python: python3-setuptools and pip upgrade
python3 -m pip install --upgrade pip
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/src/compatibility/openvino/requirements.txt
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/requirements.txt
# For running Python API tests
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running Paddle frontend unit tests
python3 -m pip install -r $(REPO_DIR)/src/frontends/paddle/tests/requirements.txt
# For running ONNX frontend unit tests
python3 -m pip install -r $(REPO_DIR)/src/frontends/onnx/tests/requirements.txt
# For MO unit tests
python3 -m pip install -r $(REPO_DIR)/tools/mo/requirements.txt
python3 -m pip install -r $(REPO_DIR)/tools/mo/requirements_dev.txt
# Speed up build
wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
unzip ninja-linux.zip
sudo cp -v ninja /usr/local/bin/
# Speed up tests
git clone https://github.com/google/gtest-parallel.git
workingDirectory: $(WORK_DIR)
displayName: 'Install dependencies'
# Should be after 'Install dependencies' because Git lfs is not installed
- checkout: testdata
clean: true
lfs: true
path: testdata
- task: CMake@1
inputs:
# CMake must get Python 3.x version by default
cmakeArgs: >
-GNinja
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DENABLE_PYTHON=ON
-DENABLE_OPENCV=OFF
-DPYTHON_EXECUTABLE=/usr/bin/python3.8
-DENABLE_TESTS=ON
-DENABLE_FASTER_BUILD=ON
-DENABLE_STRICT_DEPENDENCIES=OFF
-DENABLE_REQUIREMENTS_INSTALL=OFF
-DOPENVINO_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_LINKER_LAUNCHER=ccache
-DCMAKE_C_LINKER_LAUNCHER=ccache
-DCPACK_GENERATOR=DEB
-DBUILD_nvidia_plugin=OFF
-S $(REPO_DIR)
-B $(BUILD_DIR)
- script: ls -alR $(REPO_DIR)/temp/
displayName: 'List temp SDKs'
- script: ccache --zero-stats --max-size=50G --show-config
displayName: 'Clean ccache stats'
- script: |
export CCACHE_DIR=$(CCACHE_DIR)
export CCACHE_TEMPDIR=$(TMP_DIR)/ccache
export CCACHE_BASEDIR=$(Pipeline.Workspace)
export CCACHE_MAXSIZE=50G
ninja -C $(BUILD_DIR)
displayName: 'Build Lin'
- script: ccache --show-stats
displayName: 'Show ccache stats'
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List bin files'
- task: CMake@1
inputs:
cmakeArgs: >
-GNinja
-S $(REPO_DIR)/tests/layer_tests
-B $(BUILD_LAYER_TESTS_DIR)
- script: ninja -C $(BUILD_LAYER_TESTS_DIR)
displayName: 'Build Layer Tests'
- script: sudo apt-get remove libtbb2 libpugixml1v5 -y
displayName: 'Remove debian dependencies'
continueOnError: false
- script: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake
displayName: 'Install wheel packages'
- script: cmake -DCOMPONENT=python_samples -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake
displayName: 'Install Python Samples'
- script: cmake -DCOMPONENT=gna -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake
displayName: 'Install GNA plugin'
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_LAYER_TESTS_DIR)/cmake_install.cmake
displayName: 'Install Layer Tests'
- script: python3 -m pip install openvino-dev --find-links=$(INSTALL_DIR)/tools
displayName: 'Install python wheels'
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P $(BUILD_DIR)/cmake_install.cmake
displayName: 'Install tests'
- script: ls -alR $(INSTALL_DIR)
displayName: 'List install test files'
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
python3 -m pytest -s $(INSTALL_TEST_DIR)/pyngraph \
--junitxml=$(INSTALL_TEST_DIR)/TEST-Pyngraph.xml \
--ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_zoo_models.py \
--ignore=$(INSTALL_TEST_DIR)/pyngraph/tests/test_onnx/test_backend.py
displayName: 'nGraph and IE Python Bindings Tests'
continueOnError: false
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
# Required by python imports to load requires libraries
# - tests install dir for mock_py
# - OpenVINO wheel installation dir for others frontend required by mock_py (is not part of wheel pkg)
export LD_LIBRARY_PATH=$(PYTHON_WHEEL_INSTALL_DIR)/openvino/libs:$(INSTALL_TEST_DIR):$LD_LIBRARY_PATH
# For frontend manager to load frontend libraries:
# - tests install dir for mock_py
# - OpenVINO wheel installation dir for others frontend (not required if this variable is not set)
export OV_FRONTEND_PATH=$(PYTHON_WHEEL_INSTALL_DIR)/openvino/libs:$(INSTALL_TEST_DIR)
# For python imports to import pybind_mock_frontend
export PYTHONPATH=$(INSTALL_TEST_DIR):$PYTHONPATH
python3 -m pytest -s $(INSTALL_TEST_DIR)/pyopenvino \
--junitxml=$(INSTALL_TEST_DIR)/TEST-Pyngraph.xml \
--ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_utils/test_utils.py \
--ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_zoo_models.py \
--ignore=$(INSTALL_TEST_DIR)/pyopenvino/tests/test_onnx/test_backend.py -v
displayName: 'Python API 2.0 Tests'
continueOnError: false
- script: python3 -m pytest -s $(INSTALL_TEST_DIR)/mo/unit_tests --junitxml=$(INSTALL_TEST_DIR)/TEST-ModelOptimizer.xml
displayName: 'Model Optimizer UT'
continueOnError: false
- script: |
sudo apt-get install libtbb-dev libpugixml-dev -y
cmake --build $(BUILD_DIR) --target package -j8
displayName: 'Build Debian packages'
continueOnError: false
- script: |
# install debian packages from previous release
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-get install --no-install-recommends gnupg -y
echo "deb https://apt.repos.intel.com/openvino/2022 focal main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2022.list
sudo apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/intel-openvino-2022.list
sudo apt-get install openvino -y
# install our local one and make sure the conflicts are resolved
sudo apt-get install --no-install-recommends dpkg-dev -y
rm -r _CPack_Packages
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
echo "deb [trusted=yes] file:$(BUILD_DIR) ./" | sudo tee /etc/apt/sources.list.d/openvino-local.list
sudo apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list.d/openvino-local.list
sudo apt-get install openvino -y
workingDirectory: $(BUILD_DIR)
displayName: 'Install Debian packages'
continueOnError: false
- script: ls -alR $(INSTALL_DIR)
displayName: 'List install files'
- script: rm -fr $(BUILD_DIR)
displayName: 'Clean build dir'
continueOnError: false
- script: $(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR)
displayName: 'Build cpp samples'
continueOnError: false
- script: |
export CC=clang
export CXX=clang++
$(SAMPLES_INSTALL_DIR)/cpp/build_samples.sh -i $(INSTALL_DIR)
displayName: 'Build cpp samples - clang'
continueOnError: false
- script: $(SAMPLES_INSTALL_DIR)/c/build_samples.sh -i $(INSTALL_DIR)
displayName: 'Build c samples'
continueOnError: false
- script: |
export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR):$LD_LIBRARY_PATH
$(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-NGraphUT.xml
displayName: 'OV Core UT'
continueOnError: false
- script: |
export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR)
$(INSTALL_TEST_DIR)/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ONNXFrontend.xml
displayName: 'ONNX Frontend Tests'
continueOnError: false
- script: |
export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR)
$(INSTALL_TEST_DIR)/paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Paddle.xml
displayName: 'Paddle Frontend UT'
continueOnError: false
- script: |
export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR):$LD_LIBRARY_PATH
export OV_FRONTEND_PATH=$(INSTALL_TEST_DIR)
$(INSTALL_TEST_DIR)/ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-Tensorflow.xml
displayName: 'TensorFlow Frontend Unit Tests'
continueOnError: false
# python3 $(WORK_DIR)/gtest-parallel/gtest_parallel.py $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --workers=16 --dump_json_test_results=InferenceEngineUnitTests.json --gtest_filter=*smoke* -- --gtest_print_time=1
- script: $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineUnitTests.xml
displayName: 'IE UT old'
continueOnError: false
- script: $(INSTALL_TEST_DIR)/ieUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieUnitTests.xml
displayName: 'IE UT'
continueOnError: false
- script: $(INSTALL_TEST_DIR)/ov_cpu_unit_tests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_cpu_unit_tests.xml
displayName: 'Intel CPU Unit Tests'
continueOnError: false
- script: $(INSTALL_TEST_DIR)/ov_gna_unit_tests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_gna_unit_tests.xml
displayName: 'GNA UT'
continueOnError: false
- script: $(INSTALL_TEST_DIR)/vpuUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-vpuUnitTests.xml
displayName: 'VPU UT'
continueOnError: false
- script: $(INSTALL_TEST_DIR)/XLinkTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-XLinkTests.xml
displayName: 'XLink Tests'
continueOnError: false
- script: $(INSTALL_TEST_DIR)/ieMultiPluginUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieMultiPluginUnitTests.xml
displayName: 'MULTI UT'
continueOnError: false
- script: |
# because of IR reader v7
export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR)
$(INSTALL_TEST_DIR)/ieFuncTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieFuncTests.xml
displayName: 'IE FuncTests'
continueOnError: false
- script: |
export LD_LIBRARY_PATH=$(INSTALL_TEST_DIR):$LD_LIBRARY_PATH
$(INSTALL_TEST_DIR)/ov_template_func_tests --gtest_filter=*smoke* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-templateFuncTests.xml
displayName: 'TEMPLATE FuncTests'
continueOnError: false
# run not all smoke filter to save time in post-commit
- script: $(INSTALL_TEST_DIR)/ov_cpu_func_tests --gtest_filter=*OVCLass*:*CoreThreadingTests* --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_cpu_func_tests.xml
displayName: 'CPU FuncTests'
continueOnError: false
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
$(INSTALL_TEST_DIR)/InferenceEngineCAPITests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineCAPITests.xml
displayName: 'IE CAPITests'
continueOnError: false
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
$(INSTALL_TEST_DIR)/ov_capi_test --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_capi_test.xml
displayName: 'OV CAPITests'
continueOnError: false
- task: CMake@1
inputs:
cmakeArgs: >
-GNinja
-S $(REPO_DIR)/tests/samples_tests
-B $(BUILD_SAMPLES_TESTS_DIR)
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_SAMPLES_TESTS_DIR)/cmake_install.cmake
displayName: 'Install Samples Tests'
- script: python3 -m pip install -r $(INSTALL_TEST_DIR)/smoke_tests/requirements.txt
displayName: 'Install dependencies for samples smoke tests'
continueOnError: false
- script: |
export PATH=$HOME/.local/bin:$PATH
export IE_APP_PATH=$(INSTALL_DIR)/samples_bin
export LD_LIBRARY_PATH=$IE_APP_PATH:$LD_LIBRARY_PATH
# for gna plugin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(INSTALL_DIR)/lib/x86_64-linux-gnu:$(INSTALL_DIR)/lib/x86_64-linux-gnu/openvino-2022.3.0
export IE_APP_PYTHON_PATH=$(PYTHON_SAMPLES_INSTALL_DIR)/
export SHARE=$(INSTALL_TEST_DIR)/smoke_tests/samples_smoke_tests_data/
export WORKSPACE=$(INSTALL_DIR)
python3 -m pytest $(INSTALL_TEST_DIR)/smoke_tests/ --env_conf $(INSTALL_TEST_DIR)/smoke_tests/env_config.yml -s --junitxml=$(INSTALL_TEST_DIR)/TEST-SamplesSmokeTests.xml
displayName: 'Samples Smoke Tests'
continueOnError: false
- script: |
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
export PYTHONPATH=$(LAYER_TESTS_DIR):$PYTHONPATH
python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=$(INSTALL_TEST_DIR)/TEST-tf_Roll.xmlTEST
displayName: 'TensorFlow 1 Layer Tests - Legacy FE'
continueOnError: false
- task: PublishTestResults@2
condition: always()
inputs:
testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit, cTest
testResultsFiles: '**/TEST-*.xml'
#searchFolder: '$(BUILD_DIR)'
mergeTestResults: false # Optional
#failTaskOnFailedTests: false # Optional
#testRunTitle: 'Pre/Post-Commit' # Optional
buildPlatform: 'x64' # Optional
buildConfiguration: 'Linux' # Optional
#publishRunAttachments: true # Optional

View File

@@ -53,16 +53,17 @@ jobs:
# # CMake must get Python 3.x version by default
# cmakeArgs: >
# -GNinja
# -DCMAKE_VERBOSE_MAKEFILE=ON
# -DVERBOSE_BUILD=ON
# -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
# -DENABLE_PYTHON=ON
# -DPYTHON_EXECUTABLE=/usr/bin/python3.8
# -DENABLE_WHEEL=ON
# -DENABLE_TESTS=ON
# -DENABLE_OV_ONNX_FRONTEND=ON
# -DENABLE_FASTER_BUILD=ON
# -DENABLE_STRICT_DEPENDENCIES=OFF
# -DENABLE_REQUIREMENTS_INSTALL=OFF
# -DOPENVINO_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
# -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
# $(REPO_DIR)
# workingDirectory: $(BUILD_DIR)

View File

@@ -4,27 +4,8 @@ trigger:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- src/tests/functional/plugin/conformance/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- src/tests/functional/plugin/conformance/**
exclude:
- docs/*
jobs:
- job: OpenVINO_ONNX_CI

View File

@@ -4,27 +4,8 @@ trigger:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- src/tests/functional/plugin/conformance/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
- src/tests/functional/plugin/conformance/**
exclude:
- docs/*
jobs:
- job: onnxruntime
@@ -110,11 +91,11 @@ jobs:
cmakeArgs: >
-GNinja
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
-DENABLE_PYTHON=ON
-DPYTHON_EXECUTABLE=/usr/bin/python3.8
-DENABLE_INTEL_MYRIAD_COMMON=OFF
-DENABLE_INTEL_GNA=OFF
-DENABLE_OPENCV=OFF
-DENABLE_CPPLINT=OFF
-DENABLE_TESTS=OFF
-DENABLE_INTEL_CPU=ON

View File

@@ -4,25 +4,8 @@ trigger:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
exclude:
- docs/*
resources:
repositories:
@@ -44,7 +27,7 @@ jobs:
timeoutInMinutes: 360
pool:
vmImage: 'macOS-11'
vmImage: 'macOS-10.15'
variables:
system.debug: true
@@ -105,7 +88,7 @@ jobs:
- script: |
brew install cython
brew install automake
python3 -m pip install -r $(REPO_DIR)/src/frontends/onnx/tests/requirements.txt
python3 -m pip install -r $(REPO_DIR)/src/core/tests/requirements_test_onnx.txt
# Speed up build
brew install ninja
brew install ccache
@@ -118,22 +101,8 @@ jobs:
export PATH="/usr/local/opt/cython/bin:$PATH"
export CC=gcc
export CXX=g++
cmake -GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DENABLE_REQUIREMENTS_INSTALL=OFF \
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
-DENABLE_PYTHON=ON \
-DENABLE_TESTS=OFF \
-DENABLE_STRICT_DEPENDENCIES=OFF \
-DOPENVINO_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_LINKER_LAUNCHER=ccache \
-DCMAKE_C_LINKER_LAUNCHER=ccache \
-DBUILD_nvidia_plugin=OFF \
-S $(REPO_DIR) \
-B $(BUILD_DIR)
cmake -GNinja -DVERBOSE_BUILD=ON -DENABLE_REQUIREMENTS_INSTALL=OFF -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PYTHON=ON -DENABLE_TESTS=OFF -DENABLE_STRICT_DEPENDENCIES=OFF -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache $(REPO_DIR)
workingDirectory: $(BUILD_DIR)
displayName: 'CMake'
- script: ls -alR $(REPO_DIR)/temp/
@@ -165,7 +134,8 @@ jobs:
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List bin files'
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_DIR)
displayName: 'Install'
- script: ls -alR $(INSTALL_DIR)
@@ -173,58 +143,57 @@ jobs:
- script: |
set -e
cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P $(BUILD_DIR)/cmake_install.cmake
mkdir -p $(INSTALL_DIR)/opencv/
cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P cmake_install.cmake
cp -R $(REPO_DIR)/temp/opencv_4.5.2_osx/opencv/* $(INSTALL_DIR)/opencv/
workingDirectory: $(BUILD_DIR)
displayName: 'Install tests'
- script: ls -alR $(INSTALL_DIR)
displayName: 'List install files'
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-NGraphUT.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*:IE_CPU.onnx_model_sigmoid:IE_CPU/GRUSequenceOp.onnx_model_gru* --gtest_output=xml:TEST-NGraphUT.xml
workingDirectory: $(INSTALL_TEST_DIR)
displayName: 'OV Core UT'
continueOnError: false
enabled: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_ir_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-IRFrontend.xml
displayName: 'IR Frontend Tests'
continueOnError: false
enabled: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU*--gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ONNXFrontend.xml
displayName: 'ONNX Frontend Tests'
continueOnError: false
enabled: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineUnitTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_filter=-MKLDNNGraphStructureTests.TestNoRedundantReordersBeforeDWConvolution:TestConvolution/MKLDNNGraphConvolutionTests.TestsConvolution/0:TestConvolutionDefaultPrimitivesPriority/MKLDNNGraphConvolutionTests.TestsConvolution/0 --gtest_output=xml:TEST-InferenceEngineUnitTests.xml
displayName: 'IE UT old'
continueOnError: false
enabled: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieUnitTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieUnitTests --gtest_output=xml:TEST-ieUnitTests.xml
displayName: 'IE UT'
continueOnError: false
enabled: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_cpu_unit_tests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_cpu_unit_tests.xml
displayName: 'Intel CPU Unit Tests'
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/cpuUnitTests --gtest_output=xml:TEST-cpuUnitTests.xml
displayName: 'CPU UT'
continueOnError: false
enabled: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/vpuUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-vpuUnitTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/vpuUnitTests --gtest_output=xml:TEST-vpuUnitTests.xml
displayName: 'VPU UT'
continueOnError: false
enabled: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieMultiPluginUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieMultiPluginUnitTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/onnxImporterUnitTests --gtest_output=xml:TEST-onnxImporterUnitTests.xml
displayName: 'ONNX Importer UT'
continueOnError: false
enabled: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieMultiPluginUnitTests --gtest_output=xml:TEST-ieMultiPluginUnitTests.xml
displayName: 'MULTI UT'
continueOnError: false
enabled: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieFuncTests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ieFuncTests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ieFuncTests --gtest_output=xml:TEST-ieFuncTests.xml
displayName: 'IE FuncTests'
continueOnError: false
enabled: false
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_cpu_func_tests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_cpu_func_tests.xml
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/cpuFuncTests --gtest_filter=*smoke*:-smoke_LPT/ReduceMinTransformation.CompareWithRefImpl/f32_Shape* --gtest_print_time=1 --gtest_output=xml:TEST-cpuFuncTests.xml
displayName: 'CPU FuncTests'
continueOnError: false
enabled: false
@@ -232,15 +201,7 @@ jobs:
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
. $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineCAPITests --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-InferenceEngineCAPITests.xml
displayName: 'IE CAPITests'
continueOnError: false
enabled: false
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
. $(SETUPVARS) && $(INSTALL_TEST_DIR)/ov_capi_test --gtest_output=xml:$(INSTALL_TEST_DIR)/TEST-ov_capi_test.xml
. $(SETUPVARS) && $(INSTALL_TEST_DIR)/InferenceEngineCAPITests --gtest_output=xml:TEST-InferenceEngineCAPITests.xml
displayName: 'IE CAPITests'
continueOnError: false
enabled: false

View File

@@ -4,25 +4,8 @@ trigger:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
exclude:
- docs/*
resources:
repositories:
@@ -49,7 +32,7 @@ jobs:
maxParallel: 2
# About 150% of total time
timeoutInMinutes: 270 #Temporary change
timeoutInMinutes: 180
pool:
name: WIN_VMSS_VENV_D8S_WU2
@@ -74,7 +57,7 @@ jobs:
IB_DIR: C:\Program Files (x86)\IncrediBuild
IB_TESTCONSOLE: $(IB_DIR)\IBTestConsole.exe
PYTHON_DIR: C:\hostedtoolcache\windows\Python\3.7.6\x64
CMAKE_VERSION: 3.24.0
CMAKE_VERSION: 3.21.0
CMAKE_CMD: $(WORK_DIR)\cmake-$(CMAKE_VERSION)-windows-x86_64\cmake-$(CMAKE_VERSION)-windows-x86_64\bin\cmake.exe
OV_CMAKE_TOOLCHAIN_FILE: $(REPO_DIR)\cmake\toolchains\mt.runtime.win32.toolchain.cmake
@@ -129,11 +112,10 @@ jobs:
rem For running Python API tests
python -m pip install -r $(REPO_DIR)\src\bindings\python\src\compatibility\openvino\requirements-dev.txt
python -m pip install -r $(REPO_DIR)\src\bindings\python\wheel\requirements-dev.txt
python -m pip install -r $(REPO_DIR)\src\bindings\python\requirements.txt
rem For running Paddle frontend unit tests
python -m pip install -r $(REPO_DIR)\src\core\tests\frontend\paddle\requirements_dev.txt
rem For running ONNX frontend unit tests
python -m pip install -r $(REPO_DIR)\src\frontends/onnx\tests\requirements.txt
python -m pip install -r $(REPO_DIR)\src\core\tests\requirements_test_onnx.txt
rem For MO unit tests
python -m pip install -r $(REPO_DIR)\tools\mo\requirements.txt
python -m pip install -r $(REPO_DIR)\tools\mo\requirements_dev.txt
@@ -153,24 +135,8 @@ jobs:
- script: |
set PATH=$(WORK_DIR)\ninja-win;%PATH%
call "$(MSVS_VARS_PATH)" && $(CMAKE_CMD) -G "Ninja Multi-Config" ^
-DENABLE_ONEDNN_FOR_GPU=$(CMAKE_BUILD_SHARED_LIBS) ^
-DBUILD_SHARED_LIBS=$(CMAKE_BUILD_SHARED_LIBS) ^
-DENABLE_REQUIREMENTS_INSTALL=OFF ^
-DENABLE_FASTER_BUILD=ON ^
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) ^
-DENABLE_TESTS=ON ^
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON ^
-DENABLE_STRICT_DEPENDENCIES=OFF ^
-DENABLE_PYTHON=ON ^
-DBUILD_nvidia_plugin=OFF ^
-DPYTHON_EXECUTABLE="C:\hostedtoolcache\windows\Python\3.7.6\x64\python.exe" ^
-DPYTHON_INCLUDE_DIR="C:\hostedtoolcache\windows\Python\3.7.6\x64\include" ^
-DPYTHON_LIBRARY="C:\hostedtoolcache\windows\Python\3.7.6\x64\libs\python37.lib" ^
-DOPENVINO_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules ^
-DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" ^
-DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" ^
-S $(REPO_DIR) -B $(BUILD_DIR)
call "$(MSVS_VARS_PATH)" && $(CMAKE_CMD) -G "Ninja Multi-Config" -DENABLE_WHEEL=ON -DENABLE_ONEDNN_FOR_GPU=$(CMAKE_BUILD_SHARED_LIBS) -DBUILD_SHARED_LIBS=$(CMAKE_BUILD_SHARED_LIBS) -DENABLE_REQUIREMENTS_INSTALL=OFF -DENABLE_FASTER_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DENABLE_STRICT_DEPENDENCIES=OFF -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE="C:\hostedtoolcache\windows\Python\3.7.6\x64\python.exe" -DPYTHON_INCLUDE_DIR="C:\hostedtoolcache\windows\Python\3.7.6\x64\include" -DPYTHON_LIBRARY="C:\hostedtoolcache\windows\Python\3.7.6\x64\libs\python37.lib" -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)
workingDirectory: $(BUILD_DIR)
displayName: 'CMake'
- script: dir $(REPO_DIR)\temp\ /s
@@ -178,13 +144,15 @@ jobs:
- script: |
set PATH=$(WORK_DIR)\ninja-win;%PATH%
call "$(MSVS_VARS_PATH)" && "C:\Program Files (x86)\IncrediBuild\BuildConsole.exe" /COMMAND="$(CMAKE_CMD) --build $(BUILD_DIR) --config Release"
call "$(MSVS_VARS_PATH)" && "C:\Program Files (x86)\IncrediBuild\BuildConsole.exe" /COMMAND="$(CMAKE_CMD) --build . --config Release"
workingDirectory: $(BUILD_DIR)
displayName: 'Build Win - IB'
- script: dir $(REPO_DIR)\bin\ /s
displayName: 'List bin files'
- script: $(CMAKE_CMD) -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake
- script: $(CMAKE_CMD) -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_DIR)
displayName: 'Install'
- script: dir $(INSTALL_DIR) /s
@@ -193,26 +161,27 @@ jobs:
- script: python -m pip install openvino-dev --find-links=$(INSTALL_DIR)\tools
displayName: 'Install Wheels'
- script: |
call "$(MSVS_VARS_PATH)" && $(CMAKE_CMD) ^
-DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" ^
-DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" ^
-S $(REPO_DIR)\tests\samples_tests ^
-B $(BUILD_SAMPLES_TESTS_DIR)
displayName: 'CMake Samples Tests'
- script: call "$(MSVS_VARS_PATH)" && $(CMAKE_CMD) -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)\tests\samples_tests
workingDirectory: $(BUILD_SAMPLES_TESTS_DIR)
displayName: 'CMake'
- script: $(CMAKE_CMD) -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_SAMPLES_TESTS_DIR)\cmake_install.cmake
- script: $(CMAKE_CMD) -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_SAMPLES_TESTS_DIR)
displayName: 'Install Samples Tests'
- script: $(INSTALL_DIR)\samples\cpp\build_samples_msvc.bat -i $(INSTALL_DIR)
workingDirectory: $(BUILD_SAMPLES_DIR)
displayName: 'Build cpp samples'
continueOnError: false
- script: $(INSTALL_DIR)\samples\c\build_samples_msvc.bat -i $(INSTALL_DIR)
workingDirectory: $(BUILD_SAMPLES_DIR)
displayName: 'Build c samples'
continueOnError: false
- script: python -m pip install -r $(INSTALL_TEST_DIR)\smoke_tests\requirements.txt
- script: |
python -m pip install -r $(INSTALL_DIR)\tests\smoke_tests\requirements.txt
workingDirectory: $(INSTALL_DIR)
displayName: 'Install dependencies for samples smoke tests'
continueOnError: false
@@ -221,11 +190,13 @@ jobs:
set IE_APP_PYTHON_PATH=$(INSTALL_DIR)\samples\python\
set SHARE=$(INSTALL_DIR)\tests\smoke_tests\samples_smoke_tests_data\
set WORKSPACE=$(INSTALL_DIR)
python -m pytest $(INSTALL_DIR)\tests\smoke_tests\ --env_conf $(INSTALL_TEST_DIR)\smoke_tests\env_config.yml -s --junitxml=$(INSTALL_TEST_DIR)/TEST-SamplesSmokeTests.xml
python -m pytest $(INSTALL_DIR)\tests\smoke_tests\ --env_conf $(INSTALL_DIR)\tests\smoke_tests\env_config.yml -s --junitxml=TEST-SamplesSmokeTests.xml
workingDirectory: $(INSTALL_DIR)
displayName: 'Samples Smoke Tests'
continueOnError: false
- script: $(CMAKE_CMD) -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P $(BUILD_DIR)\cmake_install.cmake
- script: $(CMAKE_CMD) -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P cmake_install.cmake && xcopy $(REPO_DIR)\temp\opencv_4.5.2\opencv\* $(INSTALL_DIR)\opencv\ /e /h /y
workingDirectory: $(BUILD_DIR)
displayName: 'Install tests'
- script: dir $(INSTALL_DIR) /s
@@ -235,85 +206,75 @@ jobs:
displayName: 'Clean build dir'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-NGraphUT.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
workingDirectory: $(INSTALL_TEST_DIR)
displayName: 'OV Core UT'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_ir_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-IRFrontend.xml
displayName: 'IR Frontend Tests'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ONNXFrontend.xml
displayName: 'ONNX Frontend Tests'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\paddle_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-Paddle.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\paddle_tests --gtest_print_time=1 --gtest_output=xml:TEST-Paddle.xml
displayName: 'Paddle Frontend UT'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-Tensorflow.xml
displayName: 'TensorFlow Frontend Unit Tests'
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\tensorflow_tests --gtest_print_time=1 --gtest_output=xml:TEST-Tensorflow.xml
displayName: 'Tensorflow Frontend UT'
continueOnError: false
# set PATH=$(IB_DIR);%PATH%
# call $(SETUPVARS) && "$(IB_TESTCONSOLE)" $(INSTALL_TEST_DIR)\InferenceEngineUnitTests.exe --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-InferenceEngineUnitTests-IB.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\InferenceEngineUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-InferenceEngineUnitTests.xml
# call $(SETUPVARS) && "$(IB_TESTCONSOLE)" $(INSTALL_TEST_DIR)\InferenceEngineUnitTests.exe --gtest_output=xml:TEST-InferenceEngineUnitTests-IB.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\InferenceEngineUnitTests --gtest_output=xml:TEST-InferenceEngineUnitTests.xml
displayName: 'IE UT old'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ieUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ieUnitTests.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ieUnitTests --gtest_output=xml:TEST-ieUnitTests.xml
displayName: 'IE UT'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_cpu_unit_tests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ov_cpu_unit_tests.xml
displayName: 'Intel CPU Unit Tests'
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\cpuUnitTests --gtest_output=xml:TEST-cpuUnitTests.xml
displayName: 'CPU UT'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_gna_unit_tests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ov_gna_unit_tests.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\gnaUnitTests --gtest_output=xml:TEST-gnaUnitTests.xml
displayName: 'GNA UT'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\vpuUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-vpuUnitTests.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\vpuUnitTests --gtest_output=xml:TEST-vpuUnitTests.xml
displayName: 'VPU UT'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\XLinkTests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-XLinkTests.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\XLinkTests --gtest_output=xml:TEST-XLinkTests.xml
displayName: 'XLink Tests'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ieMultiPluginUnitTests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ieMultiPluginUnitTests.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\onnxImporterUnitTests --gtest_output=xml:TEST-onnxImporterUnitTests.xml
displayName: 'ONNX Importer UT'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ieMultiPluginUnitTests --gtest_output=xml:TEST-ieMultiPluginUnitTests.xml
displayName: 'MULTI UT'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ieFuncTests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ieFuncTests.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ieFuncTests --gtest_output=xml:TEST-ieFuncTests.xml
displayName: 'IE FuncTests'
continueOnError: false
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_template_func_tests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-templateFuncTests.xml
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_template_func_tests --gtest_output=xml:TEST-templateFuncTests.xml
displayName: 'TEMPLATE FuncTests'
continueOnError: false
# set PATH=$(IB_DIR);%PATH%
# call $(SETUPVARS) && "$(IB_TESTCONSOLE)" $(INSTALL_TEST_DIR)\ov_cpu_func_tests.exe --gtest_filter=*smoke*:-*CompareWithRefs/base_size=16_pre_nms_topn=100_post_nms_topn=100_nms_thresh=0.7_feat_stride=1_min_size=1_ratio*:*smoke_GRUSequenceCommonZeroClip/GRUSequenceTest.CompareWithRefs/mode=CONVERT_TO_TI_MAX_SEQ_LEN_CONST_seq_lengths* --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ov_cpu_func_tests-IB.xml /testlevel=24
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_cpu_func_tests --gtest_filter=*smoke* --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ov_cpu_func_tests.xml
# call $(SETUPVARS) && "$(IB_TESTCONSOLE)" $(INSTALL_TEST_DIR)\cpuFuncTests.exe --gtest_filter=*smoke*:-*CompareWithRefs/base_size=16_pre_nms_topn=100_post_nms_topn=100_nms_thresh=0.7_feat_stride=1_min_size=1_ratio*:*smoke_GRUSequenceCommonZeroClip/GRUSequenceTest.CompareWithRefs/mode=CONVERT_TO_TI_MAX_SEQ_LEN_CONST_seq_lengths* --gtest_output=xml:TEST-cpuFuncTests-IB.xml /testlevel=24
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\cpuFuncTests --gtest_filter=*smoke* --gtest_output=xml:TEST-cpuFuncTests.xml
displayName: 'CPU FuncTests'
continueOnError: false
condition: and(succeeded(), eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'OFF'))
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'OFF')
- script: |
set DATA_PATH=$(MODELS_PATH)
set MODELS_PATH=$(MODELS_PATH)
call $(SETUPVARS) && $(INSTALL_TEST_DIR)\InferenceEngineCAPITests --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-InferenceEngineCAPITests.xml
call $(SETUPVARS) && $(INSTALL_TEST_DIR)\InferenceEngineCAPITests --gtest_output=xml:TEST-InferenceEngineCAPITests.xml
displayName: 'IE CAPITests'
continueOnError: false
- script: |
set DATA_PATH=$(MODELS_PATH)
set MODELS_PATH=$(MODELS_PATH)
call $(SETUPVARS) && $(INSTALL_TEST_DIR)\ov_capi_test --gtest_output=xml:$(INSTALL_TEST_DIR)\TEST-ov_capi_test.xml
displayName: 'OV CAPITests'
continueOnError: false
- task: PublishTestResults@2
condition: always()
inputs:

View File

@@ -1,28 +1,11 @@
trigger:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/
- /**/docs/*
- /**/*.md
- README.md
- /**/layer_tests_summary/**
exclude:
- docs/*
jobs:
- job: WinCC
@@ -38,6 +21,7 @@ jobs:
VSTS_HTTP_TIMEOUT: 200
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
OPENVINO_CONTRIB_REPO_DIR: $(REPO_DIR)\..\openvino_contrib
MODELS_PATH: $(REPO_DIR)\..\testdata
WORK_DIR: $(Pipeline.Workspace)\_w
BUILD_DIR: $(WORK_DIR)\build
@@ -82,15 +66,7 @@ jobs:
- script: |
set PATH=$(WORK_DIR)\ninja-win;%PATH%
call "$(MSVS_VARS_PATH)" && cmake -GNinja ^
-DENABLE_FASTER_BUILD=ON ^
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON ^
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) ^
-DENABLE_PROFILING_ITT=ON ^
-DSELECTIVE_BUILD=COLLECT ^
-DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" ^
-DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" ^
$(REPO_DIR)
call "$(MSVS_VARS_PATH)" && cmake -GNinja -DENABLE_FASTER_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)
workingDirectory: $(BUILD_DIR)
displayName: 'CMake'

View File

@@ -36,8 +36,6 @@ RUN apt-get update && apt-get -y --no-install-recommends install \
ocl-icd-opencl-dev \
pkg-config \
unzip \
libtbb-dev \
libpugixml-dev \
wget \
# Python dependencies
python3 \
@@ -61,6 +59,7 @@ RUN cmake .. \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DENABLE_INTEL_MYRIAD_COMMON=OFF \
-DENABLE_INTEL_GNA=OFF \
-DENABLE_OPENCV=OFF \
-DENABLE_CPPLINT=OFF \
-DENABLE_NCC_STYLE=OFF \
-DENABLE_TESTS=OFF \
@@ -68,6 +67,9 @@ RUN cmake .. \
-DENABLE_INTEL_GPU=OFF \
-DENABLE_PROFILING_ITT=OFF \
-DENABLE_SAMPLES=OFF \
-DENABLE_PYTHON=ON \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DENABLE_OV_ONNX_FRONTEND=ON \
-DENABLE_OV_PADDLE_FRONTEND=OFF \
-DENABLE_OV_TF_FRONTEND=OFF \
-DENABLE_OPENVINO_DEBUG=OFF \
@@ -78,5 +80,5 @@ RUN ninja install
WORKDIR /openvino/src/bindings/python
ENV OpenVINO_DIR=/openvino/dist/runtime/cmake
ENV LD_LIBRARY_PATH=/openvino/dist/runtime/lib:/openvino/dist/runtime/3rdparty/tbb/lib
ENV PYTHONPATH=/openvino/bin/intel64/${BUILD_TYPE}/python_api/python3.8:${PYTHONPATH}
ENV PYTHONPATH=/openvino/bin/intel64/${BUILD_TYPE}/lib/python_api/python3.8:${PYTHONPATH}
CMD tox

View File

@@ -14,7 +14,7 @@ import json
from pathlib import Path
if sys.version_info[:2] < (3, 6):
if sys.hexversion < 0x3060000:
raise Exception("Python version must be >= 3.6")

View File

@@ -1,14 +1,10 @@
name: Documentation
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Build_Doc:
if: github.repository == 'openvinotoolkit/openvino'
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- name: Clone OpenVINO
uses: actions/checkout@v2
@@ -21,11 +17,11 @@ jobs:
set -e
# install doc dependencies
sudo apt update
sudo apt --assume-yes install libusb-1.0-0-dev graphviz texlive liblua5.2-0
sudo apt --assume-yes install libusb-1.0-0-dev graphviz texlive
cd docs
python3 -m pip install -r requirements.txt --user
python -m pip install -r requirements.txt --user
cd openvino_sphinx_theme
python3 setup.py install --user
python setup.py install --user
cd ../..
# install doxyrest
wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-2.1.3/doxyrest-2.1.3-linux-amd64.tar.xz
@@ -47,11 +43,11 @@ jobs:
run: |
mkdir build
cd build
cmake -DENABLE_DOCS=ON -DENABLE_PYTHON=ON -DCMAKE_BUILD_TYPE=Release ..
cmake -DENABLE_DOCS=ON -DENABLE_PYTHON=ON -DNGRAPH_PYTHON_BUILD_ENABLE=ON -DCMAKE_BUILD_TYPE=Release ..
- name: Build doc
run: |
cmake --build . --target sphinx_docs -j`nproc`
cmake --build . --target sphinx_docs -j8
working-directory: build
- name: Archive HTML

View File

@@ -1,13 +1,9 @@
name: PR Commits
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Checks:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- name: Clone OpenVINO
uses: actions/checkout@v2

View File

@@ -1,48 +0,0 @@
name: Code snippets
on:
push:
paths:
- '.github/workflows/code_snippets.yml'
- 'docs/snippets/**'
pull_request:
paths:
- '.github/workflows/code_snippets.yml'
- 'docs/snippets/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Build:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-22.04', 'macos-latest', 'windows-latest']
runs-on: ${{ matrix.os }}
steps:
- name: Clone OpenVINO
uses: actions/checkout@v2
with:
submodules: recursive
lfs: true
- name: Check cmake
run: |
which cmake
cmake --version
- name: CMake
run: |
mkdir build
cd build
cmake -DENABLE_INTEL_MYRIAD_COMMON=OFF -DCMAKE_BUILD_TYPE=Release ..
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: Build snippets
run: |
cmake --build . --target ie_docs_snippets -j${{ steps.cpu-cores.outputs.count }}
working-directory: build

View File

@@ -1,10 +1,6 @@
name: Code Style
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
clang-format:
runs-on: ubuntu-20.04
@@ -41,24 +37,18 @@ jobs:
- name: Create code style diff
if: failure()
run: |
cmake --build build --target clang_format_fix_all -j8
cmake --build . --target clang_format_fix_all -j8
git diff > code_style_diff.diff
- name: suggester / clang-format
if: failure() && startsWith(github.event_name, 'pull_request')
uses: reviewdog/action-suggester@v1
with:
level: error
tool_name: clang-format
working-directory: build
- uses: actions/upload-artifact@v2
if: failure()
with:
name: code_style_diff
path: code_style_diff.diff
path: build/code_style_diff.diff
ShellCheck:
runs-on: ubuntu-22.04
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
@@ -83,7 +73,7 @@ jobs:
working-directory: build
NamingConventionCheck:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
@@ -92,8 +82,8 @@ jobs:
- name: Install Clang dependency
run: |
sudo apt update
sudo apt --assume-yes remove clang-7 clang-8 clang-9 clang-10 clang-11 clang-12 clang-13
sudo apt --assume-yes install libclang-14-dev
sudo apt --assume-yes remove clang-7 clang-8 clang-9 clang-10 clang-11
sudo apt --assume-yes install libclang-12-dev
- name: Install Python-based dependencies
run: python3 -m pip install -r cmake/developer_package/ncc_naming_style/requirements_dev.txt

View File

@@ -1,13 +1,9 @@
name: Files Size
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Check_Files_Size:
runs-on: ubuntu-22.04
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

View File

@@ -7,13 +7,9 @@ on:
paths:
- 'openvino/tools/mo/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Pylint-UT:
runs-on: ubuntu-22.04
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
@@ -22,7 +18,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.6
- name: Cache pip
uses: actions/cache@v1

View File

@@ -6,20 +6,13 @@ on:
paths:
- 'src/bindings/python/**'
- 'samples/python/**'
- '.github/workflows/py_checks.yml'
pull_request:
paths:
- 'src/bindings/python/**'
- 'samples/python/**'
- '.github/workflows/py_checks.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linters:
runs-on: ubuntu-20.04
runs-on: ubuntu-18.04
steps:
- name: Code checkout
uses: actions/checkout@v2
@@ -28,7 +21,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.6'
- name: Install dependencies
run: python -m pip install -r src/bindings/python/requirements_test.txt
# samples code-style
@@ -127,3 +120,5 @@ jobs:
- name: Run Bandit
run: python -m bandit -r ./ -f screen
working-directory: src/bindings/python/src/compatibility/openvino

14
.gitignore vendored
View File

@@ -1,8 +1,5 @@
# build/artifact dirs
_*
[Bb]uild*/
cmake-build*
# but ensure we don't skip __init__.py and __main__.py
!__init__.py
!__main__.py
@@ -12,17 +9,23 @@ cmake-build*
# developer tools
*.idea
.vscode
cmake-build-*
.DS_Store
**/tags
compile_commands.json
bin/
build/
.local_vimrc
.gdb_history
.vimspector.json
doc/
!ngraph/doc
docs/build_documentation/work_dir/
inference-engine/plugins/
inference-engine/report
temp/
.repo/
docs/template_plugin/html/
CMakeLists.txt.user
docs/IE_PLUGIN_DG/html/
@@ -31,13 +34,14 @@ docs/IE_PLUGIN_DG/html/
*.pydevproject
*.settings
*/gen/
__pycache__
*.swp
/config.xml
# Python-specific
*.?env*
*.env3
*.pyc
__pycache__
# Tests-specific
*.coverage
*htmlcov

2
.gitmodules vendored
View File

@@ -1,6 +1,6 @@
[submodule "src/plugins/intel_cpu/thirdparty/onednn"]
path = src/plugins/intel_cpu/thirdparty/onednn
url = https://github.com/openvinotoolkit/oneDNN.git
url = https://github.com/luo-cheng2021/oneDNN.git
ignore = dirty
[submodule "thirdparty/xbyak"]
path = thirdparty/xbyak

View File

@@ -8,13 +8,7 @@ if(DEFINED BUILD_SHARED_LIBS AND NOT BUILD_SHARED_LIBS)
# incorrect OpenVINOConfig.cmake in this case
cmake_minimum_required(VERSION 3.17)
else()
if(CPACK_GENERATOR STREQUAL "DEB")
# we have to use CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS variable
cmake_minimum_required(VERSION 3.20)
else()
# default choice
cmake_minimum_required(VERSION 3.13)
endif()
cmake_minimum_required(VERSION 3.13)
endif()
project(OpenVINO DESCRIPTION "OpenVINO toolkit")
@@ -81,7 +75,7 @@ function(openvino_developer_export_targets)
get_target_property(original_name ${target_name} ALIASED_TARGET)
if(TARGET "${original_name}")
message(STATUS "The name ${target_name} is an ALIAS for ${original_name}. "
"It will be exported to the OpenVINODeveloperPackage with the original name.")
"It will be exported to the InferenceEngineDeveloperPackage with the original name.")
list(REMOVE_ITEM ${EXPORT_COMPONENT} ${target_name})
list(APPEND ${EXPORT_COMPONENT} ${original_name})
endif()
@@ -99,17 +93,15 @@ function(openvino_developer_export_targets)
endfunction()
# add target with processed tests model zoo
if (ENABLE_TESTS)
include(cmake/test_model_zoo.cmake)
endif()
include(cmake/test_model_zoo.cmake)
add_subdirectory(thirdparty)
add_subdirectory(src)
add_subdirectory(samples)
# Enable interpreter backend for tests
# Enable interpreter backend
if (ENABLE_TESTS OR ENABLE_TEMPLATE)
add_subdirectory(src/plugins/template/backend)
add_subdirectory(docs/template_plugin/backend)
endif()
include(cmake/extra_modules.cmake)
add_subdirectory(docs)
@@ -121,7 +113,4 @@ add_subdirectory(licensing)
# CPack
#
# provides a callback function to describe each component in repo
include(cmake/packaging/packaging.cmake)
ie_cpack(${IE_CPACK_COMPONENTS_ALL})

View File

@@ -17,7 +17,6 @@ Jenkinsfile @openvinotoolkit/openvino-admins
# QA Tests:
/tests/ @openvinotoolkit/openvino-tests-maintainers
/tests/layer_tests @openvinotoolkit/openvino-tests-maintainers @openvinotoolkit/openvino-mo-maintainers
# Tools:
/tools/ @openvinotoolkit/openvino-tools-maintainers
@@ -28,81 +27,67 @@ Jenkinsfile @openvinotoolkit/openvino-admins
# POT:
/tools/pot/ @openvinotoolkit/openvino-pot-maintainers
# OpenVINO Core:
/src/inference/ @openvinotoolkit/openvino-ie-maintainers
/cmake/ @openvinotoolkit/openvino-ie-maintainers
/src/cmake/ @openvinotoolkit/openvino-ie-maintainers
CMakeLists.txt @openvinotoolkit/openvino-ie-maintainers
*cmake @openvinotoolkit/openvino-ie-maintainers
/src/common/cc/ @openvinotoolkit/openvino-ie-maintainers
/src/common/itt/ @openvinotoolkit/openvino-ie-maintainers
/src/common/legacy/ @openvinotoolkit/openvino-ie-maintainers
/src/common/preprocessing/ @openvinotoolkit/openvino-ie-maintainers
/src/common/util/ @openvinotoolkit/openvino-ie-maintainers
/thirdparty/ @openvinotoolkit/openvino-ie-maintainers
/scripts/ @openvinotoolkit/openvino-ie-maintainers
# IE Core:
/inference-engine/ @openvinotoolkit/openvino-ie-maintainers
/src/bindings/python/ @openvinotoolkit/openvino-ie-python-api-maintainers
/src/bindings/c/ @openvinotoolkit/openvino-c-api-maintainers
/src/common/*transformations/ @openvinotoolkit/openvino-ie-transformations-maintainers
/src/common/transformations/ @GlebKazantaev @ilyachur
/src/common/legacy/ @openvinotoolkit/openvino-ngraph-maintainers
/src/common/ @openvinotoolkit/openvino-ie-maintainers
/src/core/ @openvinotoolkit/openvino-ngraph-maintainers
/src/frontends/ @openvinotoolkit/openvino-ngraph-maintainers
/src/tests_deprecated/readers/ @openvinotoolkit/openvino-ngraph-maintainers
# OpenVINO CPU:
# IE CPU:
/src/plugins/intel_cpu/ @openvinotoolkit/openvino-ie-cpu-maintainers @openvinotoolkit/openvino-ie-cpu-developers
/src/common/snippets/ @openvinotoolkit/openvino-ie-cpu-maintainers
/src/tests/**cpu** @openvinotoolkit/openvino-ie-cpu-maintainers
/src/plugins/intel_cpu/thirdparty/onednn/ @openvinotoolkit/openvino-ie-cpu-maintainers @openvinotoolkit/openvino-ie-cpu-developers
# OpenVINO LPT
#IE LPT
/src/common/low_precision_transformations/ @openvinotoolkit/openvino-ie-lpt-maintainers
# OpenVINO GPU:
/src/plugins/intel_gpu/ @openvinotoolkit/openvino-ie-gpu-maintainers @openvinotoolkit/openvino-ie-gpu-developers
/src/tests/**gpu** @openvinotoolkit/openvino-ie-gpu-maintainers
# IE GPU:
/src/inference/include/ie/gpu/ @openvinotoolkit/openvino-ie-gpu-maintainers @openvinotoolkit/openvino-ie-gpu-developers
/src/inference/include/ie/cldnn/ @openvinotoolkit/openvino-ie-gpu-maintainers @openvinotoolkit/openvino-ie-gpu-developers
/src/inference/include/openvino/runtime/intel_gpu/ @openvinotoolkit/openvino-ie-gpu-maintainers @openvinotoolkit/openvino-ie-gpu-developers
/src/plugins/intel_gpu/ @openvinotoolkit/openvino-ie-gpu-maintainers @openvinotoolkit/openvino-ie-gpu-developers
/docs/snippets/gpu/ @openvinotoolkit/openvino-ie-gpu-maintainers @openvinotoolkit/openvino-ie-gpu-developers
/docs/OV_Runtime_UG/supported_plugins/GPU.md @openvinotoolkit/openvino-ie-gpu-maintainers @openvinotoolkit/openvino-ie-gpu-developers
/docs/OV_Runtime_UG/supported_plugins/GPU_RemoteTensor_API.md @openvinotoolkit/openvino-ie-gpu-maintainers @openvinotoolkit/openvino-ie-gpu-developers
# OpenVINO VPU:
# IE VPU:
/src/plugins/intel_myriad @openvinotoolkit/openvino-ie-vpu-maintainers
/src/tests/**myriad** @openvinotoolkit/openvino-ie-vpu-maintainers
/src/inference/include/ie/vpu/ @openvinotoolkit/openvino-ie-vpu-maintainers
/src/inference/include/ie/vpu/ @openvinotoolkit/openvino-ie-vpu-maintainers
/src/tests_deprecated/unit/engines/vpu/ @openvinotoolkit/openvino-ie-vpu-maintainers @openvinotoolkit/openvino-ie-tests-maintainers
/src/tests_deprecated/functional/vpu/ @openvinotoolkit/openvino-ie-vpu-maintainers @openvinotoolkit/openvino-ie-tests-maintainers
/src/tests_deprecated/behavior/vpu/ @openvinotoolkit/openvino-ie-vpu-maintainers @openvinotoolkit/openvino-ie-tests-maintainers
/src/tests/functional/plugin/myriad/ @openvinotoolkit/openvino-ie-vpu-maintainers @openvinotoolkit/openvino-ie-tests-maintainers
/src/tests/unit/vpu/ @openvinotoolkit/openvino-ie-vpu-maintainers @openvinotoolkit/openvino-ie-tests-maintainers
/src/tests/unit/engines/vpu/ @openvinotoolkit/openvino-ie-vpu-maintainers @openvinotoolkit/openvino-ie-tests-maintainers
/inference-engine/scripts/run_tests_myriad_multistick.sh @openvinotoolkit/openvino-ie-vpu-maintainers
# OpenVINO GNA:
# IE GNA:
/src/plugins/intel_gna/ @openvinotoolkit/openvino-ie-gna-maintainers
/src/tests/**gna** @openvinotoolkit/openvino-ie-gna-maintainers
/src/inference/include/ie/gna/ @openvinotoolkit/openvino-ie-gna-maintainers
# OpenVINO ARM CPU:
# IE ARM CPU:
/docs/OV_Runtime_UG/supported_plugins/ARM_CPU.md @openvinotoolkit/openvino_contrib-arm_plugin-maintainers
# OpenVINO Auto (MULTI) plugin:
# IE Auto (MULTI) plugin:
/src/plugins/auto/ @openvinotoolkit/openvino-ie-auto-multi-maintainers
/src/inference/include/ie/multi-device/ @openvinotoolkit/openvino-ie-auto-multi-maintainers
# OpenVINO Auto (Batch) plugin:
/src/plugins/auto_batch/ @openvinotoolkit/openvino-auto-batch-maintainers
# OpenVINO Hetero plugin:
/src/plugins/hetero/ @openvinotoolkit/openvino-hetero-maintainers
# OpenVINO Frontends:
/src/frontends/common/ @openvinotoolkit/openvino-common-frontend-maintainers
/src/frontends/ir/ @openvinotoolkit/openvino-ir-frontend-maintainers
/src/frontends/onnx/ @openvinotoolkit/openvino-onnx-frontend-maintainers
/src/frontends/tests/onnx/ @openvinotoolkit/openvino-onnx-frontend-maintainers
# IE Paddle frontend:
/src/frontends/paddle/ @openvinotoolkit/openvino-ie-paddle-maintainers
/src/frontends/tensorflow/ @openvinotoolkit/openvino-tf-frontend-maintainers
# OpenVINO Tests:
# IE Tests:
/src/tests/ @openvinotoolkit/openvino-ie-tests-maintainers @openvinotoolkit/openvino-ie-test-developers
/src/tests_deprecated/ @openvinotoolkit/openvino-ie-tests-maintainers @openvinotoolkit/openvino-ie-test-developers
/src/frontends/tests/frontend/shared/ @openvinotoolkit/openvino-ie-tests-maintainers
/src/tests/functional/inference_engine/ngraph_reader/ @openvinotoolkit/openvino-ie-tests-maintainers @openvinotoolkit/openvino-ngraph-maintainers
/src/tests/functional/inference_engine/transformations/ @openvinotoolkit/openvino-ie-tests-maintainers @openvinotoolkit/openvino-ngraph-maintainers
# Documentation:
/docs/ @openvinotoolkit/openvino-docs-maintainers
/docs/MO_DG @openvinotoolkit/openvino-mo-maintainers @openvinotoolkit/openvino-docs-maintainers
*.md @openvinotoolkit/openvino-docs-maintainers
README @openvinotoolkit/openvino-docs-maintainers
/src/plugins/template/ @openvinotoolkit/openvino-ie-template-maintainers
/docs/template_plugin/ @openvinotoolkit/openvino-ie-template-maintainers
*.md @openvinotoolkit/openvino-docs-maintainers
# Control 3d party dependencies
**/*requirements*.* @openvinotoolkit/openvino-configuration-mgmt

View File

@@ -21,7 +21,7 @@ We welcome community contributions to OpenVINO™. Please read the following gui
- Choose a base branch for your work. More details about branches and policies are here: [Branches](https://github.com/openvinotoolkit/openvino/wiki/Branches)
- Clone your fork to your computer.
- Create a new branch (with a meaningful name) from the base branch you chose.
- Modify / add the code following our [Coding Style Guide](./docs/dev/coding_style.md).
- Modify / add the code following our [Coding Style Guide](https://github.com/openvinotoolkit/openvino/wiki/CodingStyleGuideLines).
- If you want to add a new sample, please look at this [Guide for contributing to C++/C/Python IE samples](https://github.com/openvinotoolkit/openvino/wiki/SampleContribute)
- If you want to contribute to the documentation and want to add a new guide, follow that instruction [Documentation guidelines](https://github.com/openvinotoolkit/openvino/wiki/CodingStyleGuideLinesDocumentation)
- Run testsuite locally:
@@ -35,7 +35,7 @@ Following these guidelines will increase the likelihood of your pull request bei
- One PR one issue.
- Build perfectly on your local system.
- Choose the right base branch [Branches](https://github.com/openvinotoolkit/openvino/wiki/Branches).
- Follow the [Coding Style Guide](./docs/dev/coding_style.md) for your code.
- Follow the [Coding Style Guide](https://github.com/openvinotoolkit/openvino/wiki/CodingStyleGuideLines) for your code.
- Update documentation using [Documentation guidelines](https://github.com/openvinotoolkit/openvino/wiki/CodingStyleGuideLinesDocumentation) if needed.
- Cover your changes with test.
- Add license at the top of new files [C++ example](https://github.com/openvinotoolkit/openvino/blob/master/samples/cpp/classification_sample_async/main.cpp#L1-L2), [Python example](https://github.com/openvinotoolkit/openvino/blob/master/samples/python/hello_classification/hello_classification.py#L3-L4).
@@ -52,4 +52,4 @@ Your pull request will be automatically tested by OpenVINO™'s precommit (testi
## Merging PR
When the reviewer accepts the pull request and the pre-commit shows a "green" status, the review status is set to "Approved", which signals to the OpenVINO™ maintainers that they can merge your pull request.
As soon as the reviewer is fine with the pull request and precommit shows "green" status, the "Approved" review status is put, which signals OpenVINO™ maintainers that they can merge your pull request.

View File

@@ -2,7 +2,7 @@
<img src="docs/img/openvino-logo-purple-black.png" width="400px">
[![Stable release](https://img.shields.io/badge/version-2022.2-green.svg)](https://github.com/openvinotoolkit/openvino/releases/tag/2022.2.0)
[![Stable release](https://img.shields.io/badge/version-2022.1-green.svg)](https://github.com/openvinotoolkit/openvino/releases/tag/2022.1)
[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE)
![GitHub branch checks state](https://img.shields.io/github/checks-status/openvinotoolkit/openvino/master?label=GitHub%20checks)
![Azure DevOps builds (branch)](https://img.shields.io/azure-devops/build/openvinoci/b2bab62f-ab2f-4871-a538-86ea1be7d20f/13?label=Public%20CI)
@@ -34,24 +34,24 @@ OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference.
- Reduce resource demands and efficiently deploy on a range of Intel® platforms from edge to cloud
This open-source version includes several components: namely [Model Optimizer], [OpenVINO™ Runtime], [Post-Training Optimization Tool], as well as CPU, GPU, MYRIAD, multi device and heterogeneous plugins to accelerate deep learning inference on Intel® CPUs and Intel® Processor Graphics.
It supports pre-trained models from [Open Model Zoo], along with 100+ open
This open-source version includes several components: namely [Model Optimizer], [OpenVINO™ Runtime], [Post-Training Optimization Tool], as well as CPU, GPU, MYRIAD, multi device and heterogeneous plugins to accelerate deep learning inferencing on Intel® CPUs and Intel® Processor Graphics.
It supports pre-trained models from the [Open Model Zoo], along with 100+ open
source and public models in popular formats such as TensorFlow, ONNX, PaddlePaddle, MXNet, Caffe, Kaldi.
### Components
* [OpenVINO™ Runtime] - is a set of C++ libraries with C and Python bindings providing a common API to deliver inference solutions on the platform of your choice.
* [core](./src/core) - provides the base API for model representation and modification.
* [inference](./src/inference) - provides an API to infer models on the device.
* [transformations](./src/common/transformations) - contains the set of common transformations which are used in OpenVINO plugins.
* [low precision transformations](./src/common/low_precision_transformations) - contains the set of transformations that are used in low precision models
* [bindings](./src/bindings) - contains all available OpenVINO bindings which are maintained by the OpenVINO team.
* [c](./src/bindings/c) - C API for OpenVINO™ Runtime
* [python](./src/bindings/python) - Python API for OpenVINO™ Runtime
* [Plugins](./src/plugins) - contains OpenVINO plugins which are maintained in open-source by the OpenVINO team. For more information, take a look at the [list of supported devices](#supported-hardware-matrix).
* [Frontends](./src/frontends) - contains available OpenVINO frontends that allow reading models from the native framework format.
* [core](https://github.com/openvinotoolkit/openvino/tree/master/src/core) - provides the base API for model representation and modification.
* [inference](https://github.com/openvinotoolkit/openvino/tree/master/src/inference) - provides an API to infer models on device.
* [transformations](https://github.com/openvinotoolkit/openvino/tree/master/src/common/transformations) - contains the set of common transformations which are used in OpenVINO plugins.
* [low precision transformations](https://github.com/openvinotoolkit/openvino/tree/master/src/common/low_precision_transformations) - contains the set of transformations which are used in low precision models
* [bindings](https://github.com/openvinotoolkit/openvino/tree/master/src/bindings) - contains all awailable OpenVINO bindings which are maintained by OpenVINO team.
* [c](https://github.com/openvinotoolkit/openvino/tree/master/src/bindings/c) - provides C API for OpenVINO™ Runtime
* [python](https://github.com/openvinotoolkit/openvino/tree/master/src/bindings/python) - Python API for OpenVINO™ Runtime
* [Plugins](https://github.com/openvinotoolkit/openvino/tree/master/src/plugins) - contains OpenVINO plugins which are maintained in open-source by OpenVINO team. For more information please taje a look to the [list of supported devices](#supported-hardware-matrix).
* [Frontends](https://github.com/openvinotoolkit/openvino/tree/master/src/frontends) - contains available OpenVINO frontends which allow to read model from native framework format.
* [Model Optimizer] - is a cross-platform command-line tool that facilitates the transition between training and deployment environments, performs static model analysis, and adjusts deep learning models for optimal execution on end-point target devices.
* [Post-Training Optimization Tool] - is designed to accelerate the inference of deep learning models by applying special methods without model retraining or fine-tuning, for example, post-training 8-bit quantization.
* [Samples] - applications in C, C++ and Python languages that show basic OpenVINO use cases.
* [Samples] - applications on C, C++ and Python languages which shows basic use cases of OpenVINO usages.
## Supported Hardware matrix
@@ -70,7 +70,7 @@ The OpenVINO™ Runtime can infer models on different hardware devices. This sec
<tr>
<td rowspan=2>CPU</td>
<td> <a href="https://docs.openvino.ai/nightly/openvino_docs_OV_UG_supported_plugins_CPU.html#doxid-openvino-docs-o-v-u-g-supported-plugins-c-p-u">Intel CPU</a></tb>
<td><b><i><a href="./src/plugins/intel_cpu">openvino_intel_cpu_plugin</a></i></b></td>
<td><b><i><a href="https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_cpu">openvino_intel_cpu_plugin</a></i></b></td>
<td>Intel Xeon with Intel® Advanced Vector Extensions 2 (Intel® AVX2), Intel® Advanced Vector Extensions 512 (Intel® AVX-512), and AVX512_BF16, Intel Core Processors with Intel AVX2, Intel Atom Processors with Intel® Streaming SIMD Extensions (Intel® SSE)</td>
</tr>
<tr>
@@ -81,25 +81,25 @@ The OpenVINO™ Runtime can infer models on different hardware devices. This sec
<tr>
<td>GPU</td>
<td><a href="https://docs.openvino.ai/nightly/openvino_docs_OV_UG_supported_plugins_GPU.html#doxid-openvino-docs-o-v-u-g-supported-plugins-g-p-u">Intel GPU</a></td>
<td><b><i><a href="./src/plugins/intel_gpu">openvino_intel_gpu_plugin</a></i></b></td>
<td><b><i><a href="https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_gpu">openvino_intel_gpu_plugin</a></i></b></td>
<td>Intel Processor Graphics, including Intel HD Graphics and Intel Iris Graphics</td>
</tr>
<tr>
<td>GNA</td>
<td><a href="https://docs.openvino.ai/nightly/openvino_docs_OV_UG_supported_plugins_GNA.html#doxid-openvino-docs-o-v-u-g-supported-plugins-g-n-a">Intel GNA</a></td>
<td><b><i><a href="./src/plugins/intel_gna">openvino_intel_gna_plugin</a></i></b></td>
<td><b><i><a href="https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_gna">openvino_intel_gna_plugin</a></i></b></td>
<td>Intel Speech Enabling Developer Kit, Amazon Alexa* Premium Far-Field Developer Kit, Intel Pentium Silver J5005 Processor, Intel Pentium Silver N5000 Processor, Intel Celeron J4005 Processor, Intel Celeron J4105 Processor, Intel Celeron Processor N4100, Intel Celeron Processor N4000, Intel Core i3-8121U Processor, Intel Core i7-1065G7 Processor, Intel Core i7-1060G7 Processor, Intel Core i5-1035G4 Processor, Intel Core i5-1035G7 Processor, Intel Core i5-1035G1 Processor, Intel Core i5-1030G7 Processor, Intel Core i5-1030G4 Processor, Intel Core i3-1005G1 Processor, Intel Core i3-1000G1 Processor, Intel Core i3-1000G4 Processor</td>
</tr>
<tr>
<td>VPU</td>
<td><a href="https://docs.openvino.ai/nightly/openvino_docs_IE_DG_supported_plugins_VPU.html#doxid-openvino-docs-i-e-d-g-supported-plugins-v-p-u">Myriad plugin</a></td>
<td><b><i><a href="./src/plugins/intel_myriad">openvino_intel_myriad_plugin</a></i></b></td>
<td><b><i><a href="https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/intel_myriad">openvino_intel_myriad_plugin</a></i></b></td>
<td>Intel® Neural Compute Stick 2 powered by the Intel® Movidius™ Myriad™ X</td>
</tr>
</tbody>
</table>
OpenVINO™ Toolkit also contains several plugins which simplify loading models on several hardware devices:
Also OpenVINO™ Toolkit contains several plugins which should simplify to load model on several hardware devices:
<table>
<thead>
<tr>
@@ -111,22 +111,22 @@ OpenVINO™ Toolkit also contains several plugins which simplify loading models
<tbody>
<tr>
<td><a href="https://docs.openvino.ai/nightly/openvino_docs_IE_DG_supported_plugins_AUTO.html#doxid-openvino-docs-i-e-d-g-supported-plugins-a-u-t-o">Auto</a></td>
<td><b><i><a href="./src/plugins/auto">openvino_auto_plugin</a></i></b></td>
<td><b><i><a href="https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/auto">openvino_auto_plugin</a></i></b></td>
<td>Auto plugin enables selecting Intel device for inference automatically</td>
</tr>
<tr>
<td><a href="https://docs.openvino.ai/nightly/openvino_docs_OV_UG_Automatic_Batching.html">Auto Batch</a></td>
<td><b><i><a href="./src/plugins/auto_batch">openvino_auto_batch_plugin</a></i></b></td>
<td><b><i><a href="https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/auto_batch">openvino_auto_batch_plugin</a></i></b></td>
<td>Auto batch plugin performs on-the-fly automatic batching (i.e. grouping inference requests together) to improve device utilization, with no programming effort from the user</td>
</tr>
<tr>
<td><a href="https://docs.openvino.ai/nightly/openvino_docs_OV_UG_Hetero_execution.html#doxid-openvino-docs-o-v-u-g-hetero-execution">Hetero</a></td>
<td><b><i><a href="./src/plugins/hetero">openvino_hetero_plugin</a></i></b></td>
<td><b><i><a href="https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/hetero">openvino_hetero_plugin</a></i></b></td>
<td>Heterogeneous execution enables automatic inference splitting between several devices</td>
</tr>
<tr>
<td><a href="https://docs.openvino.ai/nightly/openvino_docs_OV_UG_Running_on_multiple_devices.html#doxid-openvino-docs-o-v-u-g-running-on-multiple-devices">Multi</a></td>
<td><b><i><a href="./src/plugins/auto">openvino_auto_plugin</a></i></b></td>
<td><b><i><a href="https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/auto">openvino_auto_plugin</a></i></b></td>
<td>Multi plugin enables simultaneous inference of the same model on several devices in parallel</td>
</tr>
</tbody>
@@ -140,11 +140,11 @@ By contributing to the project, you agree to the license and copyright terms the
### User documentation
The latest documentation for OpenVINO™ Toolkit is available [here](https://docs.openvino.ai/). This documentation contains detailed information about all OpenVINO components and provides all the important information you may need to create an application based on binary OpenVINO distribution or own OpenVINO version without source code modification.
The latest documentation for OpenVINO™ Toolkit is availabe [here](https://docs.openvino.ai/). This documentation contains detailed information about all OpenVINO components and provides all important information which could be needed if you create an application which is based on binary OpenVINO distribution or own OpenVINO version without source code modification.
### Developer documentation
[Developer documentation](./docs/dev/index.md) contains information about architectural decisions which are applied inside the OpenVINO components. This documentation has all necessary information which could be needed in order to contribute to OpenVINO.
[Developer documentation](#todo-add) contains information about architectural decisions which are applied inside the OpenVINO components. This documentation has all necessary information which could be needed in order to contribute to OpenVINO.
## Tutorials
@@ -161,15 +161,15 @@ The list of OpenVINO tutorials:
## System requirements
The system requirements vary depending on platform and are available on dedicated pages:
- [Linux](https://docs.openvino.ai/nightly/openvino_docs_install_guides_installing_openvino_linux_header.html)
- [Windows](https://docs.openvino.ai/nightly/openvino_docs_install_guides_installing_openvino_windows_header.html)
- [macOS](https://docs.openvino.ai/nightly/openvino_docs_install_guides_installing_openvino_macos_header.html)
- [Raspbian](https://docs.openvino.ai/nightly/openvino_docs_install_guides_installing_openvino_raspbian.html)
The full information about system requirements depends on platform and available in section `System requirement` on dedicated pages:
- [Linux](https://docs.openvino.ai/latest/openvino_docs_install_guides_installing_openvino_linux.html)
- [Windows](https://docs.openvino.ai/latest/openvino_docs_install_guides_installing_openvino_windows.html)
- [macOS](https://docs.openvino.ai/latest/openvino_docs_install_guides_installing_openvino_macos.html)
- [Raspbian](https://docs.openvino.ai/latest/openvino_docs_install_guides_installing_openvino_raspbian.html)
## How to build
See the [OpenVINO Wiki](https://github.com/openvinotoolkit/openvino/wiki#how-to-build) to get more information about the OpenVINO build process.
Please take a look to [OpenVINO Wiki](https://github.com/openvinotoolkit/openvino/wiki#how-to-build) to get more information about OpenVINO build process.
## How to contribute
@@ -177,13 +177,13 @@ See [CONTRIBUTING](./CONTRIBUTING.md) for details. Thank you!
## Get a support
Report questions, issues and suggestions, using:
Please report questions, issues and suggestions using:
* [GitHub* Issues](https://github.com/openvinotoolkit/openvino/issues)
* The [`openvino`](https://stackoverflow.com/questions/tagged/openvino) tag on StackOverflow\*
* [Forum](https://software.intel.com/en-us/forums/computer-vision)
## Additional Resources
## See also
* [OpenVINO Wiki](https://github.com/openvinotoolkit/openvino/wiki)
* [OpenVINO Storage](https://storage.openvinotoolkit.org/)
@@ -194,15 +194,15 @@ Report questions, issues and suggestions, using:
* [Neural Network Compression Framework (NNCF)](https://github.com/openvinotoolkit/nncf) - a suite of advanced algorithms for model inference optimization including quantization, filter pruning, binarization and sparsity
* [OpenVINO™ Training Extensions (OTE)](https://github.com/openvinotoolkit/training_extensions) - convenient environment to train Deep Learning models and convert them using OpenVINO for optimized inference.
* [OpenVINO™ Model Server (OVMS)](https://github.com/openvinotoolkit/model_server) - a scalable, high-performance solution for serving deep learning models optimized for Intel architectures
* [DL Workbench](https://docs.openvino.ai/nightly/workbench_docs_Workbench_DG_Introduction.html) - an alternative, web-based version of OpenVINO designed to facilitate optimization and compression of pre-trained deep learning models.
* [Computer Vision Annotation Tool (CVAT)](https://github.com/opencv/cvat) - an online, interactive video and image annotation tool for computer vision purposes.
* [DL Workbench](https://docs.openvino.ai/nightly/workbench_docs_Workbench_DG_Introduction.html) - An alternative, web-based version of OpenVINO designed to make production of pretrained deep learning models significantly easier.
* [Computer Vision Annotation Tool (CVAT)](https://github.com/openvinotoolkit/cvat) - an online, interactive video and image annotation tool for computer vision purposes.
* [Dataset Management Framework (Datumaro)](https://github.com/openvinotoolkit/datumaro) - a framework and CLI tool to build, transform, and analyze datasets.
---
\* Other names and brands may be claimed as the property of others.
[Open Model Zoo]:https://github.com/openvinotoolkit/open_model_zoo
[OpenVINO™ Runtime]:https://docs.openvino.ai/nightly/openvino_docs_OV_UG_OV_Runtime_User_Guide.html
[Model Optimizer]:https://docs.openvino.ai/nightly/openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html
[Post-Training Optimization Tool]:https://docs.openvino.ai/nightly/pot_introduction.html
[OpenVINO™ Runtime]:https://docs.openvino.ai/latest/openvino_docs_OV_UG_OV_Runtime_User_Guide.html
[Model Optimizer]:https://docs.openvino.ai/latest/openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html
[Post-Training Optimization Tool]:https://docs.openvino.ai/latest/pot_introduction.html
[Samples]:https://github.com/openvinotoolkit/openvino/tree/master/samples

View File

@@ -7,7 +7,6 @@ set(CMAKE_SYSTEM_PROCESSOR armv7l)
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
set(CMAKE_STRIP arm-linux-gnueabihf-strip)
set(PKG_CONFIG_EXECUTABLE arm-linux-gnueabihf-pkg-config CACHE PATH "Path to ARM pkg-config")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

View File

@@ -7,7 +7,6 @@ set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
set(CMAKE_STRIP aarch64-linux-gnu-strip)
set(PKG_CONFIG_EXECUTABLE aarch64-linux-gnu-pkg-config CACHE PATH "Path to ARM64 pkg-config")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)

View File

@@ -4,149 +4,90 @@
set(OV_COVERAGE_BASE_DIRECTORY "${OpenVINO_SOURCE_DIR}")
ov_coverage_clean(REPOSITORY "openvino"
ie_coverage_clean(REPOSITORY "openvino"
DIRECTORY "${OV_COVERAGE_GCDA_DATA_DIRECTORY}")
ov_coverage_capture(INFO_FILE "openvino"
ie_coverage_capture(INFO_FILE "openvino"
BASE_DIRECTORY "${OV_COVERAGE_BASE_DIRECTORY}"
DIRECTORY "${OV_COVERAGE_GCDA_DATA_DIRECTORY}"
EXCLUDE_PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/*.pb.cc"
"${OV_COVERAGE_BASE_DIRECTORY}/*.pb.h"
"${OV_COVERAGE_BASE_DIRECTORY}/*/tests/*"
"${OV_COVERAGE_BASE_DIRECTORY}/*/tests_deprecated/*"
"${OV_COVERAGE_BASE_DIRECTORY}/thirdparty/*") # Skip some pb files, tests and thirdparty
# Common report
ov_coverage_genhtml(INFO_FILE "openvino"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
DIRECTORY "${OV_COVERAGE_GCDA_DATA_DIRECTORY}")
# Generate reports
##################### Core Components #####################
ov_coverage_extract(INPUT "openvino" OUTPUT "inference"
ie_coverage_extract(INPUT "openvino" OUTPUT "inference"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/inference/*")
ov_coverage_genhtml(INFO_FILE "inference"
ie_coverage_genhtml(INFO_FILE "inference"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
ov_coverage_extract(INPUT "openvino" OUTPUT "core"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/core/*")
ov_coverage_genhtml(INFO_FILE "core"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
ov_coverage_extract(INPUT "openvino" OUTPUT "transformations"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/common/transformations/*")
ov_coverage_genhtml(INFO_FILE "transformations"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
ov_coverage_extract(INPUT "openvino" OUTPUT "low_precision_transformations"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/common/low_precision_transformations/*")
ov_coverage_genhtml(INFO_FILE "low_precision_transformations"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
ov_coverage_extract(INPUT "openvino" OUTPUT "legacy"
ie_coverage_extract(INPUT "openvino" OUTPUT "legacy"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/common/legacy/*")
ov_coverage_genhtml(INFO_FILE "legacy"
ie_coverage_genhtml(INFO_FILE "legacy"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
ov_coverage_extract(INPUT "openvino" OUTPUT "preprocessing"
ie_coverage_extract(INPUT "openvino" OUTPUT "hetero_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/hetero/*")
ie_coverage_genhtml(INFO_FILE "hetero_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
ie_coverage_extract(INPUT "openvino" OUTPUT "auto_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/auto/*")
ie_coverage_genhtml(INFO_FILE "auto_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
ie_coverage_extract(INPUT "openvino" OUTPUT "preprocessing"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}src/common/preprocessing/*")
ov_coverage_genhtml(INFO_FILE "preprocessing"
ie_coverage_genhtml(INFO_FILE "preprocessing"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
ov_coverage_extract(INPUT "openvino" OUTPUT "snippets"
ie_coverage_extract(INPUT "openvino" OUTPUT "transformations"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/common/transformations/*")
ie_coverage_genhtml(INFO_FILE "transformations"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
ie_coverage_extract(INPUT "openvino" OUTPUT "snippets"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/common/snippets/*")
ov_coverage_genhtml(INFO_FILE "snippets"
ie_coverage_genhtml(INFO_FILE "snippets"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
ov_coverage_extract(INPUT "openvino" OUTPUT "frontend_common"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/common/*")
ov_coverage_genhtml(INFO_FILE "frontend_common"
ie_coverage_extract(INPUT "openvino" OUTPUT "low_precision_transformations"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/common/low_precision_transformations/*")
ie_coverage_genhtml(INFO_FILE "low_precision_transformations"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
##################### Core Components #####################
##################### Plugins #####################
if(ENABLE_AUTO OR ENABLE_MULTI)
ov_coverage_extract(INPUT "openvino" OUTPUT "auto_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/auto/*")
ov_coverage_genhtml(INFO_FILE "auto_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
if(ENABLE_AUTO_BATCH)
ov_coverage_extract(INPUT "openvino" OUTPUT "auto_batch_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/auto_batch/*")
ov_coverage_genhtml(INFO_FILE "auto_batch_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
if(ENABLE_HETERO)
ov_coverage_extract(INPUT "openvino" OUTPUT "hetero_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/hetero/*")
ov_coverage_genhtml(INFO_FILE "hetero_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
ie_coverage_extract(INPUT "openvino" OUTPUT "template_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/docs/template_plugin/*")
ie_coverage_genhtml(INFO_FILE "template_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
if(ENABLE_INTEL_CPU)
ov_coverage_extract(INPUT "openvino" OUTPUT "intel_cpu_plugin"
ie_coverage_extract(INPUT "openvino" OUTPUT "intel_cpu_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/intel_cpu/*")
ov_coverage_genhtml(INFO_FILE "intel_cpu_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
if(ENABLE_INTEL_GNA)
ov_coverage_extract(INPUT "openvino" OUTPUT "intel_gna_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/intel_gna/*")
ov_coverage_genhtml(INFO_FILE "intel_gna_plugin"
ie_coverage_genhtml(INFO_FILE "intel_cpu_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
if (ENABLE_INTEL_GPU)
ov_coverage_extract(INPUT "openvino" OUTPUT "intel_gpu_plugin"
ie_coverage_extract(INPUT "openvino" OUTPUT "intel_gpu_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/intel_gpu/*")
ov_coverage_genhtml(INFO_FILE "intel_gpu_plugin"
ie_coverage_genhtml(INFO_FILE "intel_gpu_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
if(ENABLE_INTEL_MYRIAD)
ov_coverage_extract(INPUT "openvino" OUTPUT "intel_myriad_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/intel_myriad/*")
ov_coverage_genhtml(INFO_FILE "intel_myriad_plugin"
if(ENABLE_INTEL_GNA)
ie_coverage_extract(INPUT "openvino" OUTPUT "intel_gna_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/intel_gna/*")
ie_coverage_genhtml(INFO_FILE "intel_gna_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
if(ENABLE_TEMPLATE)
ov_coverage_extract(INPUT "openvino" OUTPUT "template_plugin"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/plugins/template/*")
ov_coverage_genhtml(INFO_FILE "template_plugin"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
##################### Plugins #####################
##################### Frontends #####################
if(ENABLE_OV_IR_FRONTEND)
ov_coverage_extract(INPUT "openvino" OUTPUT "ir_frontend"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/ir/*")
ov_coverage_genhtml(INFO_FILE "ir_frontend"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
ie_coverage_extract(INPUT "openvino" OUTPUT "core"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/core/*")
ie_coverage_genhtml(INFO_FILE "core"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
if(ENABLE_OV_ONNX_FRONTEND)
ov_coverage_extract(INPUT "openvino" OUTPUT "onnx_frontend"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/onnx/*")
ov_coverage_genhtml(INFO_FILE "onnx_frontend"
ie_coverage_extract(INPUT "openvino" OUTPUT "onnx"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/onnx/*"
"${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/onnx/*")
ie_coverage_genhtml(INFO_FILE "onnx"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
if(ENABLE_OV_PADDLE_FRONTEND)
ov_coverage_extract(INPUT "openvino" OUTPUT "paddle_frontend"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/paddle/*")
ov_coverage_genhtml(INFO_FILE "paddle_frontend"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
if(ENABLE_OV_TF_FRONTEND)
ov_coverage_extract(INPUT "openvino" OUTPUT "tf_frontend"
PATTERNS "${OV_COVERAGE_BASE_DIRECTORY}/src/frontends/tensorflow/*")
ov_coverage_genhtml(INFO_FILE "tf_frontend"
PREFIX "${OV_COVERAGE_BASE_DIRECTORY}")
endif()
##################### Frontends #####################

View File

@@ -4,7 +4,7 @@
cmake_policy(SET CMP0054 NEW)
# TODO: fix it, outside of source dir MO cannot find TBB dependency
# TODO: fix it
set_temp_directory(TEMP "${CMAKE_SOURCE_DIR}")
if(ENABLE_SAME_BRANCH_FOR_MODELS)
@@ -23,6 +23,32 @@ message(STATUS "MODELS_PATH=" ${MODELS_PATH})
fetch_models_and_validation_set()
get_linux_name(LINUX_OS_NAME)
if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_SYSTEM_NAME MATCHES Linux AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
set(protoc_version "3.18.2")
RESOLVE_DEPENDENCY(SYSTEM_PROTOC_ROOT
ARCHIVE_LIN "protoc-${protoc_version}-linux-x86_64.tar.gz"
TARGET_PATH "${TEMP}/protoc-${protoc_version}-linux-x86_64"
SHA256 "42fde2b6044c1f74c7e86d4e03b43aac87128ddf57ac6ed8c4eab7a1e21bbf21"
)
debug_message(STATUS "host protoc-${protoc_version} root path = " ${SYSTEM_PROTOC_ROOT})
reset_deps_cache(SYSTEM_PROTOC)
find_host_program(
SYSTEM_PROTOC
NAMES protoc
PATHS "${SYSTEM_PROTOC_ROOT}/bin"
NO_DEFAULT_PATH)
if(NOT SYSTEM_PROTOC)
message(FATAL_ERROR "[ONNX IMPORTER] Missing host protoc binary")
endif()
update_deps_cache(SYSTEM_PROTOC "${SYSTEM_PROTOC}" "Path to host protoc for ONNX Importer")
endif()
if(ENABLE_INTEL_MYRIAD)
include(${OpenVINO_SOURCE_DIR}/src/plugins/intel_myriad/myriad_dependencies.cmake)
endif()
@@ -57,10 +83,10 @@ if(THREADING STREQUAL "OMP")
update_deps_cache(OMP "${OMP}" "Path to OMP root folder")
debug_message(STATUS "intel_omp=" ${OMP})
ie_cpack_add_component(omp HIDDEN)
ie_cpack_add_component(omp REQUIRED)
file(GLOB_RECURSE source_list "${OMP}/*${CMAKE_SHARED_LIBRARY_SUFFIX}*")
install(FILES ${source_list}
DESTINATION ${OV_CPACK_RUNTIMEDIR}
DESTINATION "runtime/3rdparty/omp/lib"
COMPONENT omp)
endif()
@@ -76,7 +102,7 @@ function(ov_download_tbb)
if(_ov_download_tbb_done OR NOT THREADING MATCHES "^(TBB|TBB_AUTO)$")
return()
endif()
set(_ov_download_tbb_done ON CACHE INTERNAL "Whether prebuilt TBB is already downloaded")
set(_ov_download_tbb_done ON CACHE BOOL "Whether prebuilt TBB is already downloaded")
reset_deps_cache(TBBROOT TBB_DIR)
@@ -89,12 +115,11 @@ function(ov_download_tbb)
if(WIN32 AND X86_64)
# TODO: add target_path to be platform specific as well, to avoid following if
RESOLVE_DEPENDENCY(TBB
ARCHIVE_WIN "tbb2020_617e9a71_win.zip"
ARCHIVE_WIN "tbb2020_20200415_win.zip"
TARGET_PATH "${TEMP}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "01cac3cc48705bd52b83a6e1fa1ed95c708928be76160f5b9c5c37f954d56df4"
USE_NEW_LOCATION TRUE)
elseif(ANDROID AND X86_64) # Should be before LINUX due LINUX is detected as well
SHA256 "f1c9b9e2861efdaa01552bd25312ccbc5feeb45551e5f91ae61e29221c5c1479")
elseif(ANDROID) # Should be before LINUX due LINUX is detected as well
RESOLVE_DEPENDENCY(TBB
ARCHIVE_ANDROID "tbb2020_20200404_android.tgz"
TARGET_PATH "${TEMP}/tbb"
@@ -106,7 +131,7 @@ function(ov_download_tbb)
TARGET_PATH "${TEMP}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "95b2f3b0b70c7376a0c7de351a355c2c514b42c4966e77e3e34271a599501008")
elseif(YOCTO_AARCH64)
elseif(LINUX AND AARCH64)
RESOLVE_DEPENDENCY(TBB
ARCHIVE_LIN "keembay/tbb2020_38404_kmb_lic.tgz"
TARGET_PATH "${TEMP}/tbb_yocto"
@@ -119,16 +144,13 @@ function(ov_download_tbb)
ENVIRONMENT "TBBROOT"
SHA256 "ad9cf52e657660058aa6c6844914bc0fc66241fec89a392d8b79a7ff69c3c7f6")
else()
message(WARNING "Prebuilt TBB is not available on current platform")
message(FATAL_ERROR "TBB is not available on current platform")
endif()
update_deps_cache(TBBROOT "${TBB}" "Path to TBB root folder")
if(EXISTS "${TBBROOT}/lib/cmake/TBB/TBBConfig.cmake")
# oneTBB case
update_deps_cache(TBB_DIR "${TBBROOT}/lib/cmake/TBB" "Path to TBB cmake folder")
elseif(EXISTS "${TBBROOT}/lib/cmake/tbb/TBBConfig.cmake")
# oneTBB release package version less than 2021.6.0
update_deps_cache(TBB_DIR "${TBBROOT}/lib/cmake/tbb" "Path to TBB cmake folder")
elseif(EXISTS "${TBBROOT}/lib64/cmake/TBB/TBBConfig.cmake")
# 64-bits oneTBB case
update_deps_cache(TBB_DIR "${TBBROOT}/lib64/cmake/TBB" "Path to TBB cmake folder")
@@ -142,6 +164,8 @@ function(ov_download_tbb)
debug_message(STATUS "tbb=" ${TBB})
debug_message(STATUS "tbb_dir=" ${TBB_DIR})
debug_message(STATUS "tbbroot=" ${TBBROOT})
set(TBB "${TBB}" PARENT_SCOPE)
endfunction()
## TBBBind_2_5 package
@@ -155,9 +179,9 @@ function(ov_download_tbbbind_2_5)
if(_ov_download_tbbbind_2_5_done OR NOT ENABLE_TBBBIND_2_5)
return()
endif()
set(_ov_download_tbbbind_2_5_done ON CACHE INTERNAL "Whether prebuilt TBBBind_2_5 is already downloaded")
set(_ov_download_tbbbind_2_5_done ON CACHE BOOL "Whether prebuilt TBBBind_2_5 is already downloaded")
reset_deps_cache(TBBBIND_2_5_ROOT TBBBIND_2_5_DIR)
reset_deps_cache(TBBBIND_2_5_DIR)
if(DEFINED ENV{THIRDPARTY_SERVER_PATH})
set(IE_PATH_TO_DEPS "$ENV{THIRDPARTY_SERVER_PATH}")
@@ -171,23 +195,22 @@ function(ov_download_tbbbind_2_5)
TARGET_PATH "${TEMP}/tbbbind_2_5"
ENVIRONMENT "TBBBIND_2_5_ROOT"
SHA256 "a67afeea8cf194f97968c800dab5b5459972908295242e282045d6b8953573c1")
elseif((LINUX AND NOT ANDROID) AND X86_64)
elseif(ANDROID)
# don't have TBBBIND_2_5
elseif(LINUX AND X86_64)
RESOLVE_DEPENDENCY(TBBBIND_2_5
ARCHIVE_LIN "tbbbind_2_5_static_lin_v2.tgz"
TARGET_PATH "${TEMP}/tbbbind_2_5"
ENVIRONMENT "TBBBIND_2_5_ROOT"
SHA256 "865e7894c58402233caf0d1b288056e0e6ab2bf7c9d00c9dc60561c484bc90f4")
else()
# TMP: for Apple Silicon TBB does not provide TBBBind
if(NOT (APPLE AND AARCH64))
message(WARNING "prebuilt TBBBIND_2_5 is not available.
message(WARNING "prebuilt TBBBIND_2_5 is not available.
Build oneTBB from sources and set TBBROOT environment var before OpenVINO cmake configure")
endif()
return()
endif()
update_deps_cache(TBBBIND_2_5_ROOT "${TBBBIND_2_5}" "Path to TBBBIND_2_5 root folder")
update_deps_cache(TBBBIND_2_5_DIR "${TBBBIND_2_5}/cmake" "Path to TBBBIND_2_5 cmake folder")
set(TBBBIND_2_5 "${TBBBIND_2_5}" PARENT_SCOPE)
endfunction()
## OpenCV
@@ -198,7 +221,7 @@ if(ENABLE_OPENCV)
set(OPENCV_BUILD "076")
set(OPENCV_BUILD_YOCTO "772")
if(YOCTO_AARCH64)
if(AARCH64)
if(DEFINED ENV{THIRDPARTY_SERVER_PATH})
set(IE_PATH_TO_DEPS "$ENV{THIRDPARTY_SERVER_PATH}")
elseif(DEFINED THIRDPARTY_SERVER_PATH)
@@ -236,7 +259,7 @@ if(ENABLE_OPENCV)
VERSION_REGEX ".*_([0-9]+.[0-9]+.[0-9]+).*"
SHA256 "3e162f96e86cba8836618134831d9cf76df0438778b3e27e261dedad9254c514")
elseif(LINUX)
if(YOCTO_AARCH64)
if(AARCH64)
set(OPENCV_SUFFIX "yocto_kmb")
set(OPENCV_BUILD "${OPENCV_BUILD_YOCTO}")
elseif(ARM)
@@ -255,10 +278,7 @@ 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 "Ubuntu 21.10" OR
LINUX_OS_NAME STREQUAL "Ubuntu 22.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 "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})
@@ -294,8 +314,8 @@ if(ENABLE_INTEL_GNA)
GNA_LIB_DIR
libGNA_INCLUDE_DIRS
libGNA_LIBRARIES_BASE_PATH)
set(GNA_VERSION "03.00.00.1815.1")
set(GNA_HASH "682eb01e5a148ea03b90ee12b7fd67afb1479f35ccf2966f83b208e50e91633c")
set(GNA_VERSION "03.00.00.1455.2")
set(GNA_HASH "e52785d3f730fefb4e794bb7ab40c8676537ef2f7c69c5b4bb89a5d3cc0bbe60")
set(FILES_TO_EXTRACT_LIST gna_${GNA_VERSION}/include)
if(WIN32)
@@ -305,12 +325,11 @@ if(ENABLE_INTEL_GNA)
endif()
RESOLVE_DEPENDENCY(GNA_EXT_DIR
ARCHIVE_UNIFIED "gna/GNA_${GNA_VERSION}.zip"
ARCHIVE_UNIFIED "GNA/GNA_${GNA_VERSION}.zip"
TARGET_PATH "${TEMP}/gna_${GNA_VERSION}"
VERSION_REGEX ".*_([0-9]+.[0-9]+.[0-9]+.[0-9]+).*"
FILES_TO_EXTRACT FILES_TO_EXTRACT_LIST
SHA256 ${GNA_HASH}
USE_NEW_LOCATION TRUE)
SHA256 ${GNA_HASH})
update_deps_cache(GNA_EXT_DIR "${GNA_EXT_DIR}" "Path to GNA root folder")
debug_message(STATUS "gna=" ${GNA_EXT_DIR})

View File

@@ -14,7 +14,7 @@ set(CMAKE_MODULE_PATH "${IEDevScripts_DIR}")
function(set_ci_build_number)
set(repo_root "${CMAKE_SOURCE_DIR}")
include(version)
foreach(var CI_BUILD_NUMBER OpenVINO_VERSION OpenVINO_SOVERSION OpenVINO_VERSION_SUFFIX OpenVINO_VERSION_BUILD
foreach(var CI_BUILD_NUMBER OpenVINO_VERSION OpenVINO_VERSION_BUILD
OpenVINO_VERSION_MAJOR OpenVINO_VERSION_MINOR OpenVINO_VERSION_PATCH)
if(NOT DEFINED ${var})
message(FATAL_ERROR "${var} version component is not defined")
@@ -23,28 +23,26 @@ function(set_ci_build_number)
endforeach()
endfunction()
set_ci_build_number()
include(features)
include(message)
set_ci_build_number()
#
# Detect target
#
include(target_flags)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ARCH_FOLDER)
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} ARCH_FOLDER)
if(X86_64)
set(ARCH_FOLDER intel64)
elseif(X86)
set(ARCH_FOLDER ia32)
elseif(MSVC AND ARM)
set(ARCH_FOLDER arm)
elseif((MSVC OR APPLE) AND AARCH64)
elseif(MSVC AND AARCH64)
set(ARCH_FOLDER arm64)
elseif(UNIVERSAL2)
set(ARCH_FOLDER universal2)
endif()
#
@@ -79,11 +77,6 @@ if(NOT COMMAND find_host_package)
find_package(${ARGN})
endmacro()
endif()
if(NOT COMMAND find_host_library)
macro(find_host_library)
find_library(${ARGN})
endmacro()
endif()
if(NOT COMMAND find_host_program)
macro(find_host_program)
find_program(${ARGN})
@@ -94,6 +87,7 @@ endif()
# Common scripts
#
include(packaging)
include(coverage/coverage)
include(shellcheck/shellcheck)
@@ -170,34 +164,19 @@ macro(ov_set_if_not_defined var value)
endif()
endmacro()
ov_set_if_not_defined(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
ov_set_if_not_defined(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
if(NOT UNIX)
ov_set_if_not_defined(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
ov_set_if_not_defined(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
else()
ov_set_if_not_defined(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/lib)
ov_set_if_not_defined(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/lib)
endif()
ov_set_if_not_defined(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
ov_set_if_not_defined(CMAKE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
ov_set_if_not_defined(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
if(CPACK_GENERATOR MATCHES "^(DEB|RPM)$")
# to make sure that lib/<multiarch-tuple> is created on Debian
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Cmake install prefix" FORCE)
endif()
include(packaging/packaging)
set(CMAKE_SKIP_INSTALL_RPATH ON)
if(APPLE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
if(DEFINED OV_CPACK_LIBRARYDIR)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OV_CPACK_LIBRARYDIR}")
else()
message(FATAL_ERROR "Internal error: OV_CPACK_LIBRARYDIR is not defined, while it's required to initialize RPATH")
endif()
if(CPACK_GENERATOR STREQUAL "BREW")
set(CMAKE_SKIP_INSTALL_RPATH OFF)
endif()
set(CMAKE_MACOSX_RPATH ON)
# WA for Xcode generator + object libraries issue:
# https://gitlab.kitware.com/cmake/cmake/issues/20260
# http://cmake.3232098.n2.nabble.com/XCODE-DEPEND-HELPER-make-Deletes-Targets-Before-and-While-They-re-Built-td7598277.html
@@ -207,18 +186,10 @@ endif()
# Use solution folders
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# CMake 3.0+: Enable CMAKE_<LANG>_COMPILER_ID AppleClang
set(CMAKE_POLICY_DEFAULT_CMP0025 NEW)
# CMake 3.0+: MACOSX_RPATH is enabled by default.
set(CMAKE_POLICY_DEFAULT_CMP0026 NEW)
# CMake 3.0+ (2.8.12): MacOS "@rpath" in target's install name
set(CMAKE_POLICY_DEFAULT_CMP0042 NEW)
# CMake 3.9+: `RPATH` settings on macOS do not affect `install_name`.
set(CMAKE_POLICY_DEFAULT_CMP0068 NEW)
# CMake 3.13+: option() honors normal variables.
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
# CMake 3.22+ :cmake_dependent_option() supports full Condition Syntax
# cmake_dependent_option() supports full Condition Syntax
set(CMAKE_POLICY_DEFAULT_CMP0127 NEW)
# Enable CMAKE_<LANG>_COMPILER_ID AppleClang
set(CMAKE_POLICY_DEFAULT_CMP0025 NEW)
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "Don't warn about obsolete cmake versions in 3rdparty")
set(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION ON CACHE BOOL "Warn about absolute paths in destination")
@@ -248,7 +219,7 @@ macro(ov_install_static_lib target comp)
set_target_properties(${target} PROPERTIES EXCLUDE_FROM_ALL FALSE)
endif()
install(TARGETS ${target} EXPORT OpenVINOTargets
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${comp} ${ARGN})
ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT ${comp} ${ARGN})
endif()
endmacro()
@@ -277,8 +248,6 @@ if(ENABLE_FUZZING)
enable_fuzzing()
endif()
get_linux_name(LINUX_OS_NAME)
# macro to mark target as conditionally compiled
function(ie_mark_target_as_cc TARGET_NAME)
@@ -304,7 +273,46 @@ function(ov_mark_target_as_cc)
ie_mark_target_as_cc(${ARGN})
endfunction()
include(python_requirements)
# check python package
function(ie_check_pip_package full_name message_type)
find_package(PythonInterp 3 REQUIRED)
get_filename_component(PYTHON_EXEC_DIR ${PYTHON_EXECUTABLE} DIRECTORY)
# extract version if any
if(full_name MATCHES "^([a-z_]+)[~=<>!]*(.*)$")
set(name ${CMAKE_MATCH_1})
set(req_version ${CMAKE_MATCH_2})
else()
set(name ${full_name})
endif()
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -m pip show ${name}
WORKING_DIRECTORY ${PYTHON_EXEC_DIR}
RESULT_VARIABLE PIP_EXIT_CODE
OUTPUT_VARIABLE output)
if(NOT PIP_EXIT_CODE EQUAL 0)
set(${name}_FOUND OFF PARENT_SCOPE)
message(${message_type} "${name} package is not installed. Please use \"${PYTHON_EXECUTABLE} -m pip install ${full_name}\".")
else()
if(req_version)
string(REGEX MATCH "Version: ([0-9]+\.?[0-9]*\.?[0-9]*)\n" installed_version "${output}")
if(installed_version)
set(installed_version "${CMAKE_MATCH_1}")
endif()
if(NOT req_version STREQUAL installed_version)
message(${message_type} "${name} package is installed, but may have different version (${installed_version}). "
"Please use \"${PYTHON_EXECUTABLE} -m pip install ${full_name}\".")
endif()
else()
set(${name}_FOUND ON PARENT_SCOPE)
endif()
endif()
endfunction()
# Code style utils

View File

@@ -27,10 +27,9 @@ unset(TBB_DIR)
unset(TBB_DIR CACHE)
find_package(TBB
2017.0
CONFIG
PATHS "${IEDevScripts_DIR}/${IE_OWN_TBB_CONFIG}"
NO_DEFAULT_PATH
NO_CMAKE_FIND_ROOT_PATH)
PATHS ${TBBROOT}/cmake
${IEDevScripts_DIR}/${IE_OWN_TBB_CONFIG}
NO_DEFAULT_PATH)
find_package_handle_standard_args(TBB CONFIG_MODE)

View File

@@ -7,13 +7,13 @@ if(ENABLE_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)
if(NOT CLANG_VERSION OR CLANG_VERSION STREQUAL "")
message(WARNING "Supported clang-format version is 9!")
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)
message(WARNING "Supported clang-format version is 9! Provided version ${CLANG_FORMAT_MAJOR_VERSION}")
if(NOT ${CLANG_FORMAT_MAJOR_VERSION} EQUAL "9")
message(WARNING "Supported clang-format version is 9!")
set(ENABLE_CLANG_FORMAT OFF)
endif()
endif()
@@ -28,6 +28,7 @@ if(ENABLE_CLANG_FORMAT AND NOT TARGET clang_format_check_all)
add_custom_target(clang_format_fix_all)
set_target_properties(clang_format_check_all clang_format_fix_all
PROPERTIES FOLDER clang_format)
set(CLANG_FORMAT_ALL_OUTPUT_FILES "" CACHE INTERNAL "All clang-format output files")
endif()
function(add_clang_format_target TARGET_NAME)
@@ -87,10 +88,14 @@ function(add_clang_format_target TARGET_NAME)
"[clang-format] ${source_file}"
VERBATIM)
list(APPEND all_input_sources "${source_file}")
list(APPEND all_output_files "${output_file}")
endforeach()
set(CLANG_FORMAT_ALL_OUTPUT_FILES
${CLANG_FORMAT_ALL_OUTPUT_FILES} ${all_output_files}
CACHE INTERNAL
"All clang-format output files")
add_custom_target(${TARGET_NAME}
DEPENDS ${all_output_files}
COMMENT "[clang-format] ${TARGET_NAME}")
@@ -99,11 +104,11 @@ function(add_clang_format_target TARGET_NAME)
COMMAND
"${CMAKE_COMMAND}"
-D "CLANG_FORMAT=${CLANG_FORMAT}"
-D "INPUT_FILES=${all_input_sources}"
-D "INPUT_FILES=${CLANG_FORMAT_FOR_SOURCES}"
-D "EXCLUDE_PATTERNS=${CLANG_FORMAT_EXCLUDE_PATTERNS}"
-P "${IEDevScripts_DIR}/clang_format/clang_format_fix.cmake"
DEPENDS
"${all_input_sources}"
"${CLANG_FORMAT_FOR_SOURCES}"
"${IEDevScripts_DIR}/clang_format/clang_format_fix.cmake"
COMMENT
"[clang-format] ${TARGET_NAME}_fix"

View File

@@ -69,112 +69,104 @@ endmacro()
#
# Provides SSE4.2 compilation flags depending on an OS and a compiler
#
macro(ie_sse42_optimization_flags flags)
function(ie_sse42_optimization_flags flags)
if(WIN32)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# No such option for MSVC 2019
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(${flags} /QxSSE4.2)
set(${flags} /QxSSE4.2 PARENT_SCOPE)
else()
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
endif()
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(${flags} -xSSE4.2)
set(${flags} -xSSE4.2 PARENT_SCOPE)
else()
set(${flags} -msse4.2)
set(${flags} -msse4.2 PARENT_SCOPE)
endif()
endif()
endmacro()
endfunction()
#
# Provides AVX2 compilation flags depending on an OS and a compiler
#
macro(ie_avx2_optimization_flags flags)
function(ie_avx2_optimization_flags flags)
if(WIN32)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(${flags} /QxCORE-AVX2)
set(${flags} /QxCORE-AVX2 PARENT_SCOPE)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(${flags} /arch:AVX2)
set(${flags} /arch:AVX2 PARENT_SCOPE)
else()
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
endif()
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(${flags} -xCORE-AVX2)
set(${flags} -xCORE-AVX2 PARENT_SCOPE)
else()
set(${flags} -mavx2 -mfma)
set(${flags} -mavx2 -mfma PARENT_SCOPE)
endif()
endif()
endmacro()
endfunction()
#
# Provides common AVX512 compilation flags for AVX512F instruction set support
# depending on an OS and a compiler
#
macro(ie_avx512_optimization_flags flags)
function(ie_avx512_optimization_flags flags)
if(WIN32)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(${flags} /QxCOMMON-AVX512)
set(${flags} /QxCOMMON-AVX512 PARENT_SCOPE)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(${flags} /arch:AVX512)
set(${flags} /arch:AVX512 PARENT_SCOPE)
else()
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
endif()
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(${flags} -xCOMMON-AVX512)
set(${flags} -xCOMMON-AVX512 PARENT_SCOPE)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(${flags} -mavx512f -mfma)
set(${flags} -mavx512f -mfma PARENT_SCOPE)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|AppleClang)$")
set(${flags} -mavx512f -mfma)
set(${flags} -mavx512f -mfma PARENT_SCOPE)
endif()
endif()
endmacro()
endfunction()
macro(ie_arm_neon_optimization_flags flags)
function(ie_arm_neon_optimization_flags flags)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# nothing
elseif(ANDROID)
if(ANDROID_ABI STREQUAL "arm64-v8a")
set(${flags} -mfpu=neon -Wno-unused-command-line-argument)
set(${flags} -mfpu=neon PARENT_SCOPE)
elseif(ANDROID_ABI STREQUAL "armeabi-v7a-hard with NEON")
set(${flags} -march=armv7-a -mfloat-abi=hard -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -mfpu=neon -Wno-unused-command-line-argument)
set(${flags} -march=armv7-a -mfloat-abi=hard -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -mfpu=neon PARENT_SCOPE)
elseif((ANDROID_ABI STREQUAL "armeabi-v7a with NEON") OR
(ANDROID_ABI STREQUAL "armeabi-v7a" AND
DEFINED CMAKE_ANDROID_ARM_NEON AND CMAKE_ANDROID_ARM_NEON))
set(${flags} -march=armv7-a -mfloat-abi=softfp -mfpu=neon -Wno-unused-command-line-argument)
set(${flags} -march=armv7-a -mfloat-abi=softfp -mfpu=neon PARENT_SCOPE)
endif()
else()
if(AARCH64)
set(${flags} -O2 -ftree-vectorize)
set(${flags} -O2 -ftree-vectorize PARENT_SCOPE)
elseif(ARM)
set(${flags} -mfpu=neon -Wno-unused-command-line-argument)
set(${flags} -mfpu=neon PARENT_SCOPE)
endif()
endif()
endmacro()
endfunction()
#
# Disables all warnings for 3rd party targets
#
function(ov_disable_all_warnings)
foreach(target IN LISTS ARGN)
get_target_property(target_type ${target} TYPE)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(${target} PRIVATE /WX-)
elseif(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG)
target_compile_options(${target} PRIVATE -w)
# required for LTO
set(link_interface INTERFACE_LINK_OPTIONS)
if(target_type STREQUAL "SHARED_LIBRARY" OR target_type STREQUAL "EXECUTABLE")
set(link_interface LINK_OPTIONS)
endif()
set_target_properties(${target} PROPERTIES ${link_interface} "-Wno-error=maybe-uninitialized;-Wno-maybe-uninitialized")
elseif(UNIX AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
# 193: zero used for undefined preprocessing identifier "XXX"
# 1011: missing return statement at end of non-void function "XXX"
@@ -264,12 +256,12 @@ if(WIN32)
ie_add_compiler_flags(/Gy) # remove unreferenced functions: function level linking
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
if (CMAKE_COMPILE_WARNING_AS_ERROR)
if (CMAKE_VERSION VERSION_LESS 3.24)
ie_add_compiler_flags(/WX)
endif()
if (TREAT_WARNING_AS_ERROR)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
ie_add_compiler_flags(/WX)
ie_add_compiler_flags(/Qdiag-warning:47,1740,1786)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# ie_add_compiler_flags(/WX) # Too many warnings
endif()
endif()
@@ -310,11 +302,12 @@ if(WIN32)
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
else()
if (CMAKE_COMPILE_WARNING_AS_ERROR AND CMAKE_VERSION VERSION_LESS 3.24)
# TODO: enable for C sources as well
# ie_add_compiler_flags(-Werror)
# TODO: enable for C sources as well
# ie_add_compiler_flags(-Werror)
if(TREAT_WARNING_AS_ERROR)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif()
ie_add_compiler_flags(-ffunction-sections -fdata-sections)
ie_add_compiler_flags(-fdiagnostics-show-option)
ie_add_compiler_flags(-Wundef)

View File

@@ -14,7 +14,6 @@ if(UNIX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(IE_LINKER_FLAGS "${IE_LINKER_FLAGS} -z noexecstack -z relro -z now")
set(IE_C_CXX_FLAGS "${IE_C_CXX_FLAGS} -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
set(IE_C_CXX_FLAGS "${IE_C_CXX_FLAGS} -fstack-protector-all")
else()

View File

@@ -4,231 +4,210 @@
set(OV_COVERAGE_GCDA_DATA_DIRECTORY "${CMAKE_BINARY_DIR}")
if (NOT TARGET ov_coverage)
add_custom_target(ov_coverage)
set_target_properties(ov_coverage PROPERTIES FOLDER coverage)
if(NOT TARGET ie_coverage_clean)
add_custom_target(ie_coverage_clean)
set_target_properties(ie_coverage_clean PROPERTIES FOLDER coverage)
endif()
if(NOT TARGET ov_coverage_clean)
add_custom_target(ov_coverage_clean)
set_target_properties(ov_coverage_clean PROPERTIES FOLDER coverage)
if(NOT TARGET ie_coverage_init)
add_custom_target(ie_coverage_init)
set_target_properties(ie_coverage_init PROPERTIES FOLDER coverage)
endif()
if(NOT TARGET ie_coverage)
add_custom_target(ie_coverage)
set_target_properties(ie_coverage PROPERTIES FOLDER coverage)
endif()
set(OV_COVERAGE_REPORTS "${CMAKE_BINARY_DIR}/coverage")
set(OV_COVERAGE_SCRIPT_DIR "${IEDevScripts_DIR}/coverage")
set(IE_COVERAGE_REPORTS "${CMAKE_BINARY_DIR}/coverage")
set(IE_COVERAGE_SCRIPT_DIR "${IEDevScripts_DIR}/coverage")
include(CMakeParseArguments)
#
# ov_coverage_clean(REPOSITORY <repo> DIRECTORY <dir>)
# ie_coverage_clean(REPOSITORY <repo> DIRECTORY <dir>)
#
function(ov_coverage_clean)
cmake_parse_arguments(OV_COVERAGE "" "REPOSITORY;DIRECTORY" "" ${ARGN})
function(ie_coverage_clean)
cmake_parse_arguments(IE_COVERAGE "" "REPOSITORY;DIRECTORY" "" ${ARGN})
add_custom_target(ov_coverage_zerocounters_${OV_COVERAGE_REPOSITORY}
add_custom_target(ie_coverage_zerocounters_${IE_COVERAGE_REPOSITORY}
COMMAND lcov --zerocounters --quiet
--directory "${OV_COVERAGE_DIRECTORY}"
COMMENT "Add zero counters for coverage for ${OV_COVERAGE_REPOSITORY}"
--directory "${IE_COVERAGE_DIRECTORY}"
COMMENT "Add zero counters for coverage for ${IE_COVERAGE_REPOSITORY}"
VERBATIM)
add_custom_target(ov_coverage_clean_${OV_COVERAGE_REPOSITORY}
add_custom_target(ie_coverage_clean_${IE_COVERAGE_REPOSITORY}
COMMAND ${CMAKE_COMMAND}
-D "OV_COVERAGE_REPORTS=${OV_COVERAGE_REPORTS}"
-D "OV_COVERAGE_DIRECTORY=${OV_COVERAGE_DIRECTORY}"
-D "IE_COVERAGE_REPORTS=${IE_COVERAGE_REPORTS}"
-D "IE_COVERAGE_DIRECTORY=${IE_COVERAGE_DIRECTORY}"
-D "CMAKE_BINARY_DIRECTORY=${CMAKE_BINARY_DIR}"
-D "CMAKE_SOURCE_DIRECTORY=${CMAKE_SOURCE_DIR}"
-P "${OV_COVERAGE_SCRIPT_DIR}/coverage_clean.cmake"
COMMENT "Clean previously created HTML report files for ${OV_COVERAGE_REPOSITORY}"
DEPENDS "${OV_COVERAGE_SCRIPT_DIR}/coverage_clean.cmake"
-P "${IE_COVERAGE_SCRIPT_DIR}/coverage_clean.cmake"
COMMENT "Clean previously created HTML report files for ${IE_COVERAGE_REPOSITORY}"
DEPENDS "${IE_COVERAGE_SCRIPT_DIR}/coverage_clean.cmake"
VERBATIM)
set_target_properties(ov_coverage_zerocounters_${OV_COVERAGE_REPOSITORY}
ov_coverage_clean_${OV_COVERAGE_REPOSITORY}
set_target_properties(ie_coverage_zerocounters_${IE_COVERAGE_REPOSITORY}
ie_coverage_clean_${IE_COVERAGE_REPOSITORY}
PROPERTIES FOLDER coverage)
add_dependencies(ov_coverage_clean ov_coverage_zerocounters_${OV_COVERAGE_REPOSITORY}
ov_coverage_clean_${OV_COVERAGE_REPOSITORY})
add_dependencies(ie_coverage_clean ie_coverage_zerocounters_${IE_COVERAGE_REPOSITORY}
ie_coverage_clean_${IE_COVERAGE_REPOSITORY})
endfunction()
#
# ov_coverage_capture(INFO_FILE <info_file>
# ie_coverage_capture(INFO_FILE <info_file>
# BASE_DIRECTORY <base dir>
# DIRECTORY <gcda dir>
# EXCLUDE_PATTERNS exclude_patterns,...)
# DIRECTORY <gcda dir>)
#
function(ov_coverage_capture)
cmake_parse_arguments(OV_COVERAGE "" "INFO_FILE;BASE_DIRECTORY;DIRECTORY" "EXCLUDE_PATTERNS" ${ARGN})
function(ie_coverage_capture)
cmake_parse_arguments(IE_COVERAGE "" "INFO_FILE;BASE_DIRECTORY;DIRECTORY" "" ${ARGN})
set(output_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_INFO_FILE}.info")
set(output_base_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_INFO_FILE}_base.info")
set(output_tests_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_INFO_FILE}_tests.info")
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}.info")
set(output_base_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}_base.info")
set(output_tests_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}_tests.info")
add_custom_command(OUTPUT ${output_base_file}
COMMAND ${CMAKE_COMMAND} -E make_directory "${OV_COVERAGE_REPORTS}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${IE_COVERAGE_REPORTS}"
COMMAND lcov --no-external --capture --initial --quiet
--directory "${OV_COVERAGE_DIRECTORY}"
--base-directory "${OV_COVERAGE_BASE_DIRECTORY}"
--directory "${IE_COVERAGE_DIRECTORY}"
--base-directory "${IE_COVERAGE_BASE_DIRECTORY}"
--output-file ${output_base_file}
COMMENT "Capture initial coverage data ${OV_COVERAGE_INFO_FILE}"
COMMENT "Capture initial coverage data ${IE_COVERAGE_INFO_FILE}"
VERBATIM)
add_custom_command(OUTPUT ${output_tests_file}
COMMAND ${CMAKE_COMMAND} -E make_directory "${OV_COVERAGE_REPORTS}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${IE_COVERAGE_REPORTS}"
COMMAND lcov --no-external --capture --quiet
--directory "${OV_COVERAGE_DIRECTORY}"
--base-directory "${OV_COVERAGE_BASE_DIRECTORY}"
--directory "${IE_COVERAGE_DIRECTORY}"
--base-directory "${IE_COVERAGE_BASE_DIRECTORY}"
--output-file ${output_tests_file}
COMMENT "Capture test coverage data ${OV_COVERAGE_INFO_FILE}"
COMMENT "Capture test coverage data ${IE_COVERAGE_INFO_FILE}"
VERBATIM)
if (OV_COVERAGE_EXCLUDE_PATTERNS)
set(out_suf ".tmp")
endif()
add_custom_command(OUTPUT ${output_file}${out_suf}
add_custom_command(OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND}
-D "OV_COVERAGE_OUTPUT_FILE=${output_file}${out_suf}"
-D "OV_COVERAGE_INPUT_FILES=${output_base_file};${output_tests_file}"
-P "${OV_COVERAGE_SCRIPT_DIR}/coverage_merge.cmake"
COMMENT "Generate total coverage data ${OV_COVERAGE_INFO_FILE}"
-D "IE_COVERAGE_OUTPUT_FILE=${output_file}"
-D "IE_COVERAGE_INPUT_FILES=${output_base_file};${output_tests_file}"
-P "${IE_COVERAGE_SCRIPT_DIR}/coverage_merge.cmake"
COMMENT "Generate total coverage data ${IE_COVERAGE_INFO_FILE}"
DEPENDS ${output_base_file} ${output_tests_file}
VERBATIM)
if (OV_COVERAGE_EXCLUDE_PATTERNS)
set(commands lcov --quiet)
foreach(pattern IN LISTS OV_COVERAGE_EXCLUDE_PATTERNS)
list(APPEND commands --remove ${output_file}${out_suf} ${pattern})
endforeach()
list(APPEND commands --output-file ${output_file})
add_custom_command(OUTPUT ${output_file}
COMMAND ${commands}
COMMENT "Exclude patterns from report ${OV_COVERAGE_OUTPUT}"
DEPENDS ${output_file}${out_suf}
VERBATIM)
endif()
add_custom_target(ov_coverage_${OV_COVERAGE_INFO_FILE}_info
add_custom_target(ie_coverage_${IE_COVERAGE_INFO_FILE}_info
DEPENDS ${output_file})
set_target_properties(ov_coverage_${OV_COVERAGE_INFO_FILE}_info
set_target_properties(ie_coverage_${IE_COVERAGE_INFO_FILE}_info
PROPERTIES FOLDER coverage)
endfunction()
#
# ov_coverage_extract(INPUT <info_file> OUTPUT <output_file> PATTERNS <patterns ...>)
# ie_coverage_extract(INPUT <info_file> OUTPUT <output_file> PATTERNS <patterns ...>)
#
function(ov_coverage_extract)
cmake_parse_arguments(OV_COVERAGE "" "INPUT;OUTPUT" "PATTERNS" ${ARGN})
function(ie_coverage_extract)
cmake_parse_arguments(IE_COVERAGE "" "INPUT;OUTPUT" "PATTERNS" ${ARGN})
set(input_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_INPUT}.info")
set(output_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_OUTPUT}.info")
set(input_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INPUT}.info")
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_OUTPUT}.info")
set(commands lcov --quiet)
foreach(pattern IN LISTS OV_COVERAGE_PATTERNS)
foreach(pattern IN LISTS IE_COVERAGE_PATTERNS)
list(APPEND commands --extract ${input_file} ${pattern})
endforeach()
list(APPEND commands --output-file ${output_file})
add_custom_command(OUTPUT ${output_file}
COMMAND ${commands}
COMMENT "Generate coverage data ${OV_COVERAGE_OUTPUT}"
COMMENT "Generate coverage data ${IE_COVERAGE_OUTPUT}"
DEPENDS ${input_file}
VERBATIM)
add_custom_target(ov_coverage_${OV_COVERAGE_OUTPUT}_info
add_custom_target(ie_coverage_${IE_COVERAGE_OUTPUT}_info
DEPENDS ${output_file})
set_target_properties(ov_coverage_${OV_COVERAGE_OUTPUT}_info
set_target_properties(ie_coverage_${IE_COVERAGE_OUTPUT}_info
PROPERTIES FOLDER coverage)
add_dependencies(ov_coverage_${OV_COVERAGE_OUTPUT}_info ov_coverage_${OV_COVERAGE_INPUT}_info)
endfunction()
#
# ov_coverage_genhtml(INFO_FILE <info_file> PREFIX <prefix>)
#
function(ov_coverage_genhtml)
cmake_parse_arguments(OV_COVERAGE "" "INFO_FILE;PREFIX" "" ${ARGN})
set(input_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_INFO_FILE}.info")
set(output_directory "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_INFO_FILE}")
add_custom_command(OUTPUT "${output_directory}/index.html"
COMMAND [ -s ${input_file} ] && genhtml ${input_file} --title "${OV_COVERAGE_INFO_FILE}" --legend
--no-branch-coverage --demangle-cpp
--output-directory "${output_directory}"
--num-spaces 4 --quiet
--prefix "${OV_COVERAGE_PREFIX}" || echo "Skip ${input_file}"
DEPENDS ${input_file}
COMMENT "Generate HTML report for ${OV_COVERAGE_INFO_FILE}"
VERBATIM)
add_custom_target(ov_coverage_${OV_COVERAGE_INFO_FILE}_genhtml
DEPENDS "${output_directory}/index.html")
set_target_properties(ov_coverage_${OV_COVERAGE_INFO_FILE}_genhtml
PROPERTIES FOLDER coverage)
add_dependencies(ov_coverage_${OV_COVERAGE_INFO_FILE}_genhtml ov_coverage_${OV_COVERAGE_INFO_FILE}_info)
add_dependencies(ov_coverage ov_coverage_${OV_COVERAGE_INFO_FILE}_genhtml)
add_dependencies(ie_coverage_${IE_COVERAGE_OUTPUT}_info ie_coverage_${IE_COVERAGE_INPUT}_info)
endfunction()
#
# ie_coverage_remove(INPUT <info_file> OUTPUT <output_file> PATTERNS <patterns ...>)
#
function(ie_coverage_remove)
cmake_parse_arguments(OV_COVERAGE "" "INPUT;OUTPUT" "PATTERNS" ${ARGN})
cmake_parse_arguments(IE_COVERAGE "" "INPUT;OUTPUT" "PATTERNS" ${ARGN})
set(input_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_INPUT}.info")
set(output_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_OUTPUT}.info")
set(input_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INPUT}.info")
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_OUTPUT}.info")
set(commands lcov --quiet)
foreach(pattern IN LISTS OV_COVERAGE_PATTERNS)
foreach(pattern IN LISTS IE_COVERAGE_PATTERNS)
list(APPEND commands --remove ${input_file} ${pattern})
endforeach()
list(APPEND commands --output-file ${output_file})
add_custom_command(OUTPUT ${output_file}
COMMAND ${commands}
COMMENT "Generate coverage data ${OV_COVERAGE_OUTPUT}"
COMMENT "Generate coverage data ${IE_COVERAGE_OUTPUT}"
DEPENDS ${input_file}
VERBATIM)
add_custom_target(ov_coverage_${OV_COVERAGE_OUTPUT}_info
add_custom_target(ie_coverage_${IE_COVERAGE_OUTPUT}_info
DEPENDS ${output_file})
set_target_properties(ov_coverage_${OV_COVERAGE_OUTPUT}_info
set_target_properties(ie_coverage_${IE_COVERAGE_OUTPUT}_info
PROPERTIES FOLDER coverage)
add_dependencies(ov_coverage_${OV_COVERAGE_OUTPUT}_info ov_coverage_${OV_COVERAGE_INPUT}_info)
add_dependencies(ie_coverage_${IE_COVERAGE_OUTPUT}_info ie_coverage_${IE_COVERAGE_INPUT}_info)
endfunction()
#
# ie_coverage_merge(OUTPUT <output file> INPUTS <input files ...>)
#
function(ie_coverage_merge)
cmake_parse_arguments(OV_COVERAGE "" "OUTPUT" "INPUTS" ${ARGN})
cmake_parse_arguments(IE_COVERAGE "" "OUTPUT" "INPUTS" ${ARGN})
set(output_file "${OV_COVERAGE_REPORTS}/${OV_COVERAGE_OUTPUT}.info")
foreach(input_info_file IN LISTS OV_COVERAGE_INPUTS)
set(input_file ${OV_COVERAGE_REPORTS}/${input_info_file}.info)
list(APPEND dependencies ov_coverage_${input_info_file}_info)
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_OUTPUT}.info")
foreach(input_info_file IN LISTS IE_COVERAGE_INPUTS)
set(input_file ${IE_COVERAGE_REPORTS}/${input_info_file}.info)
list(APPEND dependencies ie_coverage_${input_info_file}_info)
list(APPEND input_files ${input_file})
endforeach()
add_custom_command(OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND}
-D "OV_COVERAGE_OUTPUT_FILE=${output_file}"
-D "OV_COVERAGE_INPUT_FILES=${input_files}"
-P "${OV_COVERAGE_SCRIPT_DIR}/coverage_merge.cmake"
COMMENT "Generate coverage data ${OV_COVERAGE_OUTPUT}"
-D "IE_COVERAGE_OUTPUT_FILE=${output_file}"
-D "IE_COVERAGE_INPUT_FILES=${input_files}"
-P "${IE_COVERAGE_SCRIPT_DIR}/coverage_merge.cmake"
COMMENT "Generate coverage data ${IE_COVERAGE_OUTPUT}"
DEPENDS ${input_files}
VERBATIM)
add_custom_target(ov_coverage_${OV_COVERAGE_OUTPUT}_info
add_custom_target(ie_coverage_${IE_COVERAGE_OUTPUT}_info
DEPENDS ${output_file})
set_target_properties(ov_coverage_${OV_COVERAGE_OUTPUT}_info
set_target_properties(ie_coverage_${IE_COVERAGE_OUTPUT}_info
PROPERTIES FOLDER coverage)
add_dependencies(ov_coverage_${OV_COVERAGE_OUTPUT}_info ${dependencies})
add_dependencies(ie_coverage_${IE_COVERAGE_OUTPUT}_info ${dependencies})
endfunction()
if(NOT TARGET ie_coverage)
add_custom_target(ie_coverage)
set_target_properties(ie_coverage PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage ov_coverage)
endif()
#
# ie_coverage_genhtml(INFO_FILE <info_file> PREFIX <prefix>)
#
function(ie_coverage_genhtml)
cmake_parse_arguments(IE_COVERAGE "" "INFO_FILE;PREFIX" "" ${ARGN})
set(input_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}.info")
set(output_directory "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}")
add_custom_command(OUTPUT "${output_directory}/index.html"
COMMAND genhtml ${input_file} --title "${IE_COVERAGE_INFO_FILE}" --legend
--no-branch-coverage --demangle-cpp
--output-directory "${output_directory}"
--num-spaces 4 --quiet
--prefix "${IE_COVERAGE_PREFIX}"
DEPENDS ${input_file}
COMMENT "Generate HTML report for ${IE_COVERAGE_INFO_FILE}"
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml
DEPENDS "${output_directory}/index.html")
set_target_properties(ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml ie_coverage_${IE_COVERAGE_INFO_FILE}_info)
add_dependencies(ie_coverage ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml)
endfunction()

View File

@@ -2,21 +2,21 @@
# SPDX-License-Identifier: Apache-2.0
#
if(NOT DEFINED OV_COVERAGE_REPORTS)
message(FATAL_ERROR "OV_COVERAGE_REPORTS variable is not defined")
if(NOT DEFINED IE_COVERAGE_REPORTS)
message(FATAL_ERROR "IE_COVERAGE_REPORTS variable is not defined")
return()
endif()
file(REMOVE_RECURSE "${OV_COVERAGE_REPORTS}")
file(REMOVE_RECURSE "${IE_COVERAGE_REPORTS}")
if(NOT DEFINED OV_COVERAGE_DIRECTORY)
message(FATAL_ERROR "OV_COVERAGE_DIRECTORY variable is not defined")
if(NOT DEFINED IE_COVERAGE_DIRECTORY)
message(FATAL_ERROR "IE_COVERAGE_DIRECTORY variable is not defined")
return()
endif()
# remove .gcno files which are kept from the previous build
file(GLOB_RECURSE gcno_files "${OV_COVERAGE_DIRECTORY}/*.gcno")
file(GLOB_RECURSE gcno_files "${IE_COVERAGE_DIRECTORY}/*.gcno")
foreach(file IN LISTS gcno_files)
string(REPLACE ".gcno" "" temp_file "${file}")
string(REGEX REPLACE "CMakeFiles/.+dir/" "" temp_file "${temp_file}")

View File

@@ -2,21 +2,21 @@
# SPDX-License-Identifier: Apache-2.0
#
if(NOT DEFINED OV_COVERAGE_OUTPUT_FILE)
message(FATAL_ERROR "OV_COVERAGE_OUTPUT_FILE is not defined")
if(NOT DEFINED IE_COVERAGE_OUTPUT_FILE)
message(FATAL_ERROR "IE_COVERAGE_OUTPUT_FILE is not defined")
endif()
if(NOT DEFINED OV_COVERAGE_INPUT_FILES)
message(FATAL_ERROR "OV_COVERAGE_INPUT_FILES is not defined")
if(NOT DEFINED IE_COVERAGE_INPUT_FILES)
message(FATAL_ERROR "IE_COVERAGE_INPUT_FILES is not defined")
endif()
set(command lcov --quiet)
foreach(input_info_file IN LISTS OV_COVERAGE_INPUT_FILES)
foreach(input_info_file IN LISTS IE_COVERAGE_INPUT_FILES)
file(SIZE ${input_info_file} size)
if(NOT size EQUAL 0)
list(APPEND command --add-tracefile "${input_info_file}")
endif()
endforeach()
list(APPEND command --output-file ${OV_COVERAGE_OUTPUT_FILE})
list(APPEND command --output-file ${IE_COVERAGE_OUTPUT_FILE})
execute_process(COMMAND ${command})

View File

@@ -3,7 +3,7 @@
#
if(ENABLE_CPPLINT)
find_host_package(PythonInterp 3 QUIET)
find_package(PythonInterp 3 QUIET)
if(NOT PYTHONINTERP_FOUND)
message(WARNING "Python3 interpreter was not found (required for cpplint check)")

View File

@@ -2,16 +2,16 @@
# SPDX-License-Identifier: Apache-2.0
#
function(debug_message)
if(CMAKE_VERBOSE_MAKEFILE)
function (debug_message)
if (VERBOSE_BUILD)
message(${ARGV})
endif()
endfunction()
function(clean_message type)
string(REPLACE ";" "" output_string "${ARGN}")
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${output_string}")
if(${ARGV0} STREQUAL "FATAL_ERROR")
message (FATAL_ERROR)
endif()
string (REPLACE ";" "" output_string "${ARGN}")
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${output_string}")
if(${ARGV0} STREQUAL "FATAL_ERROR")
message (FATAL_ERROR)
endif()
endfunction()

View File

@@ -4,7 +4,7 @@
include (download/download)
function (resolve_archive_dependency VAR COMPONENT ARCHIVE ARCHIVE_UNIFIED ARCHIVE_WIN ARCHIVE_LIN ARCHIVE_MAC ARCHIVE_ANDROID TARGET_PATH FOLDER ENVIRONMENT SHA256 FILES_TO_EXTRACT USE_NEW_LOCATION)
function (resolve_archive_dependency VAR COMPONENT ARCHIVE ARCHIVE_UNIFIED ARCHIVE_WIN ARCHIVE_LIN ARCHIVE_MAC ARCHIVE_ANDROID TARGET_PATH FOLDER ENVIRONMENT SHA256 FILES_TO_EXTRACT)
if (ENVIRONMENT AND (DEFINED ${ENVIRONMENT} OR DEFINED ENV{${ENVIRONMENT}}))
set(HAS_ENV "TRUE")
endif()
@@ -12,9 +12,9 @@ function (resolve_archive_dependency VAR COMPONENT ARCHIVE ARCHIVE_UNIFIED ARCHI
if (NOT DEFINED HAS_ENV)
if (ARCHIVE)
#TODO: check whether this is platform specific binary with same name per or it is in common folder
DownloadAndExtract(${COMPONENT} ${ARCHIVE} ${TARGET_PATH} result_path ${FOLDER} ${SHA256} ${FILES_TO_EXTRACT} ${USE_NEW_LOCATION})
DownloadAndExtract(${COMPONENT} ${ARCHIVE} ${TARGET_PATH} result_path ${FOLDER} ${SHA256} ${FILES_TO_EXTRACT})
else()
DownloadAndExtractPlatformSpecific(${COMPONENT} ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID} ${TARGET_PATH} result_path ${FOLDER} ${SHA256} ${FILES_TO_EXTRACT} ${USE_NEW_LOCATION})
DownloadAndExtractPlatformSpecific(${COMPONENT} ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID} ${TARGET_PATH} result_path ${FOLDER} ${SHA256} ${FILES_TO_EXTRACT})
endif()
set (${VAR} ${result_path} PARENT_SCOPE)
@@ -45,7 +45,7 @@ endfunction(read_version)
function (RESOLVE_DEPENDENCY NAME_OF_CMAKE_VAR)
list(REMOVE_AT ARGV 0)
set(SUPPORTED_ARGS FOLDER ARCHIVE ARCHIVE_UNIFIED ARCHIVE_WIN ARCHIVE_LIN ARCHIVE_MAC ARCHIVE_ANDROID TARGET_PATH ENVIRONMENT VERSION_REGEX SHA256 FILES_TO_EXTRACT USE_NEW_LOCATION)
set(SUPPORTED_ARGS FOLDER ARCHIVE ARCHIVE_UNIFIED ARCHIVE_WIN ARCHIVE_LIN ARCHIVE_MAC ARCHIVE_ANDROID TARGET_PATH ENVIRONMENT VERSION_REGEX SHA256 FILES_TO_EXTRACT)
#unnecessary vars
foreach(arg ${ARGV})
@@ -111,20 +111,16 @@ function (RESOLVE_DEPENDENCY NAME_OF_CMAKE_VAR)
set (FILES_TO_EXTRACT FALSE)
endif()
if (NOT DEFINED USE_NEW_LOCATION)
set (USE_NEW_LOCATION FALSE)
endif()
#for each dependency type have to do separate things
if (ARCHIVE_WIN OR ARCHIVE_LIN OR ARCHIVE_MAC OR ARCHIVE_ANDROID OR ARCHIVE OR ARCHIVE_UNIFIED)
if (NOT DEFINED TARGET_PATH)
message(FATAL_ERROR "TARGET_PATH should be defined for every dependency")
endif()
resolve_archive_dependency(RESULT ${NAME_OF_CMAKE_VAR} ${ARCHIVE} ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID} ${TARGET_PATH} ${FOLDER} ${ENVIRONMENT} ${SHA256} ${FILES_TO_EXTRACT} ${USE_NEW_LOCATION})
resolve_archive_dependency(RESULT ${NAME_OF_CMAKE_VAR} ${ARCHIVE} ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID} ${TARGET_PATH} ${FOLDER} ${ENVIRONMENT} ${SHA256} ${FILES_TO_EXTRACT})
set(${NAME_OF_CMAKE_VAR} ${RESULT} PARENT_SCOPE)
if (VERSION_REGEX)
GetNameAndUrlToDownload(archive RELATIVE_URL ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID} ${USE_NEW_LOCATION})
GetNameAndUrlToDownload(archive RELATIVE_URL ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID})
if (archive)
read_version(${archive} ${VERSION_REGEX} "${NAME_OF_CMAKE_VAR}_VERSION")
endif()

View File

@@ -5,13 +5,9 @@
include(download/extract)
include(download/download_and_check)
function (GetNameAndUrlToDownload name url archive_name_unified archive_name_win archive_name_lin archive_name_mac archive_name_android USE_NEW_LOCATION)
function (GetNameAndUrlToDownload name url archive_name_unified archive_name_win archive_name_lin archive_name_mac archive_name_android)
if (archive_name_unified)
if (USE_NEW_LOCATION)
set (${url} "${archive_name_unified}" PARENT_SCOPE)
else()
set (${url} "thirdparty/unified/${archive_name_unified}" PARENT_SCOPE)
endif()
set (${url} "thirdparty/unified/${archive_name_unified}" PARENT_SCOPE)
set (${name} ${archive_name_unified} PARENT_SCOPE)
else()
if(archive_name_lin)
@@ -47,26 +43,25 @@ function (DownloadAndExtractPlatformSpecific
result_path
folder
sha256
files_to_extract
USE_NEW_LOCATION)
files_to_extract)
GetNameAndUrlToDownload(archive_name RELATIVE_URL ${archive_name_unified} ${archive_name_win} ${archive_name_lin} ${archive_name_mac} ${archive_name_android} ${USE_NEW_LOCATION})
GetNameAndUrlToDownload(archive_name RELATIVE_URL ${archive_name_unified} ${archive_name_win} ${archive_name_lin} ${archive_name_mac} ${archive_name_android} )
if (NOT archive_name OR NOT RELATIVE_URL)
return()
endif()
CheckOrDownloadAndExtract(${component} ${RELATIVE_URL} ${archive_name} ${unpacked_path} result_path2 ${folder} TRUE FALSE TRUE ${sha256} ${files_to_extract} ${USE_NEW_LOCATION})
CheckOrDownloadAndExtract(${component} ${RELATIVE_URL} ${archive_name} ${unpacked_path} result_path2 ${folder} TRUE FALSE TRUE ${sha256} ${files_to_extract})
set (${result_path} ${result_path2} PARENT_SCOPE)
endfunction(DownloadAndExtractPlatformSpecific)
#download from common folder
function (DownloadAndExtract component archive_name unpacked_path result_path folder sha256 files_to_extract USE_NEW_LOCATION)
function (DownloadAndExtract component archive_name unpacked_path result_path folder sha256 files_to_extract)
set (RELATIVE_URL "${archive_name}")
set(fattal TRUE)
CheckOrDownloadAndExtract(${component} ${RELATIVE_URL} ${archive_name} ${unpacked_path} result_path2 ${folder} ${fattal} result TRUE ${sha256} ${files_to_extract} ${USE_NEW_LOCATION})
CheckOrDownloadAndExtract(${component} ${RELATIVE_URL} ${archive_name} ${unpacked_path} result_path2 ${folder} ${fattal} result TRUE ${sha256} ${files_to_extract})
if (NOT ${result})
DownloadAndExtractPlatformSpecific(${component} ${archive_name} ${archive_name} ${archive_name} ${unpacked_path} ${result_path2} ${folder} ${sha256} ${files_to_extract} ${USE_NEW_LOCATION})
DownloadAndExtractPlatformSpecific(${component} ${archive_name} ${archive_name} ${archive_name} ${unpacked_path} ${result_path2} ${folder} ${sha256} ${files_to_extract})
endif()
set (${result_path} ${result_path2} PARENT_SCOPE)
@@ -129,8 +124,6 @@ function (DownloadOrExtractInternal URL archive_path unpacked_path folder fattal
if (${result})
set (downloadStatus "OK")
endif()
else()
set (downloadStatus "OK")
endif()
else()
debug_message("archive found on FS : ${archive_path}, however we cannot check it's checksum and think that it is invalid")
@@ -153,7 +146,7 @@ function (DownloadOrExtractInternal URL archive_path unpacked_path folder fattal
endfunction(DownloadOrExtractInternal)
function (CheckOrDownloadAndExtract component RELATIVE_URL archive_name unpacked_path result_path folder fattal resultExt use_alternatives sha256 files_to_extract USE_NEW_LOCATION)
function (CheckOrDownloadAndExtract component RELATIVE_URL archive_name unpacked_path result_path folder fattal resultExt use_alternatives sha256 files_to_extract)
set (archive_path ${TEMP}/download/${archive_name})
set (status "ON")
@@ -161,8 +154,6 @@ function (CheckOrDownloadAndExtract component RELATIVE_URL archive_name unpacked
set(URL "${IE_PATH_TO_DEPS}/${RELATIVE_URL}")
elseif(DEFINED ENV{IE_PATH_TO_DEPS})
set(URL "$ENV{IE_PATH_TO_DEPS}/${RELATIVE_URL}")
elseif(USE_NEW_LOCATION)
set(URL "https://storage.openvinotoolkit.org/dependencies/${RELATIVE_URL}")
else()
set(URL "https://download.01.org/opencv/master/openvinotoolkit/${RELATIVE_URL}")
endif()

View File

@@ -7,7 +7,7 @@ include(target_flags)
# FIXME: there are compiler failures with LTO and Cross-Compile toolchains. Disabling for now, but
# this must be addressed in a proper way
ie_dependent_option (ENABLE_LTO "Enable Link Time Optimization" OFF "LINUX OR (APPLE AND AARCH64);NOT CMAKE_CROSSCOMPILING;CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9" OFF)
ie_dependent_option (ENABLE_LTO "Enable Link Time Optimization" OFF "LINUX;NOT CMAKE_CROSSCOMPILING;CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9" OFF)
ie_option (OS_FOLDER "create OS dedicated folder in output" OFF)
@@ -17,17 +17,8 @@ else()
ie_option(USE_BUILD_TYPE_SUBFOLDER "Create dedicated sub-folder per build type for output binaries" ON)
endif()
if(CI_BUILD_NUMBER)
set(TREAT_WARNING_AS_ERROR_DEFAULT ON)
else()
set(TREAT_WARNING_AS_ERROR_DEFAULT OFF)
endif()
ie_dependent_option (TREAT_WARNING_AS_ERROR "WILL BE REMOVED SOON, NEED TO FIX PRIVATE COMPONENTS" ON "X86_64 OR X86" OFF)
if(NOT DEFINED CMAKE_COMPILE_WARNING_AS_ERROR)
set(CMAKE_COMPILE_WARNING_AS_ERROR ${TREAT_WARNING_AS_ERROR_DEFAULT})
endif()
# FIXME: ARM cross-compiler generates several "false positive" warnings regarding __builtin_memcpy buffer overflow
ie_dependent_option (TREAT_WARNING_AS_ERROR "Treat build warnings as errors" ON "X86 OR X86_64" OFF)
ie_dependent_option (ENABLE_INTEGRITYCHECK "build DLLs with /INTEGRITYCHECK flag" OFF "CMAKE_CXX_COMPILER_ID STREQUAL MSVC" OFF)
@@ -37,7 +28,7 @@ ie_option (ENABLE_UB_SANITIZER "enable UndefinedBahavior sanitizer" OFF)
ie_option (ENABLE_THREAD_SANITIZER "enable checking data races via ThreadSanitizer" OFF)
ie_dependent_option (ENABLE_COVERAGE "enable code coverage" OFF "CMAKE_CXX_COMPILER_ID STREQUAL GNU OR OV_COMPILER_IS_CLANG" OFF)
ie_dependent_option (ENABLE_COVERAGE "enable code coverage" OFF "CMAKE_CXX_COMPILER_ID STREQUAL GNU" OFF)
# Defines CPU capabilities
@@ -47,33 +38,25 @@ ie_dependent_option (ENABLE_AVX2 "Enable AVX2 optimizations" ON "X86_64 OR X86"
ie_dependent_option (ENABLE_AVX512F "Enable AVX512 optimizations" ON "X86_64 OR X86" OFF)
# Type of build, we add this as an explicit option to default it to ON
# FIXME: Ah this moment setting this to OFF will only build ngraph a static library
ie_option (BUILD_SHARED_LIBS "Build as a shared library" ON)
# Android does not support SOVERSION
# see https://www.opengis.ch/2011/11/23/creating-non-versioned-shared-libraries-for-android/
ie_dependent_option (ENABLE_LIBRARY_VERSIONING "Enable libraries versioning" ON "NOT WIN32;NOT ANDROID" OFF)
ie_dependent_option (ENABLE_FASTER_BUILD "Enable build features (PCH, UNITY) to speed up build time" OFF "CMAKE_VERSION VERSION_GREATER_EQUAL 3.16" OFF)
if(UNIX AND NOT ANDROID)
set(STYLE_CHECKS_DEFAULT ON)
else()
set(STYLE_CHECKS_DEFAULT OFF)
endif()
ie_option (ENABLE_CPPLINT "Enable cpplint checks during the build" ${STYLE_CHECKS_DEFAULT})
ie_dependent_option (ENABLE_CPPLINT "Enable cpplint checks during the build" ON "UNIX;NOT ANDROID" OFF)
ie_dependent_option (ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF "ENABLE_CPPLINT" OFF)
ie_option (ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ${STYLE_CHECKS_DEFAULT})
ie_dependent_option (ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ON "UNIX;NOT ANDROID" OFF)
ie_option (ENABLE_NCC_STYLE "Enable ncc style check" ${STYLE_CHECKS_DEFAULT})
ie_dependent_option (ENABLE_NCC_STYLE "Enable ncc style check" ON "UNIX;NOT ANDROID" OFF)
ie_option (VERBOSE_BUILD "shows extra information about build" OFF)
ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF)
ie_dependent_option (ENABLE_FUZZING "instrument build for fuzzing" OFF "OV_COMPILER_IS_CLANG;NOT WIN32" OFF)
ie_dependent_option (ENABLE_FUZZING "instrument build for fuzzing" OFF "OV_COMPILER_IS_CLANG; NOT WIN32" OFF)
#
# Check features

View File

@@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
set(FRONTEND_INSTALL_INCLUDE "${OV_CPACK_INCLUDEDIR}")
set(FRONTEND_INSTALL_INCLUDE "runtime/include/")
set(FRONTEND_NAME_PREFIX "openvino_")
set(FRONTEND_NAME_SUFFIX "_frontend")
@@ -90,7 +90,7 @@ unset(protobuf_installed CACHE)
# [LINK_LIBRARIES <lib1 lib2 ...>])
#
macro(ov_add_frontend)
set(options LINKABLE_FRONTEND PROTOBUF_LITE SKIP_NCC_STYLE SKIP_INSTALL)
set(options LINKABLE_FRONTEND SHUTDOWN_PROTOBUF PROTOBUF_LITE SKIP_NCC_STYLE SKIP_INSTALL)
set(oneValueArgs NAME FILEDESCRIPTION)
set(multiValueArgs LINK_LIBRARIES PROTO_FILES)
cmake_parse_arguments(OV_FRONTEND "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@@ -106,27 +106,22 @@ macro(ov_add_frontend)
list(APPEND FRONTEND_NAMES ${OV_FRONTEND_NAME})
set(FRONTEND_NAMES "${FRONTEND_NAMES}" CACHE INTERNAL "" FORCE)
set(frontend_root_dir "${CMAKE_CURRENT_SOURCE_DIR}")
if(frontend_root_dir MATCHES ".*src$")
get_filename_component(frontend_root_dir "${frontend_root_dir}" DIRECTORY)
endif()
file(GLOB_RECURSE LIBRARY_SRC ${frontend_root_dir}/src/*.cpp)
file(GLOB_RECURSE LIBRARY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
if (WIN32)
# Remove linux specific files
file(GLOB_RECURSE LIN_FILES ${frontend_root_dir}/src/os/lin/*.cpp
${frontend_root_dir}/src/os/lin/*.hpp)
file(GLOB_RECURSE LIN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/os/lin/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/os/lin/*.hpp)
list(REMOVE_ITEM LIBRARY_SRC "${LIN_FILES}")
else()
# Remove windows specific files
file(GLOB_RECURSE WIN_FILES ${frontend_root_dir}/src/os/win/*.cpp
${frontend_root_dir}/src/os/win/*.hpp)
file(GLOB_RECURSE WIN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/os/win/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/os/win/*.hpp)
list(REMOVE_ITEM LIBRARY_SRC "${WIN_FILES}")
endif()
file(GLOB_RECURSE LIBRARY_HEADERS ${frontend_root_dir}/src/*.hpp)
file(GLOB_RECURSE LIBRARY_PUBLIC_HEADERS ${frontend_root_dir}/include/*.hpp)
file(GLOB_RECURSE LIBRARY_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp)
file(GLOB_RECURSE LIBRARY_PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp)
set(${TARGET_NAME}_INCLUDE_DIR ${frontend_root_dir}/include)
set(${TARGET_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
# Create named folders for the sources within the .vcproj
# Empty name lists them directly under the .vcproj
@@ -136,7 +131,7 @@ macro(ov_add_frontend)
source_group("public include" FILES ${LIBRARY_PUBLIC_HEADERS})
# Generate protobuf file on build time for each '.proto' file in src/proto
file(GLOB proto_files ${frontend_root_dir}/src/proto/*.proto)
file(GLOB proto_files ${CMAKE_CURRENT_SOURCE_DIR}/src/proto/*.proto)
foreach(INFILE IN LISTS proto_files)
get_filename_component(FILE_DIR ${INFILE} DIRECTORY)
@@ -147,7 +142,7 @@ macro(ov_add_frontend)
add_custom_command(
OUTPUT "${OUTPUT_PB_SRC}" "${OUTPUT_PB_HEADER}"
COMMAND ${PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${FILE_DIR} ${FILE_WE}.proto
DEPENDS ${PROTOC_DEPENDENCY} ${GENERATED_PROTO}
DEPENDS ${PROTOC_EXECUTABLE} ${GENERATED_PROTO}
COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${GENERATED_PROTO}"
VERBATIM
COMMAND_EXPAND_LISTS)
@@ -167,7 +162,7 @@ macro(ov_add_frontend)
endif()
# Shutdown protobuf when unloading the front dynamic library
if(proto_files AND BUILD_SHARED_LIBS)
if(OV_FRONTEND_SHUTDOWN_PROTOBUF AND BUILD_SHARED_LIBS)
target_link_libraries(${TARGET_NAME} PRIVATE ov_protobuf_shutdown)
endif()
@@ -178,15 +173,11 @@ macro(ov_add_frontend)
"-DGetAPIVersion=GetAPIVersion${OV_FRONTEND_NAME}")
endif()
# enable LTO
set_target_properties(${TARGET_NAME} PROPERTIES
INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
if(OV_FRONTEND_SKIP_NCC_STYLE)
# frontend's CMakeLists.txt must define its own custom 'ov_ncc_naming_style' step
else()
ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}
SOURCE_DIRECTORY "${frontend_root_dir}/include"
SOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include"
ADDITIONAL_INCLUDE_DIRECTORIES
$<TARGET_PROPERTY:frontend_common::static,INTERFACE_INCLUDE_DIRECTORIES>)
endif()
@@ -195,7 +186,7 @@ macro(ov_add_frontend)
PUBLIC
$<BUILD_INTERFACE:${${TARGET_NAME}_INCLUDE_DIR}>
PRIVATE
${frontend_root_dir}/src
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR})
ie_add_vs_version_file(NAME ${TARGET_NAME}
@@ -205,9 +196,8 @@ macro(ov_add_frontend)
target_link_libraries(${TARGET_NAME} PUBLIC openvino::runtime)
target_link_libraries(${TARGET_NAME} PRIVATE ${OV_FRONTEND_LINK_LIBRARIES})
ov_add_library_version(${TARGET_NAME})
# WA for TF frontends which always require protobuf (not protobuf-lite)
# WA for TF frontends which always requires protobuf (not protobuf-lite)
# if TF FE is built in static mode, use protobuf for all other FEs
if(FORCE_FRONTENDS_USE_PROTOBUF)
set(OV_FRONTEND_PROTOBUF_LITE OFF)
@@ -216,13 +206,13 @@ macro(ov_add_frontend)
if(proto_files)
if(OV_FRONTEND_PROTOBUF_LITE)
if(NOT protobuf_lite_installed)
ov_install_static_lib(${Protobuf_LITE_LIBRARIES} ${OV_CPACK_COMP_CORE})
ov_install_static_lib(${Protobuf_LITE_LIBRARIES} core)
set(protobuf_lite_installed ON CACHE INTERNAL "" FORCE)
endif()
link_system_libraries(${TARGET_NAME} PRIVATE ${Protobuf_LITE_LIBRARIES})
else()
if(NOT protobuf_installed)
ov_install_static_lib(${Protobuf_LIBRARIES} ${OV_CPACK_COMP_CORE})
ov_install_static_lib(${Protobuf_LIBRARIES} core)
set(protobuf_installed ON CACHE INTERNAL "" FORCE)
endif()
link_system_libraries(${TARGET_NAME} PRIVATE ${Protobuf_LIBRARIES})
@@ -241,37 +231,22 @@ macro(ov_add_frontend)
if(NOT OV_FRONTEND_SKIP_INSTALL)
if(BUILD_SHARED_LIBS)
# Note:
# we use 'framework' as component for deployment scenario, i.e. for libraries itself
# and use common 'core_dev' component for headers, cmake files and symlinks to versioned library
set(lib_component "${OV_FRONTEND_NAME}")
set(dev_component "${OV_CPACK_COMP_CORE_DEV}")
# TODO: whether we need to do it configuralbe on Windows installer?
ie_cpack_add_component(${lib_component} HIDDEN)
if(OV_FRONTEND_LINKABLE_FRONTEND)
set(export_set EXPORT OpenVINOTargets)
set(archive_dest ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR}
COMPONENT ${lib_component})
set(namelink NAMELINK_COMPONENT ${dev_component})
else()
set(namelink NAMELINK_SKIP)
endif()
install(TARGETS ${TARGET_NAME} ${export_set}
RUNTIME DESTINATION ${OV_CPACK_RUNTIMEDIR} COMPONENT ${lib_component}
${archive_dest}
LIBRARY DESTINATION ${OV_CPACK_LIBRARYDIR} COMPONENT ${lib_component}
${namelink})
RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core
ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core
LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core)
else()
ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})
ov_install_static_lib(${TARGET_NAME} core)
endif()
if(OV_FRONTEND_LINKABLE_FRONTEND)
# install library development files
install(DIRECTORY ${${TARGET_NAME}_INCLUDE_DIR}/openvino
DESTINATION ${FRONTEND_INSTALL_INCLUDE}
COMPONENT ${dev_component}
DESTINATION ${FRONTEND_INSTALL_INCLUDE}/
COMPONENT core_dev
FILES_MATCHING PATTERN "*.hpp")
set_target_properties(${TARGET_NAME} PROPERTIES EXPORT_NAME frontend::${OV_FRONTEND_NAME})
@@ -280,6 +255,6 @@ macro(ov_add_frontend)
endif()
else()
# skipped frontend has to be installed in static libraries case
ov_install_static_lib(${TARGET_NAME} ${OV_CPACK_COMP_CORE})
ov_install_static_lib(${TARGET_NAME} core)
endif()
endmacro()

View File

@@ -2,9 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
if(ENABLE_DATA)
find_package(Git REQUIRED)
endif()
find_package(Git REQUIRED)
set(MODELS_LST "")
set(MODELS_LST_TO_FETCH "")

View File

@@ -2,99 +2,70 @@
# SPDX-License-Identifier: Apache-2.0
#
if(NOT COMMAND ov_check_pip_packages)
message(FATAL_ERROR "Internal error: ncc_naming_style.cmake must be included after ov_check_pip_packages")
if(NOT COMMAND ie_check_pip_package)
message(FATAL_ERROR "ncc_naming_style.cmake must be included after ie_check_pip_package")
endif()
set(ncc_style_dir "${IEDevScripts_DIR}/ncc_naming_style")
set(ncc_style_bin_dir "${CMAKE_CURRENT_BINARY_DIR}/ncc_naming_style")
# find python3
# try to find_package(Clang QUIET)
# ClangConfig.cmake contains bug that if libclang-XX-dev is not
# installed, then find_package fails with errors even in QUIET mode
configure_file("${ncc_style_dir}/try_find_clang.cmake"
"${ncc_style_bin_dir}/source/CMakeLists.txt" COPYONLY)
execute_process(
COMMAND
"${CMAKE_COMMAND}" -S "${ncc_style_bin_dir}/source"
-B "${ncc_style_bin_dir}/build"
RESULT_VARIABLE clang_find_result
OUTPUT_VARIABLE output_var
ERROR_VARIABLE error_var)
find_host_package(PythonInterp 3 QUIET)
if(NOT PYTHONINTERP_FOUND)
message(WARNING "Python3 interpreter was not found (required for ncc naming style check)")
if(NOT clang_find_result EQUAL "0")
message(WARNING "Please, install clang-[N] libclang-[N]-dev package (required for ncc naming style check)")
message(WARNING "find_package(Clang) output: ${output_var}")
message(WARNING "find_package(Clang) error: ${error_var}")
set(ENABLE_NCC_STYLE OFF)
endif()
if(PYTHON_VERSION_MINOR EQUAL 6)
set(clang_version 10)
elseif(PYTHON_VERSION_MINOR EQUAL 7)
set(clang_version 11)
elseif(PYTHON_VERSION_MINOR EQUAL 8)
set(clang_version 12)
elseif(PYTHON_VERSION_MINOR EQUAL 9)
set(clang_version 12)
elseif(PYTHON_VERSION_MINOR EQUAL 10)
set(clang_version 14)
else()
message(WARNING "Cannot suggest clang package for python ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
endif()
if(ENABLE_NCC_STYLE)
# try to find_package(Clang QUIET)
# ClangConfig.cmake contains bug that if libclang-XX-dev is not
# installed, then find_package fails with errors even in QUIET mode
configure_file("${ncc_style_dir}/try_find_clang.cmake"
"${ncc_style_bin_dir}/source/CMakeLists.txt" COPYONLY)
execute_process(
COMMAND "${CMAKE_COMMAND}" -S "${ncc_style_bin_dir}/source"
-B "${ncc_style_bin_dir}/build"
RESULT_VARIABLE clang_find_result
OUTPUT_VARIABLE output_var
ERROR_VARIABLE error_var)
if(NOT clang_find_result EQUAL "0")
message(WARNING "Please, install `apt-get install clang-${clang_version} libclang-${clang_version}-dev` package (required for ncc naming style check)")
message(TRACE "find_package(Clang) output: ${output_var}")
message(TRACE "find_package(Clang) error: ${error_var}")
set(ENABLE_NCC_STYLE OFF)
endif()
endif()
# Since we were able to find_package(Clang) in a separate process
# let's try to find in current process
if(ENABLE_NCC_STYLE)
if(APPLE)
find_host_library(libclang_location NAMES clang
PATHS /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
DOC "Path to clang library")
else()
find_host_package(Clang QUIET)
endif()
find_host_package(Clang QUIET)
if(Clang_FOUND AND TARGET libclang)
get_target_property(libclang_location libclang LOCATION)
endif()
if(NOT libclang_location)
message(WARNING "clang-${clang_version} libclang-${clang_version}-dev are not found (required for ncc naming style check)")
set(ENABLE_NCC_STYLE OFF)
else()
message(STATUS "Found libclang: ${libclang_location}")
else()
message(WARNING "libclang is not found (required for ncc naming style check)")
set(ENABLE_NCC_STYLE OFF)
endif()
endif()
# find python3
find_package(PythonInterp 3 QUIET)
if(NOT PYTHONINTERP_FOUND)
message(WARNING "Python3 interpreter was not found (required for ncc naming style check)")
set(ENABLE_NCC_STYLE OFF)
endif()
# check python requirements_dev.txt
if(ENABLE_NCC_STYLE)
set(ncc_script_py "${ncc_style_dir}/ncc/ncc.py")
if(NOT EXISTS ${ncc_script_py})
message(WARNING "ncc.py is not downloaded via submodule")
set(ENABLE_NCC_STYLE OFF)
endif()
set(ncc_script_py "${ncc_style_dir}/ncc/ncc.py")
if(NOT EXISTS ${ncc_script_py})
message(WARNING "ncc.py is not downloaded via submodule")
set(ENABLE_NCC_STYLE OFF)
endif()
if(ENABLE_NCC_STYLE)
ov_check_pip_packages(REQUIREMENTS_FILE "${ncc_style_dir}/requirements_dev.txt"
RESULT_VAR python_clang_FOUND
WARNING_MESSAGE "NCC style check will be unavailable"
MESSAGE_MODE WARNING)
if(NOT python_clang_FOUND)
# Note: warnings is already thrown by `ov_check_pip_packages`
set(ENABLE_NCC_STYLE OFF)
endif()
set(req_file "${ncc_style_dir}/requirements_dev.txt")
file(STRINGS ${req_file} req_lines)
foreach(req IN LISTS req_lines)
ie_check_pip_package(${req} STATUS)
endforeach()
endif()
# create high-level target

View File

@@ -26,7 +26,7 @@ execute_process(
--include ${ADDITIONAL_INCLUDE_DIRECTORIES}
RESULT_VARIABLE result
OUTPUT_VARIABLE output
ERROR_VARIABLE error)
ERROR_VARIABLE output)
file(WRITE "${OUTPUT_FILE}" "${output}")
@@ -40,6 +40,6 @@ endif()
if(failed AND NOT EXPECTED_FAIL)
# Display the output to console (to parse it form IDE)
message("${output}\n${error}")
message("${output}")
message(FATAL_ERROR "[ncc naming style] Naming style check failed for ${INPUT_FILE}")
endif()

View File

@@ -1,6 +1,2 @@
clang==10.0.1; python_version == '3.6'
clang==11.1.0; python_version == '3.7'
clang==12.0.1; python_version == '3.8'
clang==12.0.1; python_version == '3.9'
clang==14.0; python_version == '3.10'
clang==11.0
pyyaml

View File

@@ -6,10 +6,6 @@
include (CMakeDependentOption)
if(POLICY CMP0127)
cmake_policy(SET CMP0127 NEW)
endif()
macro (ie_option variable description value)
option(${variable} "${description}" ${value})
list(APPEND IE_OPTIONS ${variable})
@@ -46,7 +42,7 @@ function (print_enabled_features)
message(FATAL_ERROR "CI_BUILD_NUMBER is not set yet")
endif()
message(STATUS "OpenVINO Runtime enabled features: ")
message(STATUS "Inference Engine enabled features: ")
message(STATUS "")
message(STATUS " CI_BUILD_NUMBER: ${CI_BUILD_NUMBER}")
foreach(_var ${IE_OPTIONS})

View File

@@ -0,0 +1,82 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
include(CMakeParseArguments)
include(CPackComponent)
#
# ie_cpack_set_library_dir()
#
# Set library directory for cpack
#
function(ie_cpack_set_library_dir)
if(WIN32)
set(IE_CPACK_LIBRARY_PATH runtime/lib/${ARCH_FOLDER}/$<CONFIG> PARENT_SCOPE)
set(IE_CPACK_RUNTIME_PATH runtime/bin/${ARCH_FOLDER}/$<CONFIG> PARENT_SCOPE)
set(IE_CPACK_ARCHIVE_PATH runtime/lib/${ARCH_FOLDER}/$<CONFIG> PARENT_SCOPE)
elseif(APPLE)
set(IE_CPACK_LIBRARY_PATH runtime/lib/${ARCH_FOLDER}/$<CONFIG> PARENT_SCOPE)
set(IE_CPACK_RUNTIME_PATH runtime/lib/${ARCH_FOLDER}/$<CONFIG> PARENT_SCOPE)
set(IE_CPACK_ARCHIVE_PATH runtime/lib/${ARCH_FOLDER}/$<CONFIG> PARENT_SCOPE)
else()
set(IE_CPACK_LIBRARY_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE)
set(IE_CPACK_RUNTIME_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE)
set(IE_CPACK_ARCHIVE_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE)
endif()
endfunction()
ie_cpack_set_library_dir()
#
# ie_cpack_add_component(NAME ...)
#
# Wraps original `cpack_add_component` and adds component to internal IE list
#
unset(IE_CPACK_COMPONENTS_ALL CACHE)
macro(ie_cpack_add_component NAME)
list(APPEND IE_CPACK_COMPONENTS_ALL ${NAME})
set(IE_CPACK_COMPONENTS_ALL "${IE_CPACK_COMPONENTS_ALL}" CACHE STRING "" FORCE)
cpack_add_component(${NAME} ${args})
endmacro()
# create test component
if(ENABLE_TESTS)
cpack_add_component(tests DISABLED)
endif()
macro(ie_cpack)
set(CPACK_GENERATOR "TGZ")
set(CPACK_SOURCE_GENERATOR "")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenVINO toolkit")
set(CPACK_COMPONENT_UNSPECIFIED_REQUIRED OFF)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) # multiple components
set(CPACK_PACKAGE_VENDOR "Intel Corporation")
set(CPACK_VERBATIM_VARIABLES ON)
set(CPACK_COMPONENTS_ALL ${ARGN})
if (NOT DEFINED CPACK_STRIP_FILES)
set(CPACK_STRIP_FILES ON)
endif()
set(CPACK_THREADS 8)
string(REPLACE "/" "_" CPACK_PACKAGE_VERSION "${CI_BUILD_NUMBER}")
if(WIN32)
set(CPACK_PACKAGE_NAME inference-engine_${CMAKE_BUILD_TYPE})
else()
set(CPACK_PACKAGE_NAME inference-engine)
endif()
foreach(ver IN LISTS MAJOR MINOR PATCH)
if(DEFINED OpenVINO_VERSION_${ver})
set(CPACK_PACKAGE_VERSION_${ver} ${OpenVINO_VERSION_${ver}})
endif()
endforeach()
if(OS_FOLDER)
set(CPACK_SYSTEM_NAME "${OS_FOLDER}")
endif()
include(CPack)
endmacro()

View File

@@ -1,32 +0,0 @@
openvino (2022.3.0) unstable; urgency=low
* Implemented Debian packages support
* Support of Ubuntu 22.04
* Support of python 3.10
* Introduced OpenVINO Runtime 2.0 C API
-- OpenVINO Developers <openvino@intel.com> Sun, 30 Oct 2022 04:17:51 +0800
openvino (2022.2.0) unstable; urgency=low
* 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 Intels 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.
* NEW: Test your model performance with preview support for Intel 4th Generation Xeon® processors (code named Sapphire Rapids).
* Broader support for NLP models and use cases like text to speech and voice recognition. Reduced memory consumption when using Dynamic Input Shapes on CPU. Improved efficiency for NLP applications.
* Frameworks Integrations More options that provide minimal code changes to align with your existing frameworks
* OpenVINO Execution Provider for ONNX Runtime gives ONNX Runtime developers more choice for performance optimizations by making it easy to add OpenVINO with minimal code changes.
* NEW: Accelerate PyTorch models with ONNX Runtime using OpenVINO™ integration with ONNX Runtime for PyTorch (OpenVINO™ Torch-ORT). Now PyTorch developers can stay within their framework and benefit from OpenVINO performance gains.
* OpenVINO Integration with TensorFlow now supports more deep learning models with improved inferencing performance.
* More portability and performance - See a performance boost straight away with automatic device discovery, load balancing & dynamic inference parallelism across CPU, GPU, and more.
* 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
-- OpenVINO Developers <openvino@intel.com> Thu, 28 Jul 2022 04:17:51 +0800
openvino (2022.1.0) unstable; urgency=low
* Implemented OpenVINO 2.0 Runtime API for both C++ and Python
* Introduced IR v11 which is aligned with frameworks model format
-- OpenVINO Developers <openvino@intel.com> Thu, 22 Mar 2022 04:12:56 +0800

View File

@@ -1,23 +0,0 @@
* Sun Jul 4 12:00:00 2010 OpenVINO Developers <openvino@intel.com> - 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 <openvino@intel.com> - 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 Intels 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.
- NEW: Test your model performance with preview support for Intel 4th Generation Xeon® processors (code named Sapphire Rapids).
- Broader support for NLP models and use cases like text to speech and voice recognition. Reduced memory consumption when using Dynamic Input Shapes on CPU. Improved efficiency for NLP applications.
- Frameworks Integrations More options that provide minimal code changes to align with your existing frameworks
- OpenVINO Execution Provider for ONNX Runtime gives ONNX Runtime developers more choice for performance optimizations by making it easy to add OpenVINO with minimal code changes.
- NEW: Accelerate PyTorch models with ONNX Runtime using OpenVINO™ integration with ONNX Runtime for PyTorch (OpenVINO™ Torch-ORT). Now PyTorch developers can stay within their framework and benefit from OpenVINO performance gains.
- OpenVINO Integration with TensorFlow now supports more deep learning models with improved inferencing performance.
- More portability and performance - See a performance boost straight away with automatic device discovery, load balancing & dynamic inference parallelism across CPU, GPU, and more.
- 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 <openvino@intel.com> - 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

View File

@@ -1,71 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
include(GNUInstallDirs)
#
# ov_common_libraries_cpack_set_dirs()
#
# Set directories for cpack
#
macro(ov_common_libraries_cpack_set_dirs)
# override default locations for common libraries
set(OV_CPACK_TOOLSDIR ${CMAKE_INSTALL_BINDIR}) # only C++ tools are here
set(OV_CPACK_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR})
set(OV_CPACK_LIBRARYDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_RUNTIMEDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_WHEEL_RUNTIMEDIR ${OV_CPACK_RUNTIMEDIR})
set(OV_CPACK_ARCHIVEDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_PLUGINSDIR ${CMAKE_INSTALL_LIBDIR}/openvino-${OpenVINO_VERSION})
set(OV_CPACK_IE_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/inferenceengine${OpenVINO_VERSION})
set(OV_CPACK_NGRAPH_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph${OpenVINO_VERSION})
set(OV_CPACK_OPENVINO_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/openvino${OpenVINO_VERSION})
set(OV_CPACK_DOCDIR ${CMAKE_INSTALL_DATADIR}/doc/openvino-${OpenVINO_VERSION})
ov_get_pyversion(pyversion)
if(pyversion)
set(OV_CPACK_PYTHONDIR ${CMAKE_INSTALL_LIBDIR}/${pyversion}/site-packages)
endif()
# non-native stuff
set(OV_CPACK_SHAREDIR ${CMAKE_INSTALL_DATADIR}/openvino) # internal
set(OV_CPACK_SAMPLESDIR ${OV_CPACK_SHAREDIR}/samples)
set(OV_CPACK_DEVREQDIR ${OV_CPACK_SHAREDIR})
unset(OV_CPACK_SHAREDIR)
# skipped during common libraries packaging
set(OV_CPACK_WHEELSDIR "tools")
# for BW compatibility
set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR})
set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR})
endmacro()
ov_common_libraries_cpack_set_dirs()
#
# Override CPack components name for common libraries generator
# This is needed to change the granularity, i.e. merge several components
# into a single one
#
macro(ov_override_component_names)
# merge C++ and C runtimes
set(OV_CPACK_COMP_CORE_C "${OV_CPACK_COMP_CORE}")
set(OV_CPACK_COMP_CORE_C_DEV "${OV_CPACK_COMP_CORE_DEV}")
# merge all pythons into a single component
set(OV_CPACK_COMP_PYTHON_OPENVINO "pyopenvino")
set(OV_CPACK_COMP_PYTHON_IE_API "${OV_CPACK_COMP_PYTHON_OPENVINO}")
set(OV_CPACK_COMP_PYTHON_NGRAPH "${OV_CPACK_COMP_PYTHON_OPENVINO}")
# merge all C / C++ samples as a single samples component
set(OV_CPACK_COMP_CPP_SAMPLES "samples")
set(OV_CPACK_COMP_C_SAMPLES "${OV_CPACK_COMP_CPP_SAMPLES}")
# move requirements.txt to core-dev
set(OV_CPACK_COMP_DEV_REQ_FILES "${OV_CPACK_COMP_CORE_DEV}")
# move core_tools to core-dev
set(OV_CPACK_COMP_CORE_TOOLS "${OV_CPACK_COMP_CORE_DEV}")
endmacro()
ov_override_component_names()

View File

@@ -1,31 +0,0 @@
This package was debianized by OpenVINO Developers <openvino@intel.com> on
Wed, 16 Aug 2006 19:17:30 +0100.
Copyright:
deb822.py is Copyright (C) 2005-2006 dann frazier <dannf@dannf.org>
2006 John Wright <john@movingsucks.org>
changelog.py, setup.py, README.Changelog and the contents of
examples/changelog/ are
Copyright (C) 2006-7 James Westby <jw+debian@jameswestby.net>
Copyright (C) 2008 Canonical Ltd.
debian_support.py is Copyright (C) 2005 Florian Weimer <fw@deneb.enyo.de>
Debtags.py, and the contents of examples/debtags/ are
Copyright (C) 2003--3006 Enrico Zini <enrico@debian.org>
debfile.py, arfile.py, and examples/debfile/* are
Copyright (C) 2007 Stefano Zacchiroli <zack@debian.org>
2007 Filippo Giunchedi <filippo@debian.org>
Licenses:
The following modules are released under GPL v2 or above:
changelog.py, debian_support.py, deb822.py
The following modules are released under GPL v3 or above:
debfile.py, arfile.py, debtags.py
On Debian systems, the complete text of the Apache 2.0 License
can be found in `/usr/share/common-licenses/Apache-2.0'.

View File

@@ -1,286 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
include(GNUInstallDirs)
#
# ov_debian_cpack_set_dirs()
#
# Set directories for cpack
#
macro(ov_debian_cpack_set_dirs)
# override default locations for Debian
set(OV_CPACK_TOOLSDIR ${CMAKE_INSTALL_BINDIR}) # only C++ tools are here
set(OV_CPACK_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR})
set(OV_CPACK_LIBRARYDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_RUNTIMEDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_WHEEL_RUNTIMEDIR ${OV_CPACK_RUNTIMEDIR})
set(OV_CPACK_ARCHIVEDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_PLUGINSDIR ${CMAKE_INSTALL_LIBDIR}/openvino-${OpenVINO_VERSION})
set(OV_CPACK_IE_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/inferenceengine${OpenVINO_VERSION})
set(OV_CPACK_NGRAPH_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph${OpenVINO_VERSION})
set(OV_CPACK_OPENVINO_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/openvino${OpenVINO_VERSION})
set(OV_CPACK_DOCDIR ${CMAKE_INSTALL_DATADIR}/doc/openvino-${OpenVINO_VERSION})
set(OV_CPACK_PYTHONDIR lib/python3/dist-packages)
# non-native stuff
set(OV_CPACK_SHAREDIR ${CMAKE_INSTALL_DATADIR}/openvino) # internal
set(OV_CPACK_SAMPLESDIR ${OV_CPACK_SHAREDIR}/samples)
set(OV_CPACK_DEVREQDIR ${OV_CPACK_SHAREDIR})
unset(OV_CPACK_SHAREDIR)
# skipped during debian packaging
set(OV_CPACK_WHEELSDIR "tools")
# for BW compatibility
set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR})
set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR})
endmacro()
ov_debian_cpack_set_dirs()
#
# Override CPack components name for Debian generator
# This is needed to change the granularity, i.e. merge several components
# into a single one
#
macro(ov_override_component_names)
# merge C++ and C runtimes
set(OV_CPACK_COMP_CORE_C "${OV_CPACK_COMP_CORE}")
set(OV_CPACK_COMP_CORE_C_DEV "${OV_CPACK_COMP_CORE_DEV}")
# merge all pythons into a single component
set(OV_CPACK_COMP_PYTHON_OPENVINO "pyopenvino")
set(OV_CPACK_COMP_PYTHON_IE_API "${OV_CPACK_COMP_PYTHON_OPENVINO}")
set(OV_CPACK_COMP_PYTHON_NGRAPH "${OV_CPACK_COMP_PYTHON_OPENVINO}")
# merge all C / C++ samples as a single samples component
set(OV_CPACK_COMP_CPP_SAMPLES "samples")
set(OV_CPACK_COMP_C_SAMPLES "${OV_CPACK_COMP_CPP_SAMPLES}")
# move requirements.txt to core-dev
set(OV_CPACK_COMP_DEV_REQ_FILES "${OV_CPACK_COMP_CORE_DEV}")
# move core_tools to core-dev
set(OV_CPACK_COMP_CORE_TOOLS "${OV_CPACK_COMP_CORE_DEV}")
endmacro()
ov_override_component_names()
#
# Common Debian specific settings
#
macro(ov_debian_specific_settings)
# multiple packages are generated
set(CPACK_DEB_COMPONENT_INSTALL ON)
# automatically find dependencies for binaries
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
# enable dependencies between components
set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
# control file permissions
set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION OFF)
# homepage
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://docs.openvino.ai/")
# use lintian to check packages in post-build step
set(CPACK_POST_BUILD_SCRIPTS "${IEDevScripts_DIR}/packaging/debian_post_build.cmake")
# enable for debug cpack run
if(NOT DEFINED CPACK_DEBIAN_PACKAGE_DEBUG)
set(CPACK_DEBIAN_PACKAGE_DEBUG OFF)
endif()
# WA: dpkg-shlibdeps requires folder with libraries
# proper way is to use -l (path to libs) and -L (path to shlibs) for other already installed components
# but it requires CMake source code changes
# with current WA automatic deps detection via dpkg-shlibdeps for "our libraries"
# is ignored; but dependencies between our components are here because of
# CPACK_COMPONENT_<UCOMP>_DEPENDS variables
if(DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
else()
message(FATAL_ERROR "CMAKE_LIBRARY_OUTPUT_DIRECTORY is empty")
endif()
# automatic dependencies discovering between openvino and user packages
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON)
# OpenVINO does not have backward and forward compatibility
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY "=")
# naming convention for debian package files
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
# need to update this version once we rebuild the same package with additional fixes
# set(CPACK_DEBIAN_PACKAGE_RELEASE "1")
# enable this if someday we change the version scheme
# set(CPACK_DEBIAN_PACKAGE_EPOCH "2")
# temporary WA for debian package architecture for cross-compilation
# proper solution: to force cmake auto-detect this
if(CMAKE_CROSSCOMPILING)
if(AARCH64)
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE arm64)
elseif(ARM)
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE armhf)
elseif(x86)
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
endif()
endif()
endmacro()
ov_debian_specific_settings()
# needed to override cmake auto generated files
set(def_postinst "${OpenVINO_BINARY_DIR}/_CPack_Packages/postinst")
set(def_postrm "${OpenVINO_BINARY_DIR}/_CPack_Packages/postrm")
set(def_triggers "${OpenVINO_BINARY_DIR}/_CPack_Packages/triggers")
set(triggers_content "activate-noawait ldconfig\n\n")
set(post_content "#!/bin/sh\n\nset -e;\nset -e\n\n")
file(REMOVE ${def_postinst} ${def_postrm} ${def_triggers})
file(WRITE "${def_postinst}" "${post_content}")
file(WRITE "${def_postrm}" "${post_content}")
file(WRITE "${def_triggers}" "${triggers_content}")
#
# Functions helpful for packaging your modules with Debian cpack
#
#
# ov_debian_add_changelog_and_copyright(<comp name>)
#
function(ov_debian_add_changelog_and_copyright comp)
string(TOUPPER "${comp}" ucomp)
if(NOT DEFINED CPACK_DEBIAN_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_DEBIAN_${ucomp}_PACKAGE_NAME is not defined")
else()
set(package_name "${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
endif()
set(package_name "${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
# copyright
install(FILES "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/copyright"
DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/${package_name}/
COMPONENT ${comp})
# create changelog.gz
find_host_program(gzip_PROGRAM NAMES gzip DOC "Path to gzip tool")
if(NOT gzip_PROGRAM)
message(FATAL_ERROR "Failed to find gzip tool")
endif()
set(changelog_src "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/changelog")
set(package_bin_dir "${OpenVINO_BINARY_DIR}/_CPack_Packages/${package_name}")
set(changelog_output "${package_bin_dir}/changelog")
file(REMOVE "${changelog_output}")
file(REMOVE "${changelog_output}.gz")
file(MAKE_DIRECTORY "${package_bin_dir}")
configure_file("${changelog_src}" "${changelog_output}" COPYONLY)
execute_process(COMMAND gzip -n -9 "${changelog_output}"
WORKING_DIRECTORY "${package_bin_dir}"
OUTPUT_VARIABLE output_message
ERROR_VARIABLE error_message
RESULT_VARIABLE exit_code
OUTPUT_STRIP_TRAILING_WHITESPACE)
# install changelog.gz
install(FILES "${changelog_output}.gz"
DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/${package_name}/
COMPONENT ${comp})
endfunction()
#
# ov_debian_add_lintian_suppression(<comp name> <suppression1, suppression2, ...>)
#
function(ov_debian_add_lintian_suppression comp)
set(lines ${ARGN})
string(TOUPPER "${comp}" ucomp)
if(NOT DEFINED CPACK_DEBIAN_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_DEBIAN_${ucomp}_PACKAGE_NAME is not defined")
else()
set(package_name "${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
endif()
foreach(line IN LISTS lines)
set(line "${package_name} binary: ${line}")
if(content)
set(content "${content}\n${line}")
else()
set(content "${line}")
endif()
endforeach()
set(lintian_override_file "${OpenVINO_BINARY_DIR}/_CPack_Packages/lintian/${package_name}")
file(REMOVE ${lintian_override_file})
file(WRITE ${lintian_override_file} ${content})
install(FILES ${lintian_override_file}
DESTINATION ${CMAKE_INSTALL_DATADIR}/lintian/overrides/
COMPONENT ${comp})
endfunction()
#
# ov_debian_generate_conflicts(<comp name>)
#
function(ov_debian_generate_conflicts comp)
set(cpack_name_versions ${ARGN})
string(TOUPPER "${comp}" ucomp)
# sanity check
if(NOT DEFINED CPACK_DEBIAN_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_DEBIAN_${ucomp}_PACKAGE_NAME is not defined")
else()
if(NOT DEFINED cpack_name_ver)
message(FATAL_ERROR "Internal variable 'cpack_name_ver' is not defined")
endif()
string(REPLACE "${cpack_name_ver}" "" package_name_base "${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
endif()
foreach(cpack_name_version IN LISTS cpack_name_versions)
if(package_names)
set(package_names "${package_names}, ${package_name_base}${cpack_name_version}")
else()
set(package_names "${package_name_base}${cpack_name_version}")
endif()
endforeach()
set(CPACK_DEBIAN_${ucomp}_PACKAGE_CONFLICTS "${package_names}" PARENT_SCOPE)
endfunction()
#
# ov_debian_add_latest_component(<comp>)
#
# Adds latest component for `comp`, but without a version
# Description and other stuff (arch) is taken from the main component
#
macro(ov_debian_add_latest_component comp)
string(TOUPPER "${comp}" ucomp)
set(comp_name "${comp}_latest")
set(upper_case "${ucomp}_LATEST")
set(CPACK_COMPONENT_${upper_case}_DESCRIPTION "${CPACK_COMPONENT_${ucomp}_DESCRIPTION}")
set(CPACK_COMPONENT_${upper_case}_ARCHITECTURE "all")
set(CPACK_COMPONENT_${upper_case}_DEPENDS "${comp}")
# take package name
if(DEFINED CPACK_DEBIAN_${ucomp}_PACKAGE_NAME)
string(REPLACE "-${cpack_name_ver}" ""
CPACK_DEBIAN_${upper_case}_PACKAGE_NAME
"${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
else()
message(FATAL_ERROR "CPACK_DEBIAN_${ucomp}_PACKAGE_NAME is not defined")
endif()
ov_debian_add_lintian_suppression(${comp_name}
# it's umbrella package
"empty-binary-package")
# add latest to a list of debian packages
list(APPEND CPACK_COMPONENTS_ALL ${comp_name})
endmacro()

View File

@@ -1,41 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
find_program(lintian_PROGRAM NAMES lintian DOC "Path to lintian tool")
if(NOT lintian_PROGRAM)
message(WARNING "Failed to find 'lintian' tool, use 'sudo apt-get install lintian' to install it")
return()
endif()
execute_process(COMMAND "${lintian_PROGRAM}" --version
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
RESULT_VARIABLE lintian_code
OUTPUT_VARIABLE lintian_version)
if(NOT lintian_code EQUAL 0)
message(FATAL_ERROR "Internal error: Failed to determine lintian version")
else()
message(STATUS "${lintian_version}")
endif()
set(lintian_passed ON)
foreach(deb_file IN LISTS CPACK_PACKAGE_FILES)
execute_process(COMMAND "${lintian_PROGRAM}" ${deb_file}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
RESULT_VARIABLE lintian_exit_code
OUTPUT_VARIABLE lintian_output)
get_filename_component(deb_name "${deb_file}" NAME)
if(NOT lintian_exit_code EQUAL 0)
message("Package ${deb_name}:")
message("${lintian_output}")
set(lintian_passed OFF)
endif()
endforeach()
if(NOT lintian_passed)
message(FATAL_ERROR "Lintian has found some mistakes")
endif()

View File

@@ -1,41 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# installation directory
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Intel")
# TODO: provide icons
# set(CPACK_NSIS_MUI_ICON "")
# set(CPACK_NSIS_MUI_UNIICON "${CPACK_NSIS_MUI_ICON}")
# set(CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP "")
# set(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP "")
# set(CPACK_NSIS_MUI_HEADERIMAGE "")
# we allow to install several packages at once
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL OFF)
set(CPACK_NSIS_MODIFY_PATH OFF)
set(CPACK_NSIS_DISPLAY_NAME "Intel(R) OpenVINO(TM) ${OpenVINO_VERSION}")
set(CPACK_NSIS_PACKAGE_NAME "Intel(R) OpenVINO(TM) ToolKit, v. ${OpenVINO_VERSION}.${OpenVINO_PATCH_VERSION}")
# contact
set(CPACK_NSIS_CONTACT "CPACK_NSIS_CONTACT")
# links in menu
set(CPACK_NSIS_MENU_LINKS
"https://docs.openvinoo.ai" "OpenVINO Documentation")
# welcome and finish titles
set(CPACK_NSIS_WELCOME_TITLE "Welcome to Intel(R) Distribution of OpenVINO(TM) Toolkit installation")
set(CPACK_NSIS_FINISH_TITLE "")
# autoresize?
set(CPACK_NSIS_MANIFEST_DPI_AWARE ON)
# branding text
set(CPACK_NSIS_BRANDING_TEXT "Intel(R) Corp.")
set(CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION RIGHT)
# don't set this variable since we need a user to agree with a lincense
# set(CPACK_NSIS_IGNORE_LICENSE_PAGE OFF)

View File

@@ -1,237 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
include(CPackComponent)
#
# ov_get_pyversion()
#
function(ov_get_pyversion pyversion)
find_package(PythonInterp 3 QUIET)
if(PYTHONINTERP_FOUND)
set(${pyversion} "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" PARENT_SCOPE)
else()
set(${pyversion} "NOT-FOUND" PARENT_SCOPE)
endif()
endfunction()
#
# ov_cpack_set_dirs()
#
# Set directories for cpack
#
macro(ov_cpack_set_dirs)
# common IRC package locations
# TODO: move current variables to OpenVINO specific locations
set(OV_CPACK_INCLUDEDIR runtime/include)
set(OV_CPACK_IE_CMAKEDIR runtime/cmake)
set(OV_CPACK_NGRAPH_CMAKEDIR runtime/cmake)
set(OV_CPACK_OPENVINO_CMAKEDIR runtime/cmake)
set(OV_CPACK_DOCDIR docs)
set(OV_CPACK_SAMPLESDIR samples)
set(OV_CPACK_WHEELSDIR tools)
set(OV_CPACK_TOOLSDIR tools)
set(OV_CPACK_DEVREQDIR tools)
ov_get_pyversion(pyversion)
if(pyversion)
set(OV_CPACK_PYTHONDIR python/${pyversion})
endif()
if(WIN32)
set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}/$<CONFIG>)
set(OV_CPACK_RUNTIMEDIR runtime/bin/${ARCH_FOLDER}/$<CONFIG>)
set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}/$<CONFIG>)
set(OV_WHEEL_RUNTIMEDIR runtime/bin/${ARCH_FOLDER}/Release)
elseif(APPLE)
set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER}/$<CONFIG>)
set(OV_CPACK_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}/$<CONFIG>)
set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER}/$<CONFIG>)
set(OV_WHEEL_RUNTIMEDIR runtime/lib/${ARCH_FOLDER}/Release)
else()
set(OV_CPACK_LIBRARYDIR runtime/lib/${ARCH_FOLDER})
set(OV_CPACK_RUNTIMEDIR runtime/lib/${ARCH_FOLDER})
set(OV_CPACK_ARCHIVEDIR runtime/lib/${ARCH_FOLDER})
set(OV_WHEEL_RUNTIMEDIR ${OV_CPACK_RUNTIMEDIR})
endif()
set(OV_CPACK_PLUGINSDIR ${OV_CPACK_RUNTIMEDIR})
# for BW compatibility
set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR})
set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR})
endmacro()
ov_cpack_set_dirs()
#
# ie_cpack_add_component(NAME ...)
#
# Wraps original `cpack_add_component` and adds component to internal IE list
#
function(ie_cpack_add_component name)
if(NOT ${name} IN_LIST IE_CPACK_COMPONENTS_ALL)
cpack_add_component(${name} ${ARGN})
# need to store informarion about cpack_add_component arguments in CMakeCache.txt
# to restore it later
set(_${name}_cpack_component_args "${ARGN}" CACHE INTERNAL "Argument for cpack_add_component for ${name} cpack component" FORCE)
list(APPEND IE_CPACK_COMPONENTS_ALL ${name})
set(IE_CPACK_COMPONENTS_ALL "${IE_CPACK_COMPONENTS_ALL}" CACHE INTERNAL "" FORCE)
endif()
endfunction()
foreach(comp IN LISTS IE_CPACK_COMPONENTS_ALL)
unset(_${comp}_cpack_component_args)
endforeach()
unset(IE_CPACK_COMPONENTS_ALL CACHE)
# create `tests` component
if(ENABLE_TESTS)
cpack_add_component(tests HIDDEN)
endif()
#
# ov_install_with_name(<FILE> <COMPONENT>)
#
# if <FILE> is a symlink, we resolve it, but install file with a name of symlink
#
function(ov_install_with_name file component)
if((APPLE AND file MATCHES "^[^\.]+\.[0-9]+${CMAKE_SHARED_LIBRARY_SUFFIX}$") OR
(file MATCHES "^.*\.${CMAKE_SHARED_LIBRARY_SUFFIX}\.[0-9]+$"))
if(IS_SYMLINK "${file}")
get_filename_component(actual_name "${file}" NAME)
get_filename_component(file "${file}" REALPATH)
set(install_rename RENAME "${actual_name}")
endif()
install(FILES "${file}"
DESTINATION runtime/3rdparty/${component}/lib
COMPONENT ${component}
EXCLUDE_FROM_ALL
${install_rename})
set("${component}_INSTALLED" ON PARENT_SCOPE)
endif()
endfunction()
#
# List of public OpenVINO components
#
macro(ov_define_component_names)
# core components
set(OV_CPACK_COMP_CORE "core")
set(OV_CPACK_COMP_CORE_C "core_c")
set(OV_CPACK_COMP_CORE_DEV "core_dev")
set(OV_CPACK_COMP_CORE_C_DEV "core_c_dev")
# licensing
set(OV_CPACK_COMP_LICENSING "licensing")
# samples
set(OV_CPACK_COMP_CPP_SAMPLES "cpp_samples")
set(OV_CPACK_COMP_C_SAMPLES "c_samples")
set(OV_CPACK_COMP_PYTHON_SAMPLES "python_samples")
# python
set(OV_CPACK_COMP_PYTHON_IE_API "pyie")
set(OV_CPACK_COMP_PYTHON_NGRAPH "pyngraph")
set(OV_CPACK_COMP_PYTHON_OPENVINO "pyopenvino")
set(OV_CPACK_COMP_PYTHON_WHEELS "python_wheels")
# tools
set(OV_CPACK_COMP_CORE_TOOLS "core_tools")
set(OV_CPACK_COMP_DEV_REQ_FILES "openvino_dev_req_files")
set(OV_CPACK_COMP_DEPLOYMENT_MANAGER "deployment_manager")
# scripts
set(OV_CPACK_COMP_INSTALL_DEPENDENCIES "install_dependencies")
set(OV_CPACK_COMP_SETUPVARS "setupvars")
endmacro()
ov_define_component_names()
# Include Debian specific configuration file:
# - overrides directories set by ov_debian_cpack_set_dirs()
# - merges some components using ov_override_component_names()
# - sets ov_debian_specific_settings() with DEB generator variables
# - defines the following helper functions:
# - ov_add_lintian_suppression()
# - ov_add_latest_component()
if(CPACK_GENERATOR STREQUAL "DEB")
include(packaging/debian)
elseif(CPACK_GENERATOR STREQUAL "RPM")
include(packaging/rpm)
elseif(CPACK_GENERATOR STREQUAL "NSIS")
include(packaging/nsis)
elseif(CPACK_GENERATOR MATCHES "^(CONDA-FORGE|BREW)$")
include(packaging/common-libraries)
endif()
macro(ie_cpack)
if(NOT DEFINED CPACK_GENERATOR)
set(CPACK_GENERATOR "TGZ")
endif()
set(CPACK_SOURCE_GENERATOR "") # not used
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenVINO™ Toolkit for Deep Learning Inference")
set(CPACK_COMPONENT_UNSPECIFIED_REQUIRED OFF)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_PACKAGE_VENDOR "Intel Corporation")
set(CPACK_PACKAGE_CONTACT "OpenVINO Developers <openvino@intel.com>")
set(CPACK_VERBATIM_VARIABLES ON)
set(CPACK_COMPONENTS_ALL ${ARGN})
# TODO: set proper license file for Windows installer
set(CPACK_RESOURCE_FILE_LICENSE "${OpenVINO_SOURCE_DIR}/LICENSE")
# default permissions for directories creation
set(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE OWNER_EXECUTE
WORLD_READ WORLD_EXECUTE)
# archive operations can be run in parallel since CMake 3.20
set(CPACK_THREADS 8)
if(NOT DEFINED CPACK_STRIP_FILES)
set(CPACK_STRIP_FILES ON)
endif()
# TODO: replace with openvino
if(WIN32)
set(CPACK_PACKAGE_NAME inference-engine_${CMAKE_BUILD_TYPE})
else()
set(CPACK_PACKAGE_NAME inference-engine)
endif()
set(CPACK_PACKAGE_VERSION "${OpenVINO_VERSION}")
if(NOT OpenVINO_VERSION_BUILD STREQUAL "000")
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.${OpenVINO_VERSION_BUILD}")
endif()
foreach(ver MAJOR MINOR PATCH)
if(DEFINED OpenVINO_VERSION_${ver})
set(CPACK_PACKAGE_VERSION_${ver} ${OpenVINO_VERSION_${ver}})
else()
message(FATAL_ERROR "Internal: OpenVINO_VERSION_${ver} variable is not defined")
endif()
endforeach()
if(OS_FOLDER)
set(CPACK_SYSTEM_NAME "${OS_FOLDER}")
endif()
# include GENERATOR dedicated per-component configuration file
# NOTE: private modules need to define ov_cpack_settings macro
# for custom packages configuration
if(COMMAND ov_cpack_settings)
ov_cpack_settings()
endif()
# generator specific variables
if(CPACK_GENERATOR MATCHES "^(7Z|TBZ2|TGZ|TXZ|TZ|ZIP)$")
# New in version 3.18
set(CPACK_ARCHIVE_THREADS 8)
# multiple packages are generated
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
endif()
include(CPack)
endmacro()

View File

@@ -1,232 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
include(GNUInstallDirs)
#
# ov_rpm_cpack_set_dirs()
#
# Set directories for cpack
#
macro(ov_rpm_cpack_set_dirs)
# override default locations for RPM
set(OV_CPACK_TOOLSDIR ${CMAKE_INSTALL_BINDIR}) # only C++ tools are here
set(OV_CPACK_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR})
set(OV_CPACK_LIBRARYDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_RUNTIMEDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_WHEEL_RUNTIMEDIR ${OV_CPACK_RUNTIMEDIR})
set(OV_CPACK_ARCHIVEDIR ${CMAKE_INSTALL_LIBDIR})
set(OV_CPACK_PLUGINSDIR ${CMAKE_INSTALL_LIBDIR}/openvino-${OpenVINO_VERSION})
set(OV_CPACK_IE_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/inferenceengine${OpenVINO_VERSION})
set(OV_CPACK_NGRAPH_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph${OpenVINO_VERSION})
set(OV_CPACK_OPENVINO_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/openvino${OpenVINO_VERSION})
set(OV_CPACK_DOCDIR ${CMAKE_INSTALL_DATADIR}/doc/openvino-${OpenVINO_VERSION})
ov_get_pyversion(pyversion)
if(pyversion)
set(OV_CPACK_PYTHONDIR ${CMAKE_INSTALL_LIBDIR}/${pyversion}/site-packages)
endif()
# non-native stuff
set(OV_CPACK_SHAREDIR ${CMAKE_INSTALL_DATADIR}/openvino-${OpenVINO_VERSION}) # internal
set(OV_CPACK_SAMPLESDIR ${OV_CPACK_SHAREDIR}/samples)
set(OV_CPACK_DEVREQDIR ${OV_CPACK_SHAREDIR})
unset(OV_CPACK_SHAREDIR)
# skipped during rpm packaging
set(OV_CPACK_WHEELSDIR "tools")
# for BW compatibility
set(IE_CPACK_LIBRARY_PATH ${OV_CPACK_LIBRARYDIR})
set(IE_CPACK_RUNTIME_PATH ${OV_CPACK_RUNTIMEDIR})
set(IE_CPACK_ARCHIVE_PATH ${OV_CPACK_ARCHIVEDIR})
endmacro()
ov_rpm_cpack_set_dirs()
#
# Override CPack components name for RPM generator
# This is needed to change the granularity, i.e. merge several components
# into a single one
#
macro(ov_override_component_names)
# merge C++ and C runtimes
set(OV_CPACK_COMP_CORE_C "${OV_CPACK_COMP_CORE}")
set(OV_CPACK_COMP_CORE_C_DEV "${OV_CPACK_COMP_CORE_DEV}")
# merge all pythons into a single component
set(OV_CPACK_COMP_PYTHON_OPENVINO "pyopenvino")
set(OV_CPACK_COMP_PYTHON_IE_API "${OV_CPACK_COMP_PYTHON_OPENVINO}")
set(OV_CPACK_COMP_PYTHON_NGRAPH "${OV_CPACK_COMP_PYTHON_OPENVINO}")
# merge all C / C++ samples as a single samples component
set(OV_CPACK_COMP_CPP_SAMPLES "samples")
set(OV_CPACK_COMP_C_SAMPLES "${OV_CPACK_COMP_CPP_SAMPLES}")
# set(OV_CPACK_COMP_PYTHON_SAMPLES "${OV_CPACK_COMP_CPP_SAMPLES}")
# move requirements.txt to core-dev
set(OV_CPACK_COMP_DEV_REQ_FILES "${OV_CPACK_COMP_CORE_DEV}")
# move core_tools to core-dev
set(OV_CPACK_COMP_CORE_TOOLS "${OV_CPACK_COMP_CORE_DEV}")
endmacro()
ov_override_component_names()
#
# Common RPM specific settings
#
macro(ov_rpm_specific_settings)
# multiple packages are generated
set(CPACK_RPM_COMPONENT_INSTALL ON)
# automatically find dependencies for binaries
set(CPACK_RPM_PACKAGE_AUTOREQPROV ON)
# enable dependencies between components
set(CPACK_RPM_ENABLE_COMPONENT_DEPENDS ON)
# homepage
set(CPACK_RPM_PACKAGE_URL "https://docs.openvino.ai/")
# ASL 2.0 # Apache Software License 2.0
set(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0")
# 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/changelog-rpm")
# use rpmlint to check packages in post-build step
set(CPACK_POST_BUILD_SCRIPTS "${IEDevScripts_DIR}/packaging/rpm_post_build.cmake")
# enable for debug cpack run
if(NOT DEFINED CPACK_RPM_PACKAGE_DEBUG)
set(CPACK_RPM_PACKAGE_DEBUG OFF)
endif()
# naming convention for rpm package files
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
# need to update this version once we rebuild the same package with additional fixes
# set(CPACK_RPM_PACKAGE_RELEASE "1")
# enable this if someday we change the version scheme
# set(CPACK_RPM_PACKAGE_EPOCH "2")
endmacro()
ov_rpm_specific_settings()
# needed to add triggers for packages with libraries
set(def_triggers "${OpenVINO_BINARY_DIR}/_CPack_Packages/triggers")
set(triggers_content "activate-noawait ldconfig\n\n")
file(WRITE "${def_triggers}" "${triggers_content}")
#
# Functions helpful for packaging your modules with RPM cpack
#
#
# ov_rpm_copyright(<comp name>)
#
function(ov_rpm_copyright comp)
string(TOUPPER "${comp}" ucomp)
if(NOT DEFINED CPACK_RPM_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_RPM_${ucomp}_PACKAGE_NAME is not defined")
else()
set(package_name "${CPACK_RPM_${ucomp}_PACKAGE_NAME}")
endif()
set(package_name "${CPACK_RPM_${ucomp}_PACKAGE_NAME}")
# copyright
install(FILES "${OpenVINO_SOURCE_DIR}/cmake/developer_package/packaging/copyright"
DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/${package_name}/
COMPONENT ${comp})
endfunction()
#
# ov_rpm_add_rpmlint_suppression(<comp name> <suppression1, suppression2, ...>)
#
function(ov_rpm_add_rpmlint_suppression comp)
set(lines ${ARGN})
string(TOUPPER "${comp}" ucomp)
if(NOT DEFINED CPACK_RPM_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_RPM_${ucomp}_PACKAGE_NAME is not defined")
else()
set(package_name "${CPACK_RPM_${ucomp}_PACKAGE_NAME}")
endif()
foreach(line IN LISTS lines)
set(line "addFilter(\"${line}\")")
if(content)
set(content "${content}\n${line}")
else()
set(content "${line}")
endif()
endforeach()
if(DEFINED CPACK_RPM_${ucomp}_PACKAGE_ARCHITECTURE)
set(arch "${CPACK_RPM_${ucomp}_PACKAGE_ARCHITECTURE}")
elseif(X86_64)
set(arch "x86_64")
elseif(X86)
set(arch "i686")
else()
message(FATAL_ERROR "RPM: Unsupported architecture ${CMAKE_SYSTEM_PROCESSOR}")
endif()
set(package_file_name "${package_name}-${OpenVINO_VERSION}-1.${arch}.rpm")
set(rpmlint_override_file "${OpenVINO_BINARY_DIR}/_CPack_Packages/rpmlint/${package_file_name}.rpmlintrc")
file(REMOVE ${rpmlint_override_file})
file(WRITE ${rpmlint_override_file} ${content})
endfunction()
#
# ov_rpm_generate_conflicts(<comp name>)
#
function(ov_rpm_generate_conflicts comp)
set(cpack_name_versions ${ARGN})
string(TOUPPER "${comp}" ucomp)
# sanity check
if(NOT DEFINED CPACK_RPM_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_RPM_${ucomp}_PACKAGE_NAME is not defined")
else()
if(NOT DEFINED cpack_name_ver)
message(FATAL_ERROR "Internal variable 'cpack_name_ver' is not defined")
endif()
string(REPLACE "${cpack_name_ver}" "" package_name_base "${CPACK_RPM_${ucomp}_PACKAGE_NAME}")
endif()
foreach(cpack_name_version IN LISTS cpack_name_versions)
if(package_names)
set(package_names "${package_names}, ${package_name_base}${cpack_name_version}")
else()
set(package_names "${package_name_base}${cpack_name_version}")
endif()
endforeach()
set(CPACK_RPM_${ucomp}_PACKAGE_CONFLICTS "${package_names}" PARENT_SCOPE)
endfunction()
#
# ov_rpm_add_latest_component(<comp>)
#
# Adds latest component for `comp`, but without a version
# Description and other stuff (arch) is taken from the main component
#
macro(ov_rpm_add_latest_component comp)
string(TOUPPER "${comp}" ucomp)
set(comp_name "${comp}_latest")
set(upper_case "${ucomp}_LATEST")
set(CPACK_COMPONENT_${upper_case}_DESCRIPTION "${CPACK_COMPONENT_${ucomp}_DESCRIPTION}")
set(CPACK_COMPONENT_${upper_case}_DEPENDS "${comp}")
set(CPACK_RPM_${upper_case}_PACKAGE_ARCHITECTURE "noarch")
# take package name
if(DEFINED CPACK_RPM_${ucomp}_PACKAGE_NAME)
string(REPLACE "-${cpack_name_ver}" ""
CPACK_RPM_${upper_case}_PACKAGE_NAME
"${CPACK_RPM_${ucomp}_PACKAGE_NAME}")
else()
message(FATAL_ERROR "CPACK_RPM_${ucomp}_PACKAGE_NAME is not defined")
endif()
# add latest to a list of rpm packages
list(APPEND CPACK_COMPONENTS_ALL ${comp_name})
endmacro()

View File

@@ -1,36 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
find_program(rpmlint_PROGRAM NAMES rpmlint DOC "Path to rpmlint tool")
if(NOT rpmlint_PROGRAM)
message(WARNING "Failed to find 'rpmlint' tool, use 'sudo dnf / yum install rpmlint' to install it")
return()
endif()
set(rpmlint_passed ON)
foreach(rpm_file IN LISTS CPACK_PACKAGE_FILES)
get_filename_component(rpm_name "${rpm_file}" NAME)
get_filename_component(dir_name "${rpm_file}" DIRECTORY)
get_filename_component(dir_name "${dir_name}/../../../../rpmlint" ABSOLUTE)
set(rpmlint_overrides "${dir_name}/${rpm_name}.rpmlintrc")
if(EXISTS "${rpmlint_overrides}")
set(file_option --file "${rpmlint_overrides}")
endif()
execute_process(COMMAND "${rpmlint_PROGRAM}" ${file_option} ${rpm_file}
RESULT_VARIABLE rpmlint_exit_code
OUTPUT_VARIABLE rpmlint_output)
if(NOT rpmlint_exit_code EQUAL 0)
message("Package ${rpm_name}:")
message("${rpmlint_output}")
set(rpmlint_passed OFF)
endif()
endforeach()
if(NOT rpmlint_passed)
message(FATAL_ERROR "rpmlint has found some mistakes. You can get more info regarding issues on site https://fedoraproject.org/wiki/Common_Rpmlint_issues")
endif()

View File

@@ -36,8 +36,7 @@ IE_DEFINE_EXTENSION_CREATE_FUNCTION_DECLARATION(${_IE_CREATE_EXTENSION_FUNC});")
# definitions
set(dev_config "{")
if(${mapped_dev_name}_CONFIG)
string(REPLACE "@" ";" dev_config_parced "${${mapped_dev_name}_CONFIG}")
foreach(props IN LISTS dev_config_parced)
foreach(props IN LISTS ${mapped_dev_name}_CONFIG)
string(REPLACE ":" ";" props "${props}")
list(GET props 0 key)

View File

@@ -20,7 +20,6 @@ endif()
#
# ie_add_plugin(NAME <targetName>
# DEVICE_NAME <deviceName>
# [PSEUDO_DEVICE]
# [PSEUDO_PLUGIN_FOR <actual_device>]
# [AS_EXTENSION]
# [DEFAULT_CONFIG <key:value;...>]
@@ -33,7 +32,7 @@ endif()
# )
#
function(ie_add_plugin)
set(options SKIP_INSTALL PSEUDO_DEVICE ADD_CLANG_FORMAT AS_EXTENSION SKIP_REGISTRATION)
set(options SKIP_INSTALL ADD_CLANG_FORMAT AS_EXTENSION SKIP_REGISTRATION)
set(oneValueArgs NAME DEVICE_NAME VERSION_DEFINES_FOR PSEUDO_PLUGIN_FOR)
set(multiValueArgs DEFAULT_CONFIG SOURCES OBJECT_LIBRARIES CPPLINT_FILTERS)
cmake_parse_arguments(IE_PLUGIN "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@@ -80,7 +79,7 @@ function(ie_add_plugin)
endif()
ie_add_vs_version_file(NAME ${IE_PLUGIN_NAME}
FILEDESCRIPTION "OpenVINO Runtime ${IE_PLUGIN_DEVICE_NAME} device plugin library")
FILEDESCRIPTION "Inference Engine ${IE_PLUGIN_DEVICE_NAME} device plugin library")
target_link_libraries(${IE_PLUGIN_NAME} PRIVATE openvino::runtime openvino::runtime::dev)
@@ -104,12 +103,29 @@ function(ie_add_plugin)
endif()
add_dependencies(ov_plugins ${IE_PLUGIN_NAME})
if(TARGET openvino_gapi_preproc)
if(BUILD_SHARED_LIBS)
add_dependencies(${IE_PLUGIN_NAME} openvino_gapi_preproc)
else()
target_link_libraries(${IE_PLUGIN_NAME} PRIVATE openvino_gapi_preproc)
endif()
endif()
# fake dependencies to build in the following order:
# OV -> OV frontends -> OV inference plugins -> OV-based apps
# IE -> IE readers -> IE inference plugins -> IE-based apps
if(BUILD_SHARED_LIBS)
add_dependencies(${IE_PLUGIN_NAME} ov_frontends)
if(TARGET openvino_ir_frontend)
add_dependencies(${IE_PLUGIN_NAME} openvino_ir_frontend)
endif()
if(TARGET openvino_onnx_frontend)
add_dependencies(${IE_PLUGIN_NAME} openvino_onnx_frontend)
endif()
if(TARGET openvino_paddle_frontend)
add_dependencies(${IE_PLUGIN_NAME} openvino_paddle_frontend)
endif()
if(TARGET openvino_tensorflow_frontend)
add_dependencies(${IE_PLUGIN_NAME} openvino_tensorflow_frontend)
endif()
# TODO: remove with legacy CNNNLayer API / IR v7
if(TARGET inference_engine_ir_v7_reader)
add_dependencies(${IE_PLUGIN_NAME} inference_engine_ir_v7_reader)
@@ -119,22 +135,11 @@ function(ie_add_plugin)
# install rules
if(NOT IE_PLUGIN_SKIP_INSTALL OR NOT BUILD_SHARED_LIBS)
string(TOLOWER "${IE_PLUGIN_DEVICE_NAME}" install_component)
if(IE_PLUGIN_PSEUDO_DEVICE)
set(plugin_hidden HIDDEN)
endif()
ie_cpack_add_component(${install_component}
DISPLAY_NAME "${IE_PLUGIN_DEVICE_NAME} runtime"
DESCRIPTION "${IE_PLUGIN_DEVICE_NAME} runtime"
${plugin_hidden}
DEPENDS ${OV_CPACK_COMP_CORE})
ie_cpack_add_component(${install_component} REQUIRED DEPENDS core)
if(BUILD_SHARED_LIBS)
install(TARGETS ${IE_PLUGIN_NAME}
LIBRARY DESTINATION ${OV_CPACK_PLUGINSDIR}
COMPONENT ${install_component})
install(TARGETS ${IE_PLUGIN_NAME}
LIBRARY DESTINATION ${OV_CPACK_PLUGINSDIR}
LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH}
COMPONENT ${install_component})
else()
ov_install_static_lib(${IE_PLUGIN_NAME} ${install_component})
@@ -321,9 +326,7 @@ function(ie_generate_plugins_hpp)
# add default plugin config options
if(${device_name}_CONFIG)
# Replace ; to @ in order to have list inside list
string(REPLACE ";" "@" config "${${device_name}_CONFIG}")
list(APPEND device_configs -D "${device_name}_CONFIG=${config}")
list(APPEND device_configs -D "${device_name}_CONFIG=${${device_name}_CONFIG}")
endif()
endforeach()

View File

@@ -1,112 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
# ov_check_pip_package(REQUIREMENT <single requirement>
# RESULT_VAR <result var name>
# [WARNING_MESSAGE <message>]
# [MESSAGE_MODE <WARNING | FATAL_ERROR | TRACE>])
#
function(ov_check_pip_package)
find_host_package(PythonInterp 3 QUIET)
set(oneValueOptionalArgs
MESSAGE_MODE # Set the type of message: { FATAL_ERROR | WARNING | ... }
WARNING_MESSAGE # callback message
)
set(oneValueRequiredArgs
REQUIREMENT # Requirement-specifier to check
RESULT_VAR # Result varibale to set return code {ON | OFF}
)
set(multiValueArgs)
cmake_parse_arguments(ARG "" "${oneValueRequiredArgs};${oneValueOptionalArgs}" "${multiValueArgs}" ${ARGN})
foreach(argName ${oneValueRequiredArgs})
if (NOT ARG_${argName})
message(SEND_ERROR "Argument '${argName}' is required.")
endif()
endforeach()
if(NOT ARG_MESSAGE_MODE)
set(ARG_MESSAGE_MODE WARNING)
elseif(CMAKE_VERSION VERSION_LESS 3.15 AND ARG_MESSAGE_MODE STREQUAL "TRACE")
set(ARG_MESSAGE_MODE WARNING)
endif()
if(ARG_UNPARSED_ARGUMENTS)
message(SEND_ERROR "Unexpected parameters have passed to the function: ${ARG_UNPARSED_ARGUMENTS}")
endif()
# quote '3.x' with \'3.x\'
string(REPLACE "'" "\\'" REQ "${ARG_REQUIREMENT}")
if(PYTHONINTERP_FOUND)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "import pkg_resources ; pkg_resources.require('${REQ}')"
RESULT_VARIABLE EXIT_CODE
OUTPUT_VARIABLE OUTPUT_TEXT
ERROR_VARIABLE ERROR_TEXT)
endif()
if(NOT EXIT_CODE EQUAL 0)
set(${ARG_RESULT_VAR} OFF PARENT_SCOPE)
message(${ARG_MESSAGE_MODE} "Python module '${REQ}' is missed, ${ARG_WARNING_MESSAGE}")
else()
set(${ARG_RESULT_VAR} ON PARENT_SCOPE)
endif()
endfunction()
#
# ov_check_pip_packages(REQUIREMENTS_FILE <requirements.txt file>
# RESULT_VAR <result var name>
# [WARNING_MESSAGE <message>]
# [MESSAGE_MODE <WARNING | FATAL_ERROR | TRACE>])
#
function(ov_check_pip_packages)
find_host_package(PythonInterp 3 QUIET)
set(oneValueOptionalArgs
MESSAGE_MODE # Set the type of message: { FATAL_ERROR | WARNING | ... }
WARNING_MESSAGE # callback message
)
set(oneValueRequiredArgs
REQUIREMENTS_FILE # File with requirement-specifiers to check
RESULT_VAR # Result varibale to set return code {ON | OFF}
)
set(multiValueArgs)
cmake_parse_arguments(ARG "" "${oneValueOptionalArgs};${oneValueRequiredArgs}" "${multiValueArgs}" ${ARGN})
foreach(argName ${oneValueRequiredArgs})
if (NOT ARG_${argName})
message(SEND_ERROR "Argument '${argName}' is required.")
endif()
endforeach()
if(NOT ARG_MESSAGE_MODE)
set(ARG_MESSAGE_MODE WARNING)
elseif(CMAKE_VERSION VERSION_LESS 3.15 AND ARG_MESSAGE_MODE STREQUAL "TRACE")
set(ARG_MESSAGE_MODE WARNING)
endif()
if(ARG_UNPARSED_ARGUMENTS)
message(SEND_ERROR "Unexpected parameters have passed to the function: ${ARG_UNPARSED_ARGUMENTS}")
endif()
if(PYTHONINTERP_FOUND)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "import pkg_resources ; pkg_resources.require(open('${ARG_REQUIREMENTS_FILE}', mode='r'))"
RESULT_VARIABLE EXIT_CODE
OUTPUT_VARIABLE OUTPUT_TEXT
ERROR_VARIABLE ERROR_TEXT)
endif()
if(NOT EXIT_CODE EQUAL 0)
set(${ARG_RESULT_VAR} OFF PARENT_SCOPE)
message(${ARG_MESSAGE_MODE} "Python requirement file ${ARG_REQUIREMENTS_FILE} is not installed, ${ARG_WARNING_MESSAGE}")
else()
set(${ARG_RESULT_VAR} ON PARENT_SCOPE)
endif()
endfunction()

View File

@@ -6,17 +6,6 @@ include(CMakeParseArguments)
find_host_program(shellcheck_PROGRAM NAMES shellcheck DOC "Path to shellcheck tool")
if(shellcheck_PROGRAM)
execute_process(COMMAND "${shellcheck_PROGRAM}" --version
RESULT_VARIABLE shellcheck_EXIT_CODE
OUTPUT_VARIABLE shellcheck_VERSION_STRING)
if(shellcheck_EXIT_CODE EQUAL 0)
if(shellcheck_VERSION_STRING MATCHES "version: ([0-9]+)\.([0-9]+).([0-9]+)")
set(shellcheck_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}" CACHE INTERNAL "shellcheck version")
endif()
endif()
endif()
function(ie_shellcheck_process)
if(NOT shellcheck_PROGRAM)
message(WARNING "shellcheck tool is not found")
@@ -44,7 +33,7 @@ function(ie_shellcheck_process)
set(output_file "${output_file}.txt")
get_filename_component(script_name "${script}" NAME)
add_custom_command(OUTPUT ${output_file}
add_custom_command(OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND}
-D IE_SHELLCHECK_PROGRAM=${shellcheck_PROGRAM}
-D IE_SHELL_SCRIPT=${script}

View File

@@ -35,16 +35,6 @@ if(MSVC64 OR MINGW64)
_ie_process_msvc_generator_platform(X86_64)
elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
_ie_process_msvc_generator_platform(X86)
elseif(CMAKE_OSX_ARCHITECTURES AND APPLE)
if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
set(AARCH64 ON)
elseif(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(X86_64 ON)
elseif(CMAKE_OSX_ARCHITECTURES MATCHES ".*x86_64.*" AND CMAKE_OSX_ARCHITECTURES MATCHES ".*arm64.*")
set(UNIVERSAL2 ON)
else()
message(FATAL_ERROR "Unsupported value: CMAKE_OSX_ARCHITECTURES = ${CMAKE_OSX_ARCHITECTURES}")
endif()
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
set(X86_64 ON)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
@@ -55,30 +45,21 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
set(ARM ON)
endif()
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
set(HOST_X86_64 ON)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
set(HOST_X86 ON)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(arm64.*|aarch64.*|AARCH64.*)")
set(HOST_AARCH64 ON)
elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
set(HOST_ARM ON)
# in case of cross-compilation (or -m32) CMAKE_SYSTEM_PROCESSOR is equal to
# CMAKE_HOST_SYSTEM_PROCESSOR which is X86_64; patch this until a better solution
if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND X86_64)
unset(X86_64)
set(X86 ON)
endif()
if(UNIX AND NOT APPLE)
set(LINUX ON)
endif()
if(ENV{OECORE_NATIVE_SYSROOT} AND AARCH64)
set(YOCTO_AARCH64 ON)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
set(OV_COMPILER_IS_CLANG ON)
endif()
if(CMAKE_CXX_COMPILER MATCHES ".*conda.*")
set(OV_COMPILER_IS_CONDA ON)
else()
set(OV_COMPILER_IS_CLANG OFF)
endif()
get_property(OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)

View File

@@ -1,45 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if (NOT TBBROOT)
if(DEFINED ENV{TBBROOT})
set (TBBROOT $ENV{TBBROOT})
endif()
endif()
set(_tbb_root ${TBBROOT})
# detect version
find_file(_tbb_def_header tbb_stddef.h HINTS "${_tbb_root}/include/tbb")
if (_tbb_def_header)
file(READ "${_tbb_def_header}" _tbb_def_content)
string(REGEX MATCH "TBB_VERSION_MAJOR[ ]*[0-9]*" _tbb_version_major ${_tbb_def_content})
string(REGEX MATCH "[0-9][0-9]*" _tbb_version_major ${_tbb_version_major})
string(REGEX MATCH "TBB_VERSION_MINOR[ ]*[0-9]" _tbb_version_minor ${_tbb_def_content})
string(REGEX MATCH "[0-9][0-9]*" _tbb_version_minor ${_tbb_version_minor})
set(PACKAGE_VERSION_MAJOR ${_tbb_version_major})
set(PACKAGE_VERSION_MINOR ${_tbb_version_minor})
set(PACKAGE_VERSION_PATCH 0)
else()
set(PACKAGE_VERSION_MAJOR 0)
set(PACKAGE_VERSION_MINOR 0)
set(PACKAGE_VERSION_PATCH 0)
endif()
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
set(PACKAGE_VERSION_EXACT False)
set(PACKAGE_VERSION_COMPATIBLE False)
if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT True)
set(PACKAGE_VERSION_COMPATIBLE True)
endif()
if(PACKAGE_FIND_VERSION_MAJOR VERSION_LESS_EQUAL PACKAGE_VERSION_MAJOR)
set(PACKAGE_VERSION_COMPATIBLE True)
endif()

View File

@@ -172,10 +172,6 @@ if (NOT _lib_exists AND TBB_FIND_REQUIRED AND TBB_FIND_REQUIRED_${_tbb_component
message(FATAL_ERROR "Missed required Intel TBB component: ${_tbb_component}")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TBB
REQUIRED_VARS _lib_exists)
unset(_tbb_x32_subdir)
unset(_tbb_x64_subdir)
unset(_tbb_arch_subdir)

View File

@@ -1,45 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if (NOT TBBROOT)
if(DEFINED ENV{TBBROOT})
set (TBBROOT $ENV{TBBROOT})
endif()
endif()
set(_tbb_root ${TBBROOT})
# detect version
find_file(_tbb_def_header tbb_stddef.h HINTS "${_tbb_root}/include/tbb")
if (_tbb_def_header)
file(READ "${_tbb_def_header}" _tbb_def_content)
string(REGEX MATCH "TBB_VERSION_MAJOR[ ]*[0-9]*" _tbb_version_major ${_tbb_def_content})
string(REGEX MATCH "[0-9][0-9]*" _tbb_version_major ${_tbb_version_major})
string(REGEX MATCH "TBB_VERSION_MINOR[ ]*[0-9]" _tbb_version_minor ${_tbb_def_content})
string(REGEX MATCH "[0-9][0-9]*" _tbb_version_minor ${_tbb_version_minor})
set(PACKAGE_VERSION_MAJOR ${_tbb_version_major})
set(PACKAGE_VERSION_MINOR ${_tbb_version_minor})
set(PACKAGE_VERSION_PATCH 0)
else()
set(PACKAGE_VERSION_MAJOR 0)
set(PACKAGE_VERSION_MINOR 0)
set(PACKAGE_VERSION_PATCH 0)
endif()
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
set(PACKAGE_VERSION_EXACT False)
set(PACKAGE_VERSION_COMPATIBLE False)
if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT True)
set(PACKAGE_VERSION_COMPATIBLE True)
endif()
if(PACKAGE_FIND_VERSION_MAJOR VERSION_LESS_EQUAL PACKAGE_VERSION_MAJOR)
set(PACKAGE_VERSION_COMPATIBLE True)
endif()

View File

@@ -91,10 +91,6 @@ foreach (_tbb_component ${TBB_FIND_COMPONENTS})
endif()
endforeach()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TBB
REQUIRED_VARS TBB_tbb_FOUND)
unset(_tbb_x32_subdir)
unset(_tbb_x64_subdir)
unset(_tbb_arch_subdir)

View File

@@ -1,45 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if (NOT TBBROOT)
if(DEFINED ENV{TBBROOT})
set (TBBROOT $ENV{TBBROOT})
endif()
endif()
set(_tbb_root ${TBBROOT})
# detect version
find_file(_tbb_def_header tbb_stddef.h HINTS "${_tbb_root}/include/tbb")
if (_tbb_def_header)
file(READ "${_tbb_def_header}" _tbb_def_content)
string(REGEX MATCH "TBB_VERSION_MAJOR[ ]*[0-9]*" _tbb_version_major ${_tbb_def_content})
string(REGEX MATCH "[0-9][0-9]*" _tbb_version_major ${_tbb_version_major})
string(REGEX MATCH "TBB_VERSION_MINOR[ ]*[0-9]" _tbb_version_minor ${_tbb_def_content})
string(REGEX MATCH "[0-9][0-9]*" _tbb_version_minor ${_tbb_version_minor})
set(PACKAGE_VERSION_MAJOR ${_tbb_version_major})
set(PACKAGE_VERSION_MINOR ${_tbb_version_minor})
set(PACKAGE_VERSION_PATCH 0)
else()
set(PACKAGE_VERSION_MAJOR 0)
set(PACKAGE_VERSION_MINOR 0)
set(PACKAGE_VERSION_PATCH 0)
endif()
set(PACKAGE_VERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}")
set(PACKAGE_VERSION_EXACT False)
set(PACKAGE_VERSION_COMPATIBLE False)
if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT True)
set(PACKAGE_VERSION_COMPATIBLE True)
endif()
if(PACKAGE_FIND_VERSION_MAJOR VERSION_LESS_EQUAL PACKAGE_VERSION_MAJOR)
set(PACKAGE_VERSION_COMPATIBLE True)
endif()

View File

@@ -117,10 +117,6 @@ foreach (_tbb_component ${TBB_FIND_COMPONENTS})
endif()
endforeach()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TBB
REQUIRED_VARS TBB_tbb_FOUND)
unset(_tbb_x32_subdir)
unset(_tbb_x64_subdir)
unset(_tbb_arch_subdir)

View File

@@ -19,7 +19,7 @@ function (commitHash VAR)
message(FATAL_ERROR "repo_root is not defined")
endif()
execute_process(
COMMAND git rev-parse --short=11 HEAD
COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${repo_root}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -28,19 +28,13 @@ endfunction()
macro(ov_parse_ci_build_number)
set(OpenVINO_VERSION_BUILD 000)
set(IE_VERSION_BUILD ${OpenVINO_VERSION_BUILD})
if(CI_BUILD_NUMBER MATCHES "^([0-9]+)\.([0-9]+)\.([0-9]+)\-([0-9]+)\-.*")
set(OpenVINO_VERSION_MAJOR ${CMAKE_MATCH_1})
set(OpenVINO_VERSION_MINOR ${CMAKE_MATCH_2})
set(OpenVINO_VERSION_PATCH ${CMAKE_MATCH_3})
set(OpenVINO_VERSION_BUILD ${CMAKE_MATCH_4})
set(the_whole_version_is_defined_by_ci ON)
elseif(CI_BUILD_NUMBER MATCHES "^[0-9]+$")
set(OpenVINO_VERSION_BUILD ${CI_BUILD_NUMBER})
# only build number is defined by CI
set(the_whole_version_is_defined_by_ci OFF)
elseif(CI_BUILD_NUMBER)
message(FATAL_ERROR "Failed to parse CI_BUILD_NUMBER which is ${CI_BUILD_NUMBER}")
endif()
if(NOT DEFINED repo_root)
@@ -99,42 +93,23 @@ macro(ov_parse_ci_build_number)
endforeach()
endif()
set(OpenVINO_SOVERSION "${OpenVINO_VERSION_MAJOR}${OpenVINO_VERSION_MINOR}${OpenVINO_VERSION_PATCH}")
string(REGEX REPLACE "^20" "" OpenVINO_SOVERSION "${OpenVINO_SOVERSION}")
set(OpenVINO_VERSION "${OpenVINO_VERSION_MAJOR}.${OpenVINO_VERSION_MINOR}.${OpenVINO_VERSION_PATCH}")
if(ENABLE_LIBRARY_VERSIONING)
set(OpenVINO_VERSION_SUFFIX ".${OpenVINO_SOVERSION}")
else()
set(OpenVINO_VERSION_SUFFIX "")
endif()
message(STATUS "OpenVINO version is ${OpenVINO_VERSION} (Build ${OpenVINO_VERSION_BUILD})")
if(NOT the_whole_version_is_defined_by_ci)
# create CI_BUILD_NUMBER
branchName(GIT_BRANCH)
commitHash(GIT_COMMIT_HASH)
if(NOT GIT_BRANCH STREQUAL "master")
set(GIT_BRANCH_POSTFIX "-${GIT_BRANCH}")
endif()
set(CI_BUILD_NUMBER "${OpenVINO_VERSION}-${OpenVINO_VERSION_BUILD}-${GIT_COMMIT_HASH}${GIT_BRANCH_POSTFIX}")
unset(GIT_BRANCH_POSTFIX)
unset(GIT_BRANCH)
unset(GIT_COMMIT_HASH)
else()
unset(the_whole_version_is_defined_by_ci)
endif()
endmacro()
if (DEFINED ENV{CI_BUILD_NUMBER})
set(CI_BUILD_NUMBER $ENV{CI_BUILD_NUMBER})
else()
branchName(GIT_BRANCH)
commitHash(GIT_COMMIT_HASH)
set(custom_build "custom_${GIT_BRANCH}_${GIT_COMMIT_HASH}")
set(CI_BUILD_NUMBER "${custom_build}")
endif()
# provides OpenVINO version
# 1. If CI_BUILD_NUMBER is defined, parses this information
# 2. Otherwise, parses openvino/core/version.hpp
if (DEFINED ENV{CI_BUILD_NUMBER})
set(CI_BUILD_NUMBER $ENV{CI_BUILD_NUMBER})
endif()
ov_parse_ci_build_number()
macro (addVersionDefines FILE)
@@ -156,15 +131,3 @@ macro (addVersionDefines FILE)
endforeach()
unset(__version_file)
endmacro()
function(ov_add_library_version library)
if(NOT DEFINED OpenVINO_SOVERSION)
message(FATAL_ERROR "Internal error: OpenVINO_SOVERSION is not defined")
endif()
if(ENABLE_LIBRARY_VERSIONING)
set_target_properties(${library} PROPERTIES
SOVERSION ${OpenVINO_SOVERSION}
VERSION ${OpenVINO_VERSION})
endif()
endfunction()

View File

@@ -35,15 +35,13 @@ function(ov_generate_dev_package_config)
find_package(OpenCV QUIET)
foreach(component IN LISTS openvino_export_components)
# TODO: remove legacy targets from tests
# string(FIND "${component}" "_legacy" index)
# if(index EQUAL -1)
# export all targets with prefix and use them during extra modules build
export(TARGETS ${${component}} NAMESPACE openvino::
APPEND FILE "${CMAKE_BINARY_DIR}/ov_${component}_dev_targets.cmake")
list(APPEND all_dev_targets ${${component}})
# endif()
string(FIND "${component}" "_legacy" index)
if(index EQUAL -1)
# export all targets with prefix and use them during extra modules build
export(TARGETS ${${component}} NAMESPACE openvino::
APPEND FILE "${CMAKE_BINARY_DIR}/ov_${component}_dev_targets.cmake")
list(APPEND all_dev_targets ${${component}})
endif()
endforeach()
add_custom_target(ov_dev_targets DEPENDS ${all_dev_targets})
@@ -72,9 +70,8 @@ function(register_extra_modules)
openvino_developer_export_targets(COMPONENT core_legacy TARGETS inference_engine)
openvino_developer_export_targets(COMPONENT core_legacy TARGETS ngraph)
set(InferenceEngineDeveloperPackage_DIR "${CMAKE_CURRENT_BINARY_DIR}/build-modules")
set(OpenVINODeveloperPackage_DIR "${CMAKE_BINARY_DIR}/build-modules")
set(OpenVINO_DIR "${CMAKE_BINARY_DIR}")
set(InferenceEngineDeveloperPackage_DIR "${CMAKE_CURRENT_BINARY_DIR}/runtime")
set(OpenVINODeveloperPackage_DIR "${CMAKE_BINARY_DIR}/runtime")
function(generate_fake_dev_package NS)
if(NS STREQUAL "openvino")
@@ -89,9 +86,7 @@ function(register_extra_modules)
foreach(target IN LISTS ${openvino_export_components})
if(target)
file(APPEND "${devconfig_file}" "if(NOT TARGET ${NS}::${target})
add_library(${NS}::${target} ALIAS ${target})
endif()\n")
file(APPEND "${devconfig_file}" "add_library(${NS}::${target} ALIAS ${target})\n")
endif()
endforeach()
endfunction()
@@ -99,10 +94,16 @@ endif()\n")
generate_fake_dev_package("openvino")
generate_fake_dev_package("IE")
# detect where OPENVINO_EXTRA_MODULES contains folders with CMakeLists.txt
# automatically import plugins from the 'runtime/plugins' folder
file(GLOB local_extra_modules "runtime/plugins/*")
# add template plugin
if(ENABLE_TEMPLATE)
list(APPEND local_extra_modules "${OpenVINO_SOURCE_DIR}/docs/template_plugin")
endif()
# detect where IE_EXTRA_MODULES contains folders with CMakeLists.txt
# other folders are supposed to have sub-folders with CMakeLists.txt
foreach(module_path IN LISTS OPENVINO_EXTRA_MODULES IE_EXTRA_MODULES)
get_filename_component(module_path "${module_path}" ABSOLUTE)
foreach(module_path IN LISTS IE_EXTRA_MODULES)
if(EXISTS "${module_path}/CMakeLists.txt")
list(APPEND extra_modules "${module_path}")
elseif(module_path)
@@ -110,14 +111,8 @@ endif()\n")
endif()
endforeach()
# add template plugin
if(ENABLE_TEMPLATE)
list(APPEND extra_modules "${OpenVINO_SOURCE_DIR}/src/plugins/template")
endif()
list(APPEND extra_modules "${OpenVINO_SOURCE_DIR}/src/core/template_extension")
# add each extra module
foreach(module_path IN LISTS extra_modules)
foreach(module_path IN LISTS extra_modules local_extra_modules)
if(module_path)
get_filename_component(module_name "${module_path}" NAME)
set(build_module ON)

View File

@@ -24,7 +24,7 @@ else()
set(ENABLE_ONEDNN_FOR_GPU_DEFAULT ON)
endif()
ie_option (ENABLE_ONEDNN_FOR_GPU "Enable oneDNN with GPU support" ${ENABLE_ONEDNN_FOR_GPU_DEFAULT})
ie_dependent_option (ENABLE_ONEDNN_FOR_GPU "Enable oneDNN with GPU support" ON "ENABLE_ONEDNN_FOR_GPU_DEFAULT" OFF)
ie_option (ENABLE_PROFILING_ITT "Build with ITT tracing. Optionally configure pre-built ittnotify library though INTEL_VTUNE_DIR variable." OFF)
@@ -41,26 +41,38 @@ In case SELECTIVE_BUILD is enabled, the SELECTIVE_BUILD_STAT variable should con
Usage: -DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=/path/*.csv" OFF
ALLOWED_VALUES ON OFF COLLECT)
ie_option(ENABLE_ERROR_HIGHLIGHT "Highlight errors and warnings during compile time" ON)
ie_option(ENABLE_ERROR_HIGHLIGHT "Highlight errors and warnings during compile time" OFF)
ie_option (ENABLE_DOCS "Build docs using Doxygen" OFF)
# Try to find python3
find_package(PythonLibs 3 QUIET)
ie_dependent_option (ENABLE_PYTHON "enables ie python bridge build" OFF "PYTHONLIBS_FOUND" OFF)
find_package(PkgConfig QUIET)
ie_dependent_option (ENABLE_PKGCONFIG_GEN "Enable openvino.pc pkg-config file generation" ON "LINUX OR APPLE;PkgConfig_FOUND;BUILD_SHARED_LIBS" OFF)
find_package(PythonInterp 3 QUIET)
ie_dependent_option (ENABLE_DOCS "Build docs using Doxygen" OFF "PYTHONINTERP_FOUND" OFF)
# this option should not be a part of InferenceEngineDeveloperPackage
# since wheels can be built only together with main OV build
cmake_dependent_option (ENABLE_WHEEL "Build wheel packages for PyPi" OFF
"PYTHONINTERP_FOUND;CMAKE_SOURCE_DIR STREQUAL OpenVINO_SOURCE_DIR" OFF)
#
# Inference Engine specific options
#
# "OneDNN library based on OMP or TBB or Sequential implementation: TBB|OMP|SEQ"
set(THREADING "TBB" CACHE STRING "Threading")
if(X86 OR ARM OR (MSVC AND (ARM OR AARCH64)) )
set(THREADING_DEFAULT "SEQ")
else()
set(THREADING_DEFAULT "TBB")
endif()
set(THREADING "${THREADING_DEFAULT}" CACHE STRING "Threading")
set_property(CACHE THREADING PROPERTY STRINGS "TBB" "TBB_AUTO" "OMP" "SEQ")
list (APPEND IE_OPTIONS THREADING)
if (NOT THREADING STREQUAL "TBB" AND
NOT THREADING STREQUAL "TBB_AUTO" AND
NOT THREADING STREQUAL "OMP" AND
NOT THREADING STREQUAL "SEQ")
message(FATAL_ERROR "THREADING should be set to TBB (default), TBB_AUTO, OMP or SEQ")
message(FATAL_ERROR "THREADING should be set to TBB, TBB_AUTO, OMP or SEQ. Default option is ${THREADING_DEFAULT}")
endif()
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND
@@ -96,13 +108,7 @@ ie_option (ENABLE_TEMPLATE "Enable template plugin" ON)
ie_dependent_option (ENABLE_INTEL_MYRIAD_COMMON "common part of myriad plugin" ON "NOT WINDOWS_PHONE;NOT WINDOWS_STORE" OFF)
if(UNIVERSAL2)
set(ENABLE_INTEL_MYRIAD_DEFAULT OFF)
else()
set(ENABLE_INTEL_MYRIAD_DEFAULT ON)
endif()
ie_dependent_option (ENABLE_INTEL_MYRIAD "myriad targeted plugin for inference engine" ${ENABLE_INTEL_MYRIAD_DEFAULT} "ENABLE_INTEL_MYRIAD_COMMON" OFF)
ie_dependent_option (ENABLE_INTEL_MYRIAD "myriad targeted plugin for inference engine" ON "ENABLE_INTEL_MYRIAD_COMMON" OFF)
ie_dependent_option (ENABLE_MYRIAD_NO_BOOT "myriad plugin will skip device boot" OFF "ENABLE_INTEL_MYRIAD" OFF)
@@ -114,42 +120,32 @@ ie_dependent_option (ENABLE_MYRIAD_MVNC_TESTS "functional and behavior tests for
ie_dependent_option (ENABLE_DATA "fetch models from testdata repo" ON "ENABLE_FUNCTIONAL_TESTS;NOT ANDROID" OFF)
ie_dependent_option (ENABLE_BEH_TESTS "tests oriented to check inference engine API correctness" ON "ENABLE_TESTS" OFF)
ie_dependent_option (ENABLE_BEH_TESTS "tests oriented to check inference engine API corecteness" ON "ENABLE_TESTS" OFF)
ie_dependent_option (ENABLE_FUNCTIONAL_TESTS "functional tests" ON "ENABLE_TESTS" OFF)
ie_option (ENABLE_SAMPLES "console samples are part of inference engine package" ON)
ie_dependent_option (ENABLE_SAMPLES "console samples are part of inference engine package" ON "NOT MINGW" OFF)
ie_option (ENABLE_OPENCV "enables custom OpenCV download" OFF)
ie_option (ENABLE_OPENCV "enables OpenCV" ON)
ie_option (ENABLE_V7_SERIALIZE "enables serialization to IR v7" OFF)
set(OPENVINO_EXTRA_MODULES "" CACHE STRING "Extra paths for extra modules to include into OpenVINO build")
set(IE_EXTRA_MODULES "" CACHE STRING "Extra paths for extra modules to include into OpenVINO build")
ie_dependent_option(ENABLE_TBB_RELEASE_ONLY "Only Release TBB libraries are linked to the Inference Engine binaries" ON "THREADING MATCHES TBB;LINUX" OFF)
if(LINUX)
# Debian packages are enabled on Ubuntu systems
# so, system TBB / pugixml can be tried for usage
set(ENABLE_SYSTEM_LIBS_DEFAULT ON)
else()
set(ENABLE_SYSTEM_LIBS_DEFAULT OFF)
endif()
ie_dependent_option (ENABLE_SYSTEM_PUGIXML "use the system copy of pugixml" OFF "BUILD_SHARED_LIBS" OFF)
if(APPLE AND AARCH64)
get_linux_name(LINUX_OS_NAME)
if(LINUX_OS_NAME MATCHES "^Ubuntu [0-9]+\.[0-9]+$" AND NOT DEFINED ENV{TBBROOT})
# Debian packages are enabled on Ubuntu systems
# so, system TBB can be tried for usage
set(ENABLE_SYSTEM_TBB_DEFAULT ON)
else()
set(ENABLE_SYSTEM_TBB_DEFAULT ${ENABLE_SYSTEM_LIBS_DEFAULT})
endif()
if(DEFINED ENV{TBBROOT} OR DEFINED ENV{TBB_DIR} OR DEFINED TBB_DIR OR DEFINED TBBROOT)
set(ENABLE_SYSTEM_TBB_DEFAULT OFF)
endif()
# for static libraries case libpugixml.a must be compiled with -fPIC
ie_dependent_option (ENABLE_SYSTEM_PUGIXML "use the system copy of pugixml" ${ENABLE_SYSTEM_LIBS_DEFAULT} "BUILD_SHARED_LIBS" OFF)
ie_dependent_option (ENABLE_SYSTEM_TBB "use the system version of TBB" ${ENABLE_SYSTEM_TBB_DEFAULT} "THREADING MATCHES TBB" OFF)
ie_dependent_option (ENABLE_SYSTEM_TBB "use the system version of TBB" ${ENABLE_SYSTEM_TBB_DEFAULT} "THREADING MATCHES TBB;LINUX" OFF)
ie_option (ENABLE_DEBUG_CAPS "enable OpenVINO debug capabilities at runtime" OFF)
@@ -163,17 +159,17 @@ else()
set(protoc_available ON)
endif()
find_host_package(PythonInterp 3 QUIET)
ie_option(ENABLE_OV_ONNX_FRONTEND "Enable ONNX FrontEnd" ${PYTHONINTERP_FOUND})
ie_option(ENABLE_OV_PADDLE_FRONTEND "Enable PaddlePaddle FrontEnd" ON)
ie_dependent_option(ENABLE_OV_ONNX_FRONTEND "Enable ONNX FrontEnd" ON "protoc_available" OFF)
ie_dependent_option(ENABLE_OV_PADDLE_FRONTEND "Enable PaddlePaddle FrontEnd" ON "protoc_available" OFF)
ie_option(ENABLE_OV_IR_FRONTEND "Enable IR FrontEnd" ON)
ie_option(ENABLE_OV_TF_FRONTEND "Enable TensorFlow FrontEnd" ON)
ie_dependent_option(ENABLE_OV_TF_FRONTEND "Enable TensorFlow FrontEnd" ON "protoc_available" OFF)
ie_dependent_option(ENABLE_SYSTEM_PROTOBUF "Use system protobuf" OFF
"ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_TF_FRONTEND;BUILD_SHARED_LIBS" OFF)
ie_dependent_option(ENABLE_OV_CORE_UNIT_TESTS "Enables OpenVINO core unit tests" ON "ENABLE_TESTS" OFF)
ie_dependent_option(ENABLE_OV_CORE_UNIT_TESTS "Enables OpenVINO core unit tests" ON "ENABLE_TESTS;NOT ANDROID" OFF)
ie_dependent_option(ENABLE_OV_CORE_BACKEND_UNIT_TESTS "Control the building of unit tests using backends" ON
"ENABLE_OV_CORE_UNIT_TESTS" OFF)
ie_option(ENABLE_OPENVINO_DEBUG "Enable output for OPENVINO_DEBUG statements" OFF)
ie_dependent_option(ENABLE_REQUIREMENTS_INSTALL "Dynamic dependencies install" ON "ENABLE_TESTS;NOT CMAKE_CROSSCOMPILING" OFF)
ie_option(ENABLE_REQUIREMENTS_INSTALL "Dynamic dependencies install" ON)
if(NOT BUILD_SHARED_LIBS AND ENABLE_OV_TF_FRONTEND)
set(FORCE_FRONTENDS_USE_PROTOBUF ON)
@@ -181,6 +177,9 @@ else()
set(FORCE_FRONTENDS_USE_PROTOBUF OFF)
endif()
# WA for ngraph python build on Windows debug
list(REMOVE_ITEM IE_OPTIONS ENABLE_OV_CORE_UNIT_TESTS ENABLE_OV_CORE_BACKEND_UNIT_TESTS)
#
# Process featues
#

View File

@@ -1,40 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
# OpenVINO Core components including frontends, plugins, etc
#
macro(ov_cpack_settings)
# fill a list of components which are part of conda
set(cpack_components_all ${CPACK_COMPONENTS_ALL})
unset(CPACK_COMPONENTS_ALL)
foreach(item IN LISTS cpack_components_all)
# filter out some components, which are not needed to be wrapped to conda-forge
if(# python wheels are not needed to be wrapped by conda | brew packages
NOT item STREQUAL OV_CPACK_COMP_PYTHON_WHEELS AND
# skip C / C++ / Python samples
NOT item STREQUAL OV_CPACK_COMP_CPP_SAMPLES AND
NOT item STREQUAL OV_CPACK_COMP_C_SAMPLES AND
NOT item STREQUAL OV_CPACK_COMP_PYTHON_SAMPLES AND
# even for case of system TBB we have installation rules for wheels packages
# so, need to skip this explicitly since they are installed in `host` section
NOT item MATCHES "^tbb(_dev)?$" AND
# the same for pugixml
NOT item STREQUAL "pugixml" AND
# TF component is not released
NOT item STREQUAL "tensorflow" AND
# we have `license_file` field in conda meta.yml
NOT item STREQUAL OV_CPACK_COMP_LICENSING AND
# not appropriate components
NOT item STREQUAL OV_CPACK_COMP_DEPLOYMENT_MANAGER AND
NOT item STREQUAL OV_CPACK_COMP_INSTALL_DEPENDENCIES AND
NOT item STREQUAL OV_CPACK_COMP_SETUPVARS)
list(APPEND CPACK_COMPONENTS_ALL ${item})
endif()
endforeach()
list(REMOVE_DUPLICATES CPACK_COMPONENTS_ALL)
# override generator
set(CPACK_GENERATOR "TGZ")
endmacro()

View File

@@ -1,390 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
# OpenVINO Core components including frontends, plugins, etc
#
function(_ov_add_plugin comp is_pseudo)
string(TOUPPER "${comp}" ucomp)
if(NOT DEFINED CPACK_DEBIAN_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_DEBIAN_${ucomp}_PACKAGE_NAME is not defined")
else()
set(package_name "${CPACK_DEBIAN_${ucomp}_PACKAGE_NAME}")
endif()
if(NOT DEFINED cpack_full_ver)
message(FATAL_ERROR "Internal variable 'cpack_full_ver' is not defined")
endif()
if(is_pseudo)
if(pseudo_plugins_recommends)
set(pseudo_plugins_recommends "${pseudo_plugins_recommends}, ${package_name} (= ${cpack_full_ver})")
else()
set(pseudo_plugins_recommends "${package_name} (= ${cpack_full_ver})")
endif()
endif()
if(all_plugins_suggest)
set(all_plugins_suggest "${all_plugins_suggest}, ${package_name} (= ${cpack_full_ver})")
else()
set(all_plugins_suggest "${package_name} (= ${cpack_full_ver})")
endif()
list(APPEND installed_plugins ${comp})
set(pseudo_plugins_recommends "${pseudo_plugins_recommends}" PARENT_SCOPE)
set(all_plugins_suggest "${all_plugins_suggest}" PARENT_SCOPE)
set(installed_plugins "${installed_plugins}" PARENT_SCOPE)
endfunction()
macro(ov_cpack_settings)
# fill a list of components which are part of debian
set(cpack_components_all ${CPACK_COMPONENTS_ALL})
unset(CPACK_COMPONENTS_ALL)
foreach(item IN LISTS cpack_components_all)
# filter out some components, which are not needed to be wrapped to .deb package
if(# skip OpenVINO Pyhon API and samples
NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO}_python.*" AND
NOT item STREQUAL OV_CPACK_COMP_PYTHON_SAMPLES AND
# python wheels are not needed to be wrapped by debian packages
NOT item STREQUAL OV_CPACK_COMP_PYTHON_WHEELS AND
# see ticket # 82605
NOT item STREQUAL "gna" AND
# even for case of system TBB we have installation rules for wheels packages
# so, need to skip this explicitly
NOT item MATCHES "^tbb(_dev)?$" AND
# the same for pugixml
NOT item STREQUAL "pugixml" AND
# TF component is not released
NOT item STREQUAL "tensorflow" AND
# we have copyright file for debian package
NOT item STREQUAL OV_CPACK_COMP_LICENSING AND
# not appropriate components
NOT item STREQUAL OV_CPACK_COMP_DEPLOYMENT_MANAGER AND
NOT item STREQUAL OV_CPACK_COMP_INSTALL_DEPENDENCIES AND
NOT item STREQUAL OV_CPACK_COMP_SETUPVARS)
list(APPEND CPACK_COMPONENTS_ALL ${item})
endif()
endforeach()
list(REMOVE_DUPLICATES CPACK_COMPONENTS_ALL)
# version with 3 components
set(cpack_name_ver "${OpenVINO_VERSION}")
# full version with epoch and release components
set(cpack_full_ver "${CPACK_PACKAGE_VERSION}")
# take release version into account
if(DEFINED CPACK_DEBIAN_PACKAGE_RELEASE)
set(cpack_full_ver "${cpack_full_ver}-${CPACK_DEBIAN_PACKAGE_RELEASE}")
endif()
# take epoch version into account
if(DEFINED CPACK_DEBIAN_PACKAGE_EPOCH)
set(cpack_full_ver "${CPACK_DEBIAN_PACKAGE_EPOCH}:${cpack_full_ver}")
endif()
# a list of conflicting package versions
set(conflicting_versions
# 2022 release series
# - 2022.1.0 is the last public release with debian packages from Intel install team
# - 2022.1.1, 2022.2 do not have debian packages enabled, distributed only as archives
# - 2022.3 is the first release where RPM updated packages are introduced
2022.1.0)
#
# core: base dependency for each component
#
# core
set(CPACK_COMPONENT_CORE_DESCRIPTION "OpenVINO C / C++ Runtime libraries")
set(CPACK_DEBIAN_CORE_PACKAGE_NAME "libopenvino-${cpack_name_ver}")
# we need triggers to run ldconfig for openvino
set(CPACK_DEBIAN_CORE_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}")
ov_debian_add_lintian_suppression("${OV_CPACK_COMP_CORE}"
# package-name-doesnt-match-sonames libopenvino202230 libopenvino-c20223
"package-name-doesnt-match-sonames")
#
# Plugins
#
# hetero
if(ENABLE_HETERO)
set(CPACK_COMPONENT_HETERO_DESCRIPTION "OpenVINO Hetero plugin")
set(CPACK_COMPONENT_HETERO_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_HETERO_PACKAGE_NAME "libopenvino-hetero-plugin-${cpack_name_ver}")
set(CPACK_DEBIAN_HETERO_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}")
_ov_add_plugin(hetero ON)
endif()
# auto batch
if(ENABLE_AUTO_BATCH)
set(CPACK_COMPONENT_BATCH_DESCRIPTION "OpenVINO Automatic Batching plugin")
set(CPACK_COMPONENT_BATCH_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_BATCH_PACKAGE_NAME "libopenvino-auto-batch-plugin-${cpack_name_ver}")
set(CPACK_DEBIAN_BATCH_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}")
_ov_add_plugin(batch ON)
endif()
# multi / auto plugins
if(ENABLE_MULTI)
if(ENABLE_AUTO)
set(CPACK_COMPONENT_MULTI_DESCRIPTION "OpenVINO Auto / Multi plugin")
else()
set(CPACK_COMPONENT_MULTI_DESCRIPTION "OpenVINO Multi plugin")
endif()
set(CPACK_COMPONENT_MULTI_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_MULTI_PACKAGE_NAME "libopenvino-auto-plugin-${cpack_name_ver}")
set(CPACK_DEBIAN_MULTI_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}")
_ov_add_plugin(multi ON)
elseif(ENABLE_AUTO)
set(CPACK_COMPONENT_AUTO_DESCRIPTION "OpenVINO Auto plugin")
set(CPACK_COMPONENT_AUTO_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_AUTO_PACKAGE_NAME "libopenvino-auto-plugin-${cpack_name_ver}")
set(CPACK_DEBIAN_AUTO_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}")
_ov_add_plugin(auto ON)
endif()
# intel-cpu
if(ENABLE_INTEL_CPU OR DEFINED openvino_arm_cpu_plugin_SOURCE_DIR)
if(ENABLE_INTEL_CPU)
set(CPACK_COMPONENT_CPU_DESCRIPTION "Intel® CPU plugin")
else()
set(CPACK_COMPONENT_CPU_DESCRIPTION "ARM CPU")
endif()
set(CPACK_COMPONENT_CPU_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_CPU_PACKAGE_NAME "libopenvino-intel-cpu-plugin-${cpack_name_ver}")
set(CPACK_DEBIAN_CPU_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}")
_ov_add_plugin(cpu OFF)
endif()
# intel-gpu
if(ENABLE_INTEL_GPU)
set(CPACK_COMPONENT_GPU_DESCRIPTION "Intel® Processor Graphics plugin")
set(CPACK_COMPONENT_GPU_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_GPU_PACKAGE_NAME "libopenvino-intel-gpu-plugin-${cpack_name_ver}")
set(CPACK_DEBIAN_GPU_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}")
# auto batch exhances GPU
# set(CPACK_DEBIAN_BATCH_PACKAGE_ENHANCES "${CPACK_DEBIAN_GPU_PACKAGE_NAME} = (${cpack_full_ver})")
_ov_add_plugin(gpu OFF)
endif()
# intel-myriad
if(ENABLE_INTEL_MYRIAD)
set(CPACK_COMPONENT_MYRIAD_DESCRIPTION "Intel® Movidius™ VPU plugin")
set(CPACK_COMPONENT_MYRIAD_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_MYRIAD_PACKAGE_NAME "libopenvino-intel-vpu-plugin-${cpack_name_ver}")
set(CPACK_DEBIAN_MYRIAD_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}")
_ov_add_plugin(myriad OFF)
endif()
# intel-gna
if(ENABLE_INTEL_GNA AND "gna" IN_LIST CPACK_COMPONENTS_ALL)
set(CPACK_COMPONENT_GNA_DESCRIPTION "Intel® Gaussian Neural Accelerator")
set(CPACK_COMPONENT_GNA_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_GNA_PACKAGE_NAME "libopenvino-intel-gna-plugin-${cpack_name_ver}")
# since we have libgna.so we need to call ldconfig and have `def_triggers` here
set(CPACK_DEBIAN_GNA_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}")
ov_debian_add_lintian_suppression(gna
# package name matches libopenvino_intel_gna_plugin.so
# but lintian looks at libgna.so.2 since it's a versioned library
"package-name-doesnt-match-sonames")
_ov_add_plugin(gna OFF)
endif()
# # add pseudo plugins are recommended to core component
# if(pseudo_plugins_recommends)
# # see https://superuser.com/questions/70031/what-is-the-difference-between-recommended-and-suggested-packages-ubuntu.
# # we suppose that pseudo plugins are needed for core
# set(CPACK_DEBIAN_CORE_PACKAGE_RECOMMENDS "${pseudo_plugins_recommends}")
# endif()
#
# Frontends
#
if(ENABLE_OV_IR_FRONTEND)
set(CPACK_COMPONENT_IR_DESCRIPTION "OpenVINO IR Frontend")
set(CPACK_COMPONENT_IR_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_IR_PACKAGE_NAME "libopenvino-ir-frontend-${cpack_name_ver}")
set(CPACK_DEBIAN_IR_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}")
ov_debian_add_lintian_suppression(ir
# we have different package name strategy; it suggests libopenvino-ir-frontend202230
"package-name-doesnt-match-sonames"
# IR FE should not linked directly by end users
"package-must-activate-ldconfig-trigger")
list(APPEND frontends ir)
endif()
if(ENABLE_OV_ONNX_FRONTEND)
set(CPACK_COMPONENT_ONNX_DESCRIPTION "OpenVINO ONNX Frontend")
set(CPACK_COMPONENT_ONNX_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_ONNX_PACKAGE_NAME "libopenvino-onnx-frontend-${cpack_name_ver}")
# since we ONNX FE is linkable target, we need to call ldconfig (i.e. `def_triggers`)
set(CPACK_DEBIAN_ONNX_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}")
ov_debian_add_lintian_suppression(onnx
# we have different package name strategy; it suggests libopenvino-onnx-frontend202230
"package-name-doesnt-match-sonames")
list(APPEND frontends onnx)
endif()
if(ENABLE_OV_TF_FRONTEND AND "tensorflow" IN_LIST CPACK_COMPONENTS_ALL)
set(CPACK_COMPONENT_TENSORFLOW_DESCRIPTION "OpenVINO TensorFlow Frontend")
set(CPACK_COMPONENT_TENSORFLOW_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_TENSORFLOW_PACKAGE_NAME "libopenvino-tensorflow-frontend-${cpack_name_ver}")
# since we TF FE is linkable target, we need to call ldconfig (i.e. `def_triggers`)
set(CPACK_DEBIAN_TENSORFLOW_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}")
ov_debian_add_lintian_suppression(tensorflow
# we have different package name strategy; it suggests libopenvino-tensorflow-frontend202230
"package-name-doesnt-match-sonames")
list(APPEND frontends tensorflow)
endif()
if(ENABLE_OV_PADDLE_FRONTEND)
set(CPACK_COMPONENT_PADDLE_DESCRIPTION "OpenVINO Paddle Frontend")
set(CPACK_COMPONENT_PADDLE_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_DEBIAN_PADDLE_PACKAGE_NAME "libopenvino-paddle-frontend-${cpack_name_ver}")
# since we PADDLE FE is linkable target, we need to call ldconfig (i.e. `def_triggers`)
set(CPACK_DEBIAN_PADDLE_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm};${def_triggers}")
ov_debian_add_lintian_suppression(paddle
# we have different package name strategy; it suggests libopenvino-paddle-frontend202230
"package-name-doesnt-match-sonames")
list(APPEND frontends paddle)
endif()
#
# core_dev: depends on core and frontends (since frontends don't want to provide its own dev packages)
#
set(CPACK_COMPONENT_CORE_DEV_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit C / C++ Development files")
set(CPACK_COMPONENT_CORE_DEV_DEPENDS "${OV_CPACK_COMP_CORE};${frontends}")
set(CPACK_DEBIAN_CORE_DEV_PACKAGE_NAME "libopenvino-dev-${cpack_name_ver}")
# TODO: update once compile_tool is excluded from the package
# set(CPACK_DEBIAN_CORE_DEV_PACKAGE_ARCHITECTURE "all")
ov_debian_generate_conflicts("${OV_CPACK_COMP_CORE_DEV}" ${conflicting_versions})
ov_debian_add_lintian_suppression("${OV_CPACK_COMP_CORE_DEV}"
# CVS-79409: create man page for compile_tool
"binary-without-manpage")
#
# Python bindings
#
if(ENABLE_PYTHON)
ov_get_pyversion(pyversion)
set(python_component "${OV_CPACK_COMP_PYTHON_OPENVINO}_${pyversion}")
string(TOUPPER "${pyversion}" pyversion)
set(CPACK_COMPONENT_PYOPENVINO_${pyversion}_DESCRIPTION "OpenVINO Python bindings")
set(CPACK_COMPONENT_PYOPENVINO_${pyversion}_DEPENDS "${OV_CPACK_COMP_CORE}")
list(APPEND CPACK_COMPONENT_PYOPENVINO_${pyversion}_DEPENDS ${installed_plugins})
list(APPEND CPACK_COMPONENT_PYOPENVINO_${pyversion}_DEPENDS ${frontends})
set(CPACK_DEBIAN_PYOPENVINO_${pyversion}_PACKAGE_NAME "libopenvino-python-${cpack_name_ver}")
set(CPACK_DEBIAN_PYOPENVINO_${pyversion}_PACKAGE_CONTROL_EXTRA "${def_postinst};${def_postrm}")
set(CPACK_DEBIAN_PYOPENVINO_${pyversion}_PACKAGE_DEPENDS "python3")
# TODO: fix all the warnings
ov_debian_add_lintian_suppression(${python_component}
# usr/lib/python3/dist-packages/requirements.txt
"unknown-file-in-python-module-directory"
# usr/lib/python3/dist-packages/openvino/inference_engine/__init__.py
"executable-not-elf-or-script"
# all directories
"non-standard-dir-perm"
# all python files
"non-standard-file-perm")
endif()
#
# Samples
#
set(samples_build_deps "cmake, g++, gcc, libc6-dev, make")
set(samples_build_deps_suggest "libopencv-core-dev, libopencv-imgproc-dev, libopencv-imgcodecs-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}, ${all_plugins_suggest}")
set(CPACK_DEBIAN_SAMPLES_PACKAGE_DEPENDS "libgflags-dev, nlohmann-json3-dev, zlib1g-dev")
# can be skipped with --no-install-recommends
set(CPACK_DEBIAN_SAMPLES_PACKAGE_RECOMMENDS "${samples_build_deps}")
set(CPACK_DEBIAN_SAMPLES_PACKAGE_ARCHITECTURE "all")
# python_samples
if(ENABLE_PYTHON)
set(CPACK_COMPONENT_PYTHON_SAMPLES_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Python Samples")
set(CPACK_COMPONENT_PYTHON_SAMPLES_DEPENDS "${python_component}")
set(CPACK_DEBIAN_PYTHON_SAMPLES_PACKAGE_NAME "openvino-samples-python-${cpack_name_ver}")
set(CPACK_DEBIAN_PYTHON_SAMPLES_PACKAGE_DEPENDS "python3")
set(CPACK_DEBIAN_PYTHON_SAMPLES_PACKAGE_ARCHITECTURE "all")
endif()
#
# Add umbrella packages
#
# all libraries
set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Libraries")
if(installed_plugins)
set(CPACK_COMPONENT_LIBRARIES_DEPENDS "${installed_plugins}")
else()
set(CPACK_COMPONENT_LIBRARIES_DEPENDS "${OV_CPACK_COMP_CORE}")
endif()
set(CPACK_DEBIAN_LIBRARIES_PACKAGE_NAME "openvino-libraries-${cpack_name_ver}")
set(CPACK_DEBIAN_LIBRARIES_PACKAGE_ARCHITECTURE "all")
# all libraries-dev
set(CPACK_COMPONENT_LIBRARIES_DEV_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Libraries and Development files")
set(CPACK_COMPONENT_LIBRARIES_DEV_DEPENDS "${OV_CPACK_COMP_CORE_DEV};libraries")
set(CPACK_DEBIAN_LIBRARIES_DEV_PACKAGE_NAME "openvino-libraries-dev-${cpack_name_ver}")
set(CPACK_DEBIAN_LIBRARIES_DEV_PACKAGE_ARCHITECTURE "all")
ov_debian_generate_conflicts(libraries_dev ${conflicting_versions})
# all openvino
set(CPACK_COMPONENT_OPENVINO_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Libraries and Development files")
set(CPACK_COMPONENT_OPENVINO_DEPENDS "libraries_dev;${OV_CPACK_COMP_CPP_SAMPLES}")
set(CPACK_DEBIAN_OPENVINO_PACKAGE_NAME "openvino-${cpack_name_ver}")
set(CPACK_DEBIAN_OPENVINO_PACKAGE_ARCHITECTURE "all")
ov_debian_generate_conflicts(openvino ${conflicting_versions})
ov_debian_add_lintian_suppression(openvino
# reproduced only on ubu18
"description-starts-with-package-name")
list(APPEND CPACK_COMPONENTS_ALL "libraries;libraries_dev;openvino")
#
# Install latest symlink packages
#
# NOTE: we expicitly don't add runtime latest packages
# since a user needs to depend on specific VERSIONED runtime package
# with fixed SONAMEs, while latest package can be updated multiple times
# ov_debian_add_latest_component(libraries)
ov_debian_add_latest_component(libraries_dev)
ov_debian_add_latest_component(openvino)
ov_debian_add_lintian_suppression(openvino_latest
# reproduced only on ubu18
"description-starts-with-package-name")
# users can manually install specific version of package
# e.g. sudo apt-get install openvino=2022.1.0
# even if we have latest package version 2022.2.0
#
# install debian common files
#
foreach(comp IN LISTS CPACK_COMPONENTS_ALL)
ov_debian_add_changelog_and_copyright("${comp}")
endforeach()
endmacro()

View File

@@ -1,27 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# Components
macro(ov_cpack_settings)
# fill a list of components which are part of NSIS or other GUI installer
set(cpack_components_all ${CPACK_COMPONENTS_ALL})
unset(CPACK_COMPONENTS_ALL)
foreach(item IN LISTS cpack_components_all)
# filter out some components, which are not needed to be wrapped to Windows package
if(# python wheels are not needed to be wrapped by NSIS installer
NOT item STREQUAL OV_CPACK_COMP_PYTHON_WHEELS)
list(APPEND CPACK_COMPONENTS_ALL ${item})
endif()
endforeach()
# restore the components settings
foreach(comp IN LISTS CPACK_COMPONENTS_ALL)
cpack_add_component(${comp} ${_${comp}_cpack_component_args})
endforeach()
# override package file name
set(CPACK_PACKAGE_FILE_NAME "w_openvino_toolkit_p_${OpenVINO_VERSION}.${OpenVINO_VERSION_BUILD}_offline")
endmacro()

View File

@@ -1,13 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(CPACK_GENERATOR STREQUAL "DEB")
include(cmake/packaging/debian.cmake)
elseif(CPACK_GENERATOR STREQUAL "RPM")
include(cmake/packaging/rpm.cmake)
elseif(CPACK_GENERATOR MATCHES "^(CONDA-FORGE|BREW)$")
include(cmake/packaging/common-libraries.cmake)
elseif(CPACK_GENERATOR STREQUAL "NSIS")
include(cmake/packaging/nsis.cmake)
endif()

View File

@@ -1,366 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
# OpenVINO Core components including frontends, plugins, etc
#
function(_ov_add_plugin comp is_pseudo)
string(TOUPPER "${comp}" ucomp)
if(NOT DEFINED CPACK_RPM_${ucomp}_PACKAGE_NAME)
message(FATAL_ERROR "CPACK_RPM_${ucomp}_PACKAGE_NAME is not defined")
else()
set(package_name "${CPACK_RPM_${ucomp}_PACKAGE_NAME}")
endif()
if(NOT DEFINED cpack_full_ver)
message(FATAL_ERROR "Internal variable 'cpack_full_ver' is not defined")
endif()
if(is_pseudo)
if(pseudo_plugins_recommends)
set(pseudo_plugins_recommends "${pseudo_plugins_recommends}, ${package_name} (= ${cpack_full_ver})")
else()
set(pseudo_plugins_recommends "${package_name} (= ${cpack_full_ver})")
endif()
endif()
if(all_plugins_suggest)
set(all_plugins_suggest "${all_plugins_suggest}, ${package_name} (= ${cpack_full_ver})")
else()
set(all_plugins_suggest "${package_name} (= ${cpack_full_ver})")
endif()
list(APPEND installed_plugins ${comp})
set(pseudo_plugins_recommends "${pseudo_plugins_recommends}" PARENT_SCOPE)
set(all_plugins_suggest "${all_plugins_suggest}" PARENT_SCOPE)
set(installed_plugins "${installed_plugins}" PARENT_SCOPE)
endfunction()
macro(ov_cpack_settings)
# fill a list of components which are part of rpm
set(cpack_components_all ${CPACK_COMPONENTS_ALL})
unset(CPACK_COMPONENTS_ALL)
foreach(item IN LISTS cpack_components_all)
# filter out some components, which are not needed to be wrapped to .deb package
if(# skip OpenVINO Pyhon API and samples
NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO}_python.*" AND
NOT item STREQUAL OV_CPACK_COMP_PYTHON_SAMPLES AND
# python wheels are not needed to be wrapped by rpm packages
NOT item STREQUAL OV_CPACK_COMP_PYTHON_WHEELS AND
# see ticket # 82605
NOT item STREQUAL "gna" AND
# even for case of system TBB we have installation rules for wheels packages
# so, need to skip this explicitly
NOT item MATCHES "^tbb(_dev)?$" AND
# the same for pugixml
NOT item STREQUAL "pugixml" AND
# TF component is not released
NOT item STREQUAL "tensorflow" AND
# we have copyright file for rpm package
NOT item STREQUAL OV_CPACK_COMP_LICENSING AND
# not appropriate components
NOT item STREQUAL OV_CPACK_COMP_DEPLOYMENT_MANAGER AND
NOT item STREQUAL OV_CPACK_COMP_INSTALL_DEPENDENCIES AND
NOT item STREQUAL OV_CPACK_COMP_SETUPVARS)
list(APPEND CPACK_COMPONENTS_ALL ${item})
endif()
endforeach()
list(REMOVE_DUPLICATES CPACK_COMPONENTS_ALL)
# version with 3 components
set(cpack_name_ver "${OpenVINO_VERSION}")
# full version with epoch and release components
set(cpack_full_ver "${CPACK_PACKAGE_VERSION}")
# take release version into account
if(DEFINED CPACK_RPM_PACKAGE_RELEASE)
set(cpack_full_ver "${cpack_full_ver}-${CPACK_RPM_PACKAGE_RELEASE}")
endif()
# take epoch version into account
if(DEFINED CPACK_RPM_PACKAGE_EPOCH)
set(cpack_full_ver "${CPACK_RPM_PACKAGE_EPOCH}:${cpack_full_ver}")
endif()
# a list of conflicting package versions
set(conflicting_versions
# 2022 release series
# - 2022.1.0 is the last public release with rpm packages from Intel install team
# - 2022.1.1, 2022.2 do not have rpm packages enabled, distributed only as archives
# - 2022.3 is the first release where RPM updated packages are introduced
2022.1.0)
find_host_program(rpmlint_PROGRAM NAMES rpmlint DOC "Path to rpmlint")
if(rpmlint_PROGRAM)
execute_process(COMMAND "${rpmlint_PROGRAM}" --version
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
RESULT_VARIABLE rpmlint_code
OUTPUT_VARIABLE rpmlint_version)
if(NOT rpmlint_code EQUAL 0)
message(FATAL_ERROR "Internal error: Failed to determine rpmlint version")
else()
if(rpmlint_version MATCHES ".*version ([0-9]+\.[0-9]+) Copyright.*")
set(rpmlint_version "${CMAKE_MATCH_1}")
else()
message(WARNING "Failed to extract rpmlint version from '${rpmlint_version}'")
endif()
endif()
else()
message(WARNING "Failed to find 'rpmlint' tool, use 'sudo yum / dnf install rpmlint' to install it")
endif()
#
# core: base dependency for all components
#
set(CPACK_COMPONENT_CORE_DESCRIPTION "OpenVINO C / C++ Runtime libraries")
set(CPACK_RPM_CORE_PACKAGE_NAME "libopenvino-${cpack_name_ver}")
set(CPACK_RPM_CORE_POST_INSTALL_SCRIPT_FILE "${def_triggers}")
set(CPACK_RPM_CORE_POST_UNINSTALL_SCRIPT_FILE "${def_triggers}")
#
# Plugins
#
# hetero
if(ENABLE_HETERO)
set(CPACK_COMPONENT_HETERO_DESCRIPTION "OpenVINO Hetero plugin")
set(CPACK_COMPONENT_HETERO_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_HETERO_PACKAGE_NAME "libopenvino-hetero-plugin-${cpack_name_ver}")
_ov_add_plugin(hetero ON)
endif()
# auto batch
if(ENABLE_AUTO_BATCH)
set(CPACK_COMPONENT_BATCH_DESCRIPTION "OpenVINO Automatic Batching plugin")
set(CPACK_COMPONENT_BATCH_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_BATCH_PACKAGE_NAME "libopenvino-auto-batch-plugin-${cpack_name_ver}")
_ov_add_plugin(batch ON)
endif()
# multi / auto plugins
if(ENABLE_MULTI)
if(ENABLE_AUTO)
set(CPACK_COMPONENT_MULTI_DESCRIPTION "OpenVINO Auto / Multi plugin")
else()
set(CPACK_COMPONENT_MULTI_DESCRIPTION "OpenVINO Multi plugin")
endif()
set(CPACK_COMPONENT_MULTI_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_MULTI_PACKAGE_NAME "libopenvino-auto-plugin-${cpack_name_ver}")
_ov_add_plugin(multi ON)
elseif(ENABLE_AUTO)
set(CPACK_COMPONENT_AUTO_DESCRIPTION "OpenVINO Auto plugin")
set(CPACK_COMPONENT_AUTO_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_AUTO_PACKAGE_NAME "libopenvino-auto-plugin-${cpack_name_ver}")
_ov_add_plugin(auto ON)
endif()
# intel-cpu
if(ENABLE_INTEL_CPU OR DEFINED openvino_arm_cpu_plugin_SOURCE_DIR)
if(ENABLE_INTEL_CPU)
set(CPACK_COMPONENT_CPU_DESCRIPTION "Intel® CPU")
else()
set(CPACK_COMPONENT_CPU_DESCRIPTION "ARM CPU")
endif()
set(CPACK_COMPONENT_CPU_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_CPU_PACKAGE_NAME "libopenvino-intel-cpu-plugin-${cpack_name_ver}")
_ov_add_plugin(cpu OFF)
endif()
# intel-gpu
if(ENABLE_INTEL_GPU)
set(CPACK_COMPONENT_GPU_DESCRIPTION "Intel® Processor Graphics")
set(CPACK_COMPONENT_GPU_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_GPU_PACKAGE_NAME "libopenvino-intel-gpu-plugin-${cpack_name_ver}")
# auto batch exhances GPU
# set(CPACK_RPM_BATCH_PACKAGE_ENHANCES "${CPACK_RPM_GPU_PACKAGE_NAME} = (${cpack_full_ver})")
_ov_add_plugin(gpu OFF)
endif()
# intel-myriad
if(ENABLE_INTEL_MYRIAD)
set(CPACK_COMPONENT_MYRIAD_DESCRIPTION "Intel® Movidius™ VPU")
set(CPACK_COMPONENT_MYRIAD_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_MYRIAD_PACKAGE_NAME "libopenvino-intel-vpu-plugin-${cpack_name_ver}")
_ov_add_plugin(myriad OFF)
endif()
# intel-gna
if(ENABLE_INTEL_GNA AND "gna" IN_LIST CPACK_COMPONENTS_ALL)
set(CPACK_COMPONENT_GNA_DESCRIPTION "Intel® Gaussian Neural Accelerator")
set(CPACK_COMPONENT_GNA_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_GNA_PACKAGE_NAME "libopenvino-intel-gna-plugin-${cpack_name_ver}")
_ov_add_plugin(gna OFF)
endif()
#
# Frontends
#
if(ENABLE_OV_IR_FRONTEND)
set(CPACK_COMPONENT_IR_DESCRIPTION "OpenVINO IR Frontend")
set(CPACK_COMPONENT_IR_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_IR_PACKAGE_NAME "libopenvino-ir-frontend-${cpack_name_ver}")
set(CPACK_RPM_IR_POST_INSTALL_SCRIPT_FILE "${def_triggers}")
set(CPACK_RPM_IR_POST_UNINSTALL_SCRIPT_FILE "${def_triggers}")
list(APPEND frontends ir)
endif()
if(ENABLE_OV_ONNX_FRONTEND)
set(CPACK_COMPONENT_ONNX_DESCRIPTION "OpenVINO ONNX Frontend")
set(CPACK_COMPONENT_ONNX_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_ONNX_PACKAGE_NAME "libopenvino-onnx-frontend-${cpack_name_ver}")
set(CPACK_RPM_ONNX_POST_INSTALL_SCRIPT_FILE "${def_triggers}")
set(CPACK_RPM_ONNX_POST_UNINSTALL_SCRIPT_FILE "${def_triggers}")
list(APPEND frontends onnx)
endif()
if(ENABLE_OV_TF_FRONTEND AND "tensorflow" IN_LIST CPACK_COMPONENTS_ALL)
set(CPACK_COMPONENT_TENSORFLOW_DESCRIPTION "OpenVINO TensorFlow Frontend")
set(CPACK_COMPONENT_TENSORFLOW_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_TENSORFLOW_PACKAGE_NAME "libopenvino-tensorflow-frontend-${cpack_name_ver}")
set(CPACK_RPM_TENSORFLOW_POST_INSTALL_SCRIPT_FILE "${def_triggers}")
set(CPACK_RPM_TENSORFLOW_POST_UNINSTALL_SCRIPT_FILE "${def_triggers}")
list(APPEND frontends tensorflow)
endif()
if(ENABLE_OV_PADDLE_FRONTEND)
set(CPACK_COMPONENT_PADDLE_DESCRIPTION "OpenVINO Paddle Frontend")
set(CPACK_COMPONENT_PADDLE_DEPENDS "${OV_CPACK_COMP_CORE}")
set(CPACK_RPM_PADDLE_PACKAGE_NAME "libopenvino-paddle-frontend-${cpack_name_ver}")
set(CPACK_RPM_PADDLE_POST_INSTALL_SCRIPT_FILE "${def_triggers}")
set(CPACK_RPM_PADDLE_POST_UNINSTALL_SCRIPT_FILE "${def_triggers}")
list(APPEND frontends paddle)
endif()
#
# core_dev: depends on core and frontends (since frontends don't want to provide its own dev packages)
#
set(CPACK_COMPONENT_CORE_DEV_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit C / C++ Development files")
set(CPACK_COMPONENT_CORE_DEV_DEPENDS "${OV_CPACK_COMP_CORE};${frontends}")
set(CPACK_RPM_CORE_DEV_PACKAGE_NAME "libopenvino-devel-${cpack_name_ver}")
# TODO: update once compile_tool is excluded from the package
# set(CPACK_RPM_CORE_DEV_PACKAGE_ARCHITECTURE "noarch")
ov_rpm_generate_conflicts("${OV_CPACK_COMP_CORE_DEV}" ${conflicting_versions})
ov_rpm_add_rpmlint_suppression("${OV_CPACK_COMP_CORE_DEV}"
# contains samples source codes
"devel-file-in-non-devel-package /usr/${OV_CPACK_INCLUDEDIR}/ngraph"
"devel-file-in-non-devel-package /usr/${OV_CPACK_INCLUDEDIR}/ie"
"devel-file-in-non-devel-package /usr/${OV_CPACK_INCLUDEDIR}/openvino"
"devel-file-in-non-devel-package /usr/${OV_CPACK_RUNTIMEDIR}/libopenvino*"
"devel-file-in-non-devel-package /usr/${OV_CPACK_RUNTIMEDIR}/pkgconfig/openvino.pc"
# CVS-79409: create man page for compile_tool, remove together with compile_tool
"no-manual-page-for-binary compile_tool")
#
# Python bindings
#
if(ENABLE_PYTHON)
ov_get_pyversion(pyversion)
set(python_component "${OV_CPACK_COMP_PYTHON_OPENVINO}_${pyversion}")
string(TOUPPER "${pyversion}" pyversion)
set(CPACK_COMPONENT_PYOPENVINO_${pyversion}_DESCRIPTION "OpenVINO Python bindings")
set(CPACK_COMPONENT_PYOPENVINO_${pyversion}_DEPENDS "${OV_CPACK_COMP_CORE}")
list(APPEND CPACK_COMPONENT_PYOPENVINO_${pyversion}_DEPENDS ${installed_plugins})
list(APPEND CPACK_COMPONENT_PYOPENVINO_${pyversion}_DEPENDS ${frontends})
set(CPACK_RPM_PYOPENVINO_${pyversion}_PACKAGE_REQUIRES "python3")
set(CPACK_RPM_PYOPENVINO_${pyversion}_PACKAGE_NAME "libopenvino-python-${cpack_name_ver}")
endif()
#
# Samples
#
# TODO: provide different packages in two lines below
set(samples_build_deps "cmake3, gcc-c++, gcc, glibc-devel, make")
set(samples_build_deps_suggest "opencv-devel (>= 3.0)")
# c_samples / cpp_samples
set(CPACK_COMPONENT_SAMPLES_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit C / C++ Samples")
set(CPACK_COMPONENT_SAMPLES_DEPENDS "core_dev")
set(CPACK_RPM_SAMPLES_PACKAGE_NAME "openvino-samples-${cpack_name_ver}")
# 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}, ${all_plugins_suggest}")
set(CPACK_RPM_SAMPLES_PACKAGE_REQUIRES "gflags-devel, zlib-devel")
set(CPACK_RPM_SAMPLES_PACKAGE_ARCHITECTURE "noarch")
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")
# python_samples
if(ENABLE_PYTHON)
set(CPACK_COMPONENT_PYTHON_SAMPLES_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Python Samples")
set(CPACK_COMPONENT_PYTHON_SAMPLES_DEPENDS "${python_component}")
set(CPACK_RPM_PYTHON_SAMPLES_PACKAGE_NAME "openvino-samples-python-${cpack_name_ver}")
set(CPACK_RPM_PYTHON_SAMPLES_PACKAGE_REQUIRES "python3")
set(CPACK_RPM_PYTHON_SAMPLES_PACKAGE_ARCHITECTURE "noarch")
endif()
#
# Add umbrella packages
#
# all libraries
set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Libraries")
if(installed_plugins)
set(CPACK_COMPONENT_LIBRARIES_DEPENDS "${installed_plugins}")
else()
set(CPACK_COMPONENT_LIBRARIES_DEPENDS "${OV_CPACK_COMP_CORE}")
endif()
set(CPACK_RPM_LIBRARIES_PACKAGE_NAME "openvino-libraries-${cpack_name_ver}")
set(CPACK_RPM_LIBRARIES_PACKAGE_ARCHITECTURE "noarch")
# all libraries-dev
set(CPACK_COMPONENT_LIBRARIES_DEV_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Libraries and Development files")
set(CPACK_COMPONENT_LIBRARIES_DEV_DEPENDS "core_dev;libraries")
set(CPACK_RPM_LIBRARIES_DEV_PACKAGE_NAME "openvino-libraries-devel-${cpack_name_ver}")
set(CPACK_RPM_LIBRARIES_DEV_PACKAGE_ARCHITECTURE "noarch")
ov_rpm_generate_conflicts(libraries_dev ${conflicting_versions})
# all openvino
set(CPACK_COMPONENT_OPENVINO_DESCRIPTION "Intel(R) Distribution of OpenVINO(TM) Toolkit Libraries and Development files")
set(CPACK_COMPONENT_OPENVINO_DEPENDS "libraries_dev;samples")
set(CPACK_RPM_OPENVINO_PACKAGE_NAME "openvino-${cpack_name_ver}")
set(CPACK_RPM_OPENVINO_PACKAGE_ARCHITECTURE "noarch")
ov_rpm_generate_conflicts(openvino ${conflicting_versions})
list(APPEND CPACK_COMPONENTS_ALL "libraries;libraries_dev;openvino")
#
# Install latest symlink packages
#
# NOTE: we expicitly don't add runtime latest packages
# since a user needs to depend on specific VERSIONED runtime package
# with fixed SONAMEs, while latest package can be updated multiple times
# ov_rpm_add_latest_component(libraries)
ov_rpm_add_latest_component(libraries_dev)
ov_rpm_add_latest_component(openvino)
# users can manually install specific version of package
# e.g. sudo yum install openvino=2022.1.0
# even if we have latest package version 2022.2.0
#
# install common files
#
foreach(comp IN LISTS CPACK_COMPONENTS_ALL)
ov_rpm_copyright("${comp}")
endforeach()
endmacro()

View File

@@ -14,9 +14,7 @@ set_and_check(OpenVINO_MAIN_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # KMB
set(ie_options "@IE_OPTIONS@")
list(APPEND ie_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER
CMAKE_CXX_LINKER_LAUNCHER CMAKE_C_LINKER_LAUNCHER
CMAKE_BUILD_TYPE CMAKE_SKIP_RPATH CMAKE_INSTALL_PREFIX
CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET)
CMAKE_BUILD_TYPE CMAKE_SKIP_RPATH CMAKE_INSTALL_PREFIX)
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path)
message(STATUS "The following CMake options are exported from Inference Engine Developer package")
@@ -32,11 +30,6 @@ message(" ")
# for samples in 3rd party projects
set_and_check(gflags_DIR "@gflags_BINARY_DIR@")
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Disable warning as error for private components
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
endif()
#
# Content
#
@@ -69,8 +62,6 @@ if(TARGET ngraph::ngraph AND NOT TARGET IE::ngraph)
set_target_properties(IE::ngraph PROPERTIES INTERFACE_LINK_LIBRARIES ngraph::ngraph)
endif()
_ov_find_tbb()
foreach(component @openvino_export_components@)
include("${CMAKE_CURRENT_LIST_DIR}/${component}_dev_targets.cmake")
endforeach()
@@ -88,43 +79,9 @@ if(TARGET IE::runtime::dev AND NOT TARGET openvino::runtime::dev)
endif()
if(ENABLE_SYSTEM_PUGIXML)
set(_ov_pugixml_pkgconfig_interface "@pugixml_FOUND@")
if(_ov_pugixml_pkgconfig_interface)
find_dependency(PkgConfig)
else()
find_dependency(PugiXML)
endif()
if(PugiXML_FOUND)
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
add_library(IE::pugixml ALIAS pugixml)
elseif(PkgConfig_FOUND)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
set(pkg_config_quiet_arg QUIET)
endif()
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
set(pkg_config_required_arg REQUIRED)
endif()
pkg_search_module(pugixml
${pkg_config_quiet_arg}
${pkg_config_required_arg}
IMPORTED_TARGET GLOBAL
pugixml)
unset(pkg_config_quiet_arg)
unset(pkg_config_required_arg)
if(pugixml_FOUND)
add_library(IE::pugixml ALIAS PkgConfig::pugixml)
# PATCH: on Ubuntu 18.04 pugixml.pc contains incorrect include directories
get_target_property(interface_include_dir PkgConfig::pugixml INTERFACE_INCLUDE_DIRECTORIES)
if(interface_include_dir AND NOT EXISTS "${interface_include_dir}")
set_target_properties(PkgConfig::pugixml PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "")
endif()
endif()
endif()
find_dependency(PugiXML)
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
add_library(IE::pugixml ALIAS pugixml)
endif()
# inherit OpenCV from main IE project if enabled

View File

@@ -118,140 +118,8 @@ macro(_ov_find_dependency dep)
return()
endif()
unset(cmake_fd_required_arg)
unset(cmake_fd_quiet_arg)
endmacro()
macro(_ov_find_tbb)
set(THREADING "@THREADING@")
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND NOT TBB_FOUND)
set(enable_pkgconfig_tbb "@tbb_FOUND@")
# try tbb.pc
if(enable_pkgconfig_tbb AND NOT ANDROID)
_ov_find_dependency(PkgConfig)
if(PkgConfig_FOUND)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
set(pkg_config_quiet_arg QUIET)
endif()
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
set(pkg_config_required_arg REQUIRED)
endif()
pkg_search_module(tbb
${pkg_config_quiet_arg}
${pkg_config_required_arg}
IMPORTED_TARGET
tbb)
unset(pkg_config_quiet_arg)
unset(pkg_config_required_arg)
if(tbb_FOUND)
if(TARGET PkgConfig::tbb)
set(TBB_VERSION ${tbb_VERSION})
set(TBB_FOUND ${tbb_FOUND})
unset(tbb_FOUND)
unset(tbb_VERSION)
elseif(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
message(FATAL_ERROR "cmake v${CMAKE_VERSION} contains bug in function 'pkg_search_module', need to update to at least v3.16.0 version")
endif()
endif()
endif()
else()
# try cmake TBB interface
set(enable_system_tbb "@ENABLE_SYSTEM_TBB@")
if(NOT enable_system_tbb)
set_and_check(_tbb_dir "@PACKAGE_IE_TBB_DIR@")
# see https://stackoverflow.com/questions/28070810/cmake-generate-error-on-windows-as-it-uses-as-escape-seq
if(DEFINED ENV{TBBROOT})
file(TO_CMAKE_PATH $ENV{TBBROOT} ENV_TBBROOT)
endif()
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
set(_no_cmake_install_prefix NO_CMAKE_INSTALL_PREFIX)
endif()
set(find_package_tbb_extra_args
CONFIG
PATHS
# oneTBB case exposed via export TBBROOT=<custom TBB root>
"${ENV_TBBROOT}/lib64/cmake/TBB"
"${ENV_TBBROOT}/lib/cmake/TBB"
"${ENV_TBBROOT}/lib/cmake/tbb"
# for custom TBB exposed via cmake -DTBBROOT=<custom TBB root>
"${TBBROOT}/cmake"
# _tbb_dir points to TBB_DIR (custom | temp | system) used to build OpenVINO
${_tbb_dir}
CMAKE_FIND_ROOT_PATH_BOTH
NO_PACKAGE_ROOT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_PACKAGE_REGISTRY
NO_CMAKE_SYSTEM_PATH
${_no_cmake_install_prefix}
NO_CMAKE_SYSTEM_PACKAGE_REGISTRY)
unset(_tbb_dir)
unset(_no_cmake_install_prefix)
endif()
unset(enable_system_tbb)
_ov_find_dependency(TBB
COMPONENTS tbb tbbmalloc
${find_package_tbb_extra_args})
unset(find_package_tbb_extra_args)
endif()
unset(enable_pkgconfig_tbb)
set(install_tbbbind "@install_tbbbind@")
if(install_tbbbind)
set_and_check(_tbb_bind_dir "@PACKAGE_IE_TBBBIND_DIR@")
_ov_find_dependency(TBBBIND_2_5
PATHS ${_tbb_bind_dir}
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
set_target_properties(${TBBBIND_2_5_IMPORTED_TARGETS} PROPERTIES IMPORTED_GLOBAL ON)
unset(_tbb_bind_dir)
endif()
unset(install_tbbbind)
endif()
endmacro()
macro(_ov_find_intel_gna_dependencies)
set(_OV_ENABLE_INTEL_GNA "@ENABLE_INTEL_GNA@")
if(_OV_ENABLE_INTEL_GNA AND NOT libGNA_FOUND)
set_and_check(GNA_PATH "@PACKAGE_GNA_PATH@")
_ov_find_dependency(libGNA
COMPONENTS KERNEL
CONFIG
PATHS "${CMAKE_CURRENT_LIST_DIR}"
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
unset(GNA_PATH)
endif()
unset(_OV_ENABLE_INTEL_GNA)
endmacro()
macro(_ov_find_intel_myriad_dependencies)
set(_OV_ENABLE_INTEL_MYRIAD "@ENABLE_INTEL_MYRIAD@")
if(_OV_ENABLE_INTEL_MYRIAD)
find_package(PkgConfig QUIET)
if(PkgConfig_FOUND AND NOT ANDROID)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
set(pkg_config_quiet_arg QUIET)
endif()
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
set(pkg_config_required_arg REQUIRED)
endif()
pkg_search_module(libusb
${pkg_config_quiet_arg}
${pkg_config_required_arg}
IMPORTED_TARGET
libusb-1.0)
unset(pkg_config_quiet_arg)
unset(pkg_config_required_arg)
endif()
endif()
unset(_OV_ENABLE_INTEL_MYRIAD)
set(cmake_fd_required_arg)
set(cmake_fd_quiet_arg)
endmacro()
function(_ov_target_no_deprecation_error)
@@ -277,17 +145,57 @@ endfunction()
# need to store current PACKAGE_PREFIX_DIR, because it's overwritten by sub-package one
set(_ov_package_prefix_dir "${PACKAGE_PREFIX_DIR}")
set(_OV_ENABLE_OPENVINO_BUILD_SHARED "@BUILD_SHARED_LIBS@")
set(THREADING "@THREADING@")
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND NOT TBB_FOUND)
set(enable_system_tbb "@ENABLE_SYSTEM_TBB@")
if(NOT enable_system_tbb)
set_and_check(_tbb_dir "@PACKAGE_IE_TBB_DIR@")
set(find_package_tbb_extra_args
CONFIG
PATHS
# oneTBB case exposed via export TBBROOT=<custom TBB root>
"$ENV{TBBROOT}/lib64/cmake/TBB"
"$ENV{TBBROOT}/lib/cmake/TBB"
# "$ENV{TBB_DIR}"
# for custom TBB exposed via cmake -DTBBROOT=<custom TBB root>
"${TBBROOT}/cmake"
# _tbb_dir points to TBB_DIR (custom | temp | system) used to build OpenVINO
${_tbb_dir}
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
unset(_tbb_dir)
endif()
unset(enable_system_tbb)
if(NOT _OV_ENABLE_OPENVINO_BUILD_SHARED)
_ov_find_tbb()
_ov_find_intel_gna_dependencies()
_ov_find_intel_myriad_dependencies()
_ov_find_dependency(TBB
COMPONENTS tbb tbbmalloc
${find_package_tbb_extra_args})
set(install_tbbbind "@install_tbbbind@")
if(install_tbbbind)
set_and_check(_tbb_bind_dir "@PACKAGE_IE_TBBBIND_DIR@")
_ov_find_dependency(TBBBIND_2_5
PATHS ${_tbb_bind_dir}
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
set_target_properties(${TBBBIND_2_5_IMPORTED_TARGETS} PROPERTIES IMPORTED_GLOBAL ON)
endif()
unset(install_tbbbind)
endif()
_ov_find_dependency(Threads)
unset(_OV_ENABLE_OPENVINO_BUILD_SHARED)
set(ENABLE_INTEL_GNA "@ENABLE_INTEL_GNA@")
set(ENABLE_INTEL_GNA_SHARED "@BUILD_SHARED_LIBS@")
if(ENABLE_INTEL_GNA AND NOT ENABLE_INTEL_GNA_SHARED AND NOT libGNA_FOUND)
set_and_check(GNA_PATH "@PACKAGE_GNA_PATH@")
_ov_find_dependency(libGNA
COMPONENTS KERNEL
CONFIG
PATHS "${CMAKE_CURRENT_LIST_DIR}"
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
endif()
if(NOT TARGET openvino)
set(_ov_as_external_package ON)
@@ -296,15 +204,10 @@ if(NOT TARGET openvino)
# WA for cmake version < 3.16 which does not export
# IMPORTED_LINK_DEPENDENT_LIBRARIES_** properties if no PUBLIC dependencies for the library
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND TBB_FOUND)
foreach(type RELEASE DEBUG RELWITHDEBINFO MINSIZEREL)
foreach(tbb_target TBB::tbb TBB::tbbmalloc PkgConfig::tbb)
if(TARGET ${tbb_target})
set_property(TARGET openvino::runtime APPEND PROPERTY IMPORTED_LINK_DEPENDENT_LIBRARIES_${type} "${tbb_target}")
endif()
endforeach()
foreach (type RELEASE DEBUG RELWITHDEBINFO MINSIZEREL)
set_property(TARGET openvino::runtime APPEND PROPERTY IMPORTED_LINK_DEPENDENT_LIBRARIES_${type} "TBB::tbb;TBB::tbbmalloc")
endforeach()
endif()
unset(THREADING)
endif()
#

View File

@@ -12,9 +12,7 @@ set_and_check(OpenVINO_SOURCE_DIR "@OpenVINO_SOURCE_DIR@")
set(ov_options "@IE_OPTIONS@")
list(APPEND ov_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER
CMAKE_CXX_LINKER_LAUNCHER CMAKE_C_LINKER_LAUNCHER
CMAKE_BUILD_TYPE CMAKE_SKIP_RPATH CMAKE_INSTALL_PREFIX
CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET)
CMAKE_BUILD_TYPE CMAKE_SKIP_RPATH CMAKE_INSTALL_PREFIX)
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path)
message(STATUS "The following CMake options are exported from OpenVINO Developer package")
@@ -30,11 +28,6 @@ message(" ")
# for samples in 3rd party projects
set_and_check(gflags_DIR "@gflags_BINARY_DIR@")
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Disable warning as error for private components
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
endif()
#
# Content
#
@@ -49,54 +42,17 @@ find_dependency(OpenVINO
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
_ov_find_tbb()
foreach(component @openvino_export_components@)
# TODO: remove legacy targets from some tests
# string(FIND "${component}" "_legacy" index)
# if (index EQUAL -1)
include("${CMAKE_CURRENT_LIST_DIR}/ov_${component}_dev_targets.cmake")
# endif()
string(FIND "${component}" "_legacy" index)
if (index EQUAL -1)
include("${CMAKE_CURRENT_LIST_DIR}/ov_${component}_dev_targets.cmake")
endif()
endforeach()
if(ENABLE_SYSTEM_PUGIXML)
set(_ov_pugixml_pkgconfig_interface "@pugixml_FOUND@")
if(_ov_pugixml_pkgconfig_interface)
find_dependency(PkgConfig)
else()
find_dependency(PugiXML)
endif()
if(PugiXML_FOUND)
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
add_library(openvino::pugixml ALIAS pugixml)
elseif(PkgConfig_FOUND)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
set(pkg_config_quiet_arg QUIET)
endif()
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
set(pkg_config_required_arg REQUIRED)
endif()
pkg_search_module(pugixml
${pkg_config_quiet_arg}
${pkg_config_required_arg}
IMPORTED_TARGET GLOBAL
pugixml)
unset(pkg_config_quiet_arg)
unset(pkg_config_required_arg)
if(pugixml_FOUND)
add_library(openvino::pugixml ALIAS PkgConfig::pugixml)
# PATCH: on Ubuntu 18.04 pugixml.pc contains incorrect include directories
get_target_property(interface_include_dir PkgConfig::pugixml INTERFACE_INCLUDE_DIRECTORIES)
if(interface_include_dir AND NOT EXISTS "${interface_include_dir}")
set_target_properties(PkgConfig::pugixml PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "")
endif()
endif()
endif()
find_dependency(PugiXML)
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
add_library(openvino::pugixml ALIAS pugixml)
endif()
# inherit OpenCV from main OpenVINO project if enabled

View File

@@ -1,23 +0,0 @@
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
pc_path=${pcfiledir}
prefix=${pc_path}/@PKGCONFIG_OpenVINO_PREFIX@
exec_prefix=${prefix}/@OV_WHEEL_RUNTIMEDIR@
libdir=${exec_prefix}
include_prefix=${prefix}/@OV_CPACK_INCLUDEDIR@
includedir_old=${include_prefix}/ie
includedir_new=${include_prefix}
Name: OpenVINO
Description: OpenVINO™ Toolkit
URL: https://docs.openvino.ai/latest/index.html
Version: @OpenVINO_VERSION@
Requires.private: @PKGCONFIG_OpenVINO_REQUIRES_PRIVATE@
Conflicts: openvino < @OpenVINO_VERSION@
Cflags: -I${includedir_old} -I${includedir_new}
Libs: -L${libdir} @PKGCONFIG_OpenVINO_FRONTENDS@ -lopenvino_c -lopenvino @PKGCONFIG_OpenVINO_PRIVATE_DEPS@
Libs.private: -ldl -lm -lpthread -lrt

View File

@@ -4,37 +4,26 @@
set_property(GLOBAL PROPERTY JOB_POOLS four_jobs=4)
if(ENABLE_OV_ONNX_FRONTEND)
if(ENABLE_REQUIREMENTS_INSTALL)
# suppose that ONNX is found, because it's going to be installed during the build
set(onnx_FOUND ON)
else()
# if requirements are not installed automatically, we need to checks whether they are here
ov_check_pip_packages(REQUIREMENTS_FILE "${OpenVINO_SOURCE_DIR}/src/frontends/onnx/tests/requirements.txt"
RESULT_VAR onnx_FOUND
WARNING_MESSAGE "ONNX frontend tests will be skipped"
MESSAGE_MODE WARNING)
endif()
endif()
function(ov_model_convert SRC DST OUT)
set(onnx_gen_script ${OpenVINO_SOURCE_DIR}/src/frontends/onnx/tests/onnx_prototxt_converter.py)
set(onnx_gen_script ${OpenVINO_SOURCE_DIR}/src/core/tests/models/onnx/onnx_prototxt_converter.py)
file(GLOB_RECURSE prototxt_models RELATIVE "${SRC}" "${SRC}/*.prototxt")
file(GLOB_RECURSE xml_models RELATIVE "${SRC}" "${SRC}/*.xml")
file(GLOB_RECURSE bin_models RELATIVE "${SRC}" "${SRC}/*.bin")
file(GLOB_RECURSE onnx_models RELATIVE "${SRC}" "${SRC}/*.onnx")
file(GLOB_RECURSE data_models RELATIVE "${SRC}" "${SRC}/*.data")
if(onnx_FOUND)
file(GLOB_RECURSE prototxt_models RELATIVE "${SRC}" "${SRC}/*.prototxt")
endif()
foreach(in_file IN LISTS prototxt_models xml_models bin_models onnx_models data_models)
get_filename_component(ext "${in_file}" EXT)
get_filename_component(rel_dir "${in_file}" DIRECTORY)
get_filename_component(name_we "${in_file}" NAME_WE)
set(model_source_dir "${SRC}/${rel_dir}")
if(NOT ENABLE_OV_ONNX_FRONTEND AND ext MATCHES "^\\.(onnx|prototxt)$")
# don't copy / process ONNX / prototxt files
continue()
endif()
if(ext STREQUAL ".prototxt")
# convert model
set(rel_out_name "${name_we}.onnx")
@@ -75,7 +64,7 @@ endfunction()
ov_model_convert("${CMAKE_CURRENT_SOURCE_DIR}/src/core/tests"
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_model_zoo/core"
core_tests_out_files)
onnx_out_files)
set(rel_path "src/tests/functional/plugin/shared/models")
ov_model_convert("${OpenVINO_SOURCE_DIR}/${rel_path}"
@@ -92,14 +81,14 @@ ov_model_convert("${OpenVINO_SOURCE_DIR}/${rel_path}"
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_model_zoo/ir_serialization"
ie_serialize_out_files)
set(rel_path "src/frontends/onnx/tests/models")
set(rel_path "src/tests/unit/frontends/onnx_import/models")
ov_model_convert("${OpenVINO_SOURCE_DIR}/${rel_path}"
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_model_zoo/onnx"
onnx_fe_out_files)
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_model_zoo/onnx_import"
ie_onnx_import_out_files)
if(ENABLE_TESTS)
if(ENABLE_OV_ONNX_FRONTEND AND ENABLE_REQUIREMENTS_INSTALL)
find_host_package(PythonInterp 3 REQUIRED)
find_package(PythonInterp 3 REQUIRED)
get_filename_component(PYTHON_EXEC_DIR ${PYTHON_EXECUTABLE} DIRECTORY)
execute_process(COMMAND "${PYTHON_EXECUTABLE}" -m pip --version
@@ -119,29 +108,30 @@ if(ENABLE_TESTS)
message(STATUS "pip version is ${pip3_version}")
set(args --quiet)
if(pip3_version VERSION_GREATER 20.2.2 AND pip3_version VERSION_LESS 20.3.0)
if(pip3_version VERSION_GREATER 20.2.2)
list(APPEND args --use-feature=2020-resolver)
endif()
set(reqs "${OpenVINO_SOURCE_DIR}/src/frontends/onnx/tests/requirements.txt")
add_custom_target(test_pip_prerequisites ALL
set(reqs "${OpenVINO_SOURCE_DIR}/src/core/tests/requirements_test_onnx.txt")
add_custom_target(test_pip_prerequsites ALL
"${PYTHON_EXECUTABLE}" -m pip install ${args} -r ${reqs}
COMMENT "Install ONNX Frontend tests requirements."
COMMENT "Install requirements_test.txt"
VERBATIM
SOURCES ${reqs})
endif()
add_custom_target(test_model_zoo DEPENDS ${core_tests_out_files}
add_custom_target(test_model_zoo DEPENDS ${onnx_out_files}
${ft_out_files}
${ie_onnx_out_files}
${ie_serialize_out_files}
${onnx_fe_out_files})
${ie_onnx_import_out_files}
${docs_onnx_out_files})
if(TARGET test_pip_prerequisites)
add_dependencies(test_model_zoo test_pip_prerequisites)
if(TARGET test_pip_prerequsites)
add_dependencies(test_model_zoo test_pip_prerequsites)
endif()
if (ENABLE_OV_PADDLE_FRONTEND)
if (ENABLE_OV_PADDLE_FRONTEND AND ENABLE_OV_CORE_UNIT_TESTS)
add_dependencies(test_model_zoo paddle_test_models)
endif()

View File

@@ -2,11 +2,6 @@
# SPDX-License-Identifier: Apache-2.0
#
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR i386)
set(PKG_CONFIG_EXECUTABLE i686-linux-gnu-pkg-config CACHE PATH "Path to 32-bits pkg-config")
set(CMAKE_CXX_FLAGS_INIT "-m32")
set(CMAKE_C_FLAGS_INIT "-m32")

View File

@@ -2,7 +2,46 @@
# SPDX-License-Identifier: Apache-2.0
#
add_subdirectory(snippets)
if(NOT ENABLE_DOCKER)
if(CMAKE_COMPILER_IS_GNUCXX)
ie_add_compiler_flags(-Wall)
endif()
# Detect OpenVINO
find_package(OpenVINO QUIET
PATHS "${CMAKE_BINARY_DIR}"
NO_DEFAULT_PATH)
if(NOT OpenVINO_FOUND)
set(OpenVINO_DIR ${CMAKE_BINARY_DIR})
endif()
add_subdirectory(snippets)
add_subdirectory(template_extension)
set(all_docs_targets
ie_docs_snippets ov_template_func_tests
template_extension openvino_template_extension openvino_template_plugin)
foreach(target_name IN LISTS all_docs_targets)
if(TARGET ${target_name})
set_target_properties(${target_name} PROPERTIES FOLDER docs)
if(WIN32)
set_target_properties(${target_name} PROPERTIES COMPILE_PDB_NAME ${target_name})
endif()
endif()
endforeach()
# install
foreach(target openvino_template_plugin template_extension openvino_template_extension)
if(TARGET ${target})
install(TARGETS ${target}
LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH}
COMPONENT tests
EXCLUDE_FROM_ALL)
endif()
endforeach()
endif()
set(LINKCHECKER_PY "" CACHE FILEPATH "Path to linkchecker.py for documentation check dir.")
set(ENABLE_OPENVINO_NOTEBOOKS OFF CACHE BOOL "Build with openvino notebooks")

View File

@@ -1,11 +0,0 @@
# Introduction to OpenVINO™ Deployment {#openvino_docs_deployment_guide_introduction}
Once you have a model that meets both OpenVINO™ and your requirements, you can choose among several ways of deploying it with your application:
* [Deploy your application locally](../OV_Runtime_UG/deployment/deployment_intro.md).
* [Deploy your model with OpenVINO Model Server](@ref ovms_what_is_openvino_model_server).
* [Deploy your application for the TensorFlow framework with OpenVINO Integration](./openvino_ecosystem_ovtf.md).
> **NOTE**: Note that [running inference in OpenVINO Runtime](../OV_Runtime_UG/openvino_intro.md) is the most basic form of deployment. Before moving forward, make sure you know how to create a proper Inference configuration.

View File

@@ -1,15 +0,0 @@
# OpenVINO™ Deep Learning Workbench Overview {#workbench_docs_Workbench_DG_Introduction}
@sphinxdirective
.. toctree::
:maxdepth: 1
:hidden:
workbench_docs_Workbench_DG_Install
workbench_docs_Workbench_DG_Work_with_Models_and_Sample_Datasets
Tutorials <workbench_docs_Workbench_DG_Tutorials>
User Guide <workbench_docs_Workbench_DG_User_Guide>
workbench_docs_Workbench_DG_Troubleshooting
@endsphinxdirective

View File

@@ -1,24 +0,0 @@
# Inference Modes {#openvino_docs_Runtime_Inference_Modes_Overview}
@sphinxdirective
.. toctree::
:maxdepth: 1
:hidden:
openvino_docs_OV_UG_supported_plugins_AUTO
openvino_docs_OV_UG_Running_on_multiple_devices
openvino_docs_OV_UG_Hetero_execution
openvino_docs_OV_UG_Automatic_Batching
@endsphinxdirective
OpenVINO Runtime offers multiple inference modes to allow optimum hardware utilization under different conditions. The most basic one is a single-device mode, which defines just one device responsible for the entire inference workload. It supports a range of Intel hardware by means of plugins embedded in the Runtime library, each set up to offer the best possible performance. For a complete list of supported devices and instructions on how to use them, refer to the [guide on inference devices](../OV_Runtime_UG/supported_plugins/Device_Plugins.md).
The remaining modes assume certain levels of automation in selecting devices for inference. Using them in the deployed solution may potentially increase its performance and portability. The automated modes are:
* [Automatic Device Selection (AUTO)](../OV_Runtime_UG/auto_device_selection.md)
* [Multi-Device Execution (MULTI)](../OV_Runtime_UG/multi_device.md)
* [Heterogeneous Execution (HETERO)](../OV_Runtime_UG/hetero_execution.md)
* [Automatic Batching Execution (Auto-batching)](../OV_Runtime_UG/automatic_batching.md)

View File

@@ -1,22 +0,0 @@
# Introduction to Model Processing {#openvino_docs_model_processing_introduction}
Every deep learning workflow begins with obtaining a model. You can choose to prepare a custom one, use a ready-made solution and adjust it to your needs, or even download and run a pre-trained network from an online database, such as OpenVINO's [Open Model Zoo](../model_zoo.md).
[OpenVINO™ supports several model formats](../MO_DG/prepare_model/convert_model/supported_model_formats.md) and allows to convert them to it's own, OpenVINO IR, providing a tool dedicated to this task.
[Model Optimizer](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) reads the original model and creates the OpenVINO IR model (.xml and .bin files) so that inference can ultimately be performed without delays due to format conversion. Optionally, Model Optimizer can adjust the model to be more suitable for inference, for example, by [alternating input shapes](../MO_DG/prepare_model/convert_model/Converting_Model.md), [embedding preprocessing](../MO_DG/prepare_model/Additional_Optimizations.md) and [cutting training parts off](../MO_DG/prepare_model/convert_model/Cutting_Model.md).
The approach to fully convert a model is considered the default choice, as it allows the full extent of OpenVINO features. The OpenVINO IR model format is used by other conversion and preparation tools, such as the Post-Training Optimization Tool, for further optimization of the converted model.
Conversion is not required for ONNX and PaddlePaddle models, as OpenVINO provides C++ and Python APIs for importing them to OpenVINO Runtime directly. It provides a convenient way to quickly switch from framework-based code to OpenVINO-based code in your inference application.
This section describes the how to obtain and prepare your model for work with OpenVINO to get the best inference results:
* [See the supported formats and how to use them in your project](../MO_DG/prepare_model/convert_model/supported_model_formats.md)
* [Convert different model formats to the OpenVINO IR format](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
* [Automate model-related tasks with Model Downloader and additional OMZ Tools](https://docs.openvino.ai/latest/omz_tools_downloader.html).
To begin with, you may want to [browse a database of models for use in your projects](../model_zoo.md).

View File

@@ -1,76 +0,0 @@
# OpenVINO™ Ecosystem Overview {#openvino_ecosystem}
OpenVINO™ is not just one tool. It is an expansive ecosystem of utilities, providing a comprehensive workflow for deep learning solution development. Learn more about each of them to reach the full potential of OpenVINO™ Toolkit.
### OpenVINO™ Model Server (OVMS)
OpenVINO Model Server is a scalable, high-performance solution for serving deep learning models optimized for Intel® architectures. The server uses Inference Engine libraries as a backend and exposes gRPC and HTTP/REST interfaces for inference that are fully compatible with TensorFlow Serving.
More resources:
* [OpenVINO documentation](https://docs.openvino.ai/latest/openvino_docs_ovms.html)
* [Docker Hub](https://hub.docker.com/r/openvino/model_server)
* [GitHub](https://github.com/openvinotoolkit/model_server)
* [Red Hat Ecosystem Catalog](https://catalog.redhat.com/software/container-stacks/detail/60649e41ccfb383fe395a167)
### Neural Network Compression Framework (NNCF)
A suite of advanced algorithms for Neural Network inference optimization with minimal accuracy drop. NNCF applies quantization, filter pruning, binarization and sparsity algorithms to PyTorch and TensorFlow models during training.
More resources:
* [Documentation](@ref tmo_introduction)
* [GitHub](https://github.com/openvinotoolkit/nncf)
* [PyPI](https://pypi.org/project/nncf/)
### OpenVINO™ Security Add-on
A solution for Model Developers and Independent Software Vendors to use secure packaging and secure model execution.
More resources:
* [documentation](https://docs.openvino.ai/latest/ovsa_get_started.html)
* [GitHub](https://github.com/openvinotoolkit/security_addon)
### OpenVINO™ integration with TensorFlow (OVTF)
A solution empowering TensorFlow developers with OpenVINO's optimization capabilities. With just two lines of code in your application, you can offload inference to OpenVINO, while keeping the TensorFlow API.
More resources:
* [documentation](https://github.com/openvinotoolkit/openvino_tensorflow)
* [PyPI](https://pypi.org/project/openvino-tensorflow/)
* [GitHub](https://github.com/openvinotoolkit/openvino_tensorflow)
### DL Streamer
A streaming media analytics framework, based on the GStreamer multimedia framework, for creating complex media analytics pipelines.
More resources:
* [documentation on GitHub](https://dlstreamer.github.io/index.html)
* [installation Guide on GitHub](https://github.com/openvinotoolkit/dlstreamer_gst/wiki/Install-Guide)
### DL Workbench
A web-based tool for deploying deep learning models. Built on the core of OpenVINO and equipped with a graphics user interface, DL Workbench is a great way to explore the possibilities of the OpenVINO workflow, import, analyze, optimize, and build your pre-trained models. You can do all that by visiting [Intel® DevCloud for the Edge](https://software.intel.com/content/www/us/en/develop/tools/devcloud.html) and launching DL Workbench on-line.
More resources:
* [documentation](dl_workbench_overview.md)
* [Docker Hub](https://hub.docker.com/r/openvino/workbench)
* [PyPI](https://pypi.org/project/openvino-workbench/)
### OpenVINO™ Training Extensions (OTE)
A convenient environment to train Deep Learning models and convert them using the OpenVINO™ toolkit for optimized inference.
More resources:
* [GitHub](https://github.com/openvinotoolkit/training_extensions)
### Computer Vision Annotation Tool (CVAT)
An online, interactive video and image annotation tool for computer vision purposes.
More resources:
* [documentation on GitHub](https://opencv.github.io/cvat/docs/)
* [web application](https://cvat.org/)
* [Docker Hub](https://hub.docker.com/r/openvino/cvat_server)
* [GitHub](https://github.com/openvinotoolkit/cvat)
### Dataset Management Framework (Datumaro)
A framework and CLI tool to build, transform, and analyze datasets.
More resources:
* [documentation on GitHub](https://openvinotoolkit.github.io/datumaro/docs/)
* [PyPI](https://pypi.org/project/datumaro/)
* [GitHub](https://github.com/openvinotoolkit/datumaro)

View File

@@ -1,44 +0,0 @@
# OpenVINO™ integration with TensorFlow {#ovtf_integration}
**OpenVINO™ integration with TensorFlow** is a solution for TensorFlow developers who want to get started with OpenVINO™ in their inferencing applications. By adding just two lines of code you can now take advantage of OpenVINO™ toolkit optimizations with TensorFlow inference applications across a range of Intel® computation devices.
This is all you need:
```bash
import openvino_tensorflow
openvino_tensorflow.set_backend('<backend_name>')
```
**OpenVINO™ integration with TensorFlow** accelerates inference across many AI models on a variety of Intel® technologies, such as:
- Intel® CPUs
- Intel® integrated GPUs
- Intel® Movidius™ Vision Processing Units - referred to as VPU
- Intel® Vision Accelerator Design with 8 Intel Movidius™ MyriadX VPUs - referred to as VAD-M or HDDL
> **NOTE**: For maximum performance, efficiency, tooling customization, and hardware control, we recommend developers to adopt native OpenVINO™ solutions.
To find out more about the product itself, as well as learn how to use it in your project, check its dedicated [GitHub repository](https://github.com/openvinotoolkit/openvino_tensorflow/tree/master/docs).
To see what you can do with **OpenVINO™ integration with TensorFlow**, explore the demos located in the [examples folder](https://github.com/openvinotoolkit/openvino_tensorflow/tree/master/examples) in our GitHub repository.
Sample tutorials are also hosted on [Intel® DevCloud](https://www.intel.com/content/www/us/en/developer/tools/devcloud/edge/build/ovtfoverview.html). The demo applications are implemented using Jupyter Notebooks. You can interactively execute them on Intel® DevCloud nodes, compare the results of **OpenVINO™ integration with TensorFlow**, native TensorFlow, and OpenVINO™.
## License
**OpenVINO™ integration with TensorFlow** is licensed under [Apache License Version 2.0](https://github.com/openvinotoolkit/openvino_tensorflow/blob/master/LICENSE).
By contributing to the project, you agree to the license and copyright terms therein
and release your contribution under these terms.
## Support
Submit your questions, feature requests and bug reports via [GitHub issues](https://github.com/openvinotoolkit/openvino_tensorflow/issues).
## How to Contribute
We welcome community contributions to **OpenVINO™ integration with TensorFlow**. If you have an idea for improvement:
* Share your proposal via [GitHub issues](https://github.com/openvinotoolkit/openvino_tensorflow/issues).
* Submit a [pull request](https://github.com/openvinotoolkit/openvino_tensorflow/pulls).
We will review your contribution as soon as possible. If any additional fixes or modifications are necessary, we will guide you and provide feedback. Before you make your contribution, make sure you can build **OpenVINO™ integration with TensorFlow** and run all the examples with your fix/patch. If you want to introduce a large feature, create test cases for your feature. Upon our verification of your pull request, we will merge it to the repository provided that the pull request has met the above mentioned requirements and proved acceptable.
---
\* Other names and brands may be claimed as the property of others.

View File

@@ -913,8 +913,7 @@ RECURSIVE = YES
EXCLUDE = "@OpenVINO_SOURCE_DIR@/thirdparty" \
"@OpenVINO_SOURCE_DIR@/temp" \
"@OpenVINO_SOURCE_DIR@/bin" \
"@OpenVINO_SOURCE_DIR@/docs/ops/internal"
"@OpenVINO_SOURCE_DIR@/bin"
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
@@ -1041,12 +1040,16 @@ EXCLUDE_SYMBOLS = InferenceEngine::details \
EXAMPLE_PATH = "@OpenVINO_SOURCE_DIR@" \
"@OpenVINO_SOURCE_DIR@/docs/HOWTO/" \
"@OpenVINO_SOURCE_DIR@/docs/" \
"@OpenVINO_SOURCE_DIR@/src/plugins/" \
"@OpenVINO_SOURCE_DIR@/src/core/" \
"@OpenVINO_SOURCE_DIR@/src/plugins/template/" \
"@OpenVINO_SOURCE_DIR@/src/plugins/template/tests/functional/CMakeLists.txt" \
"@OpenVINO_SOURCE_DIR@/src/plugins/template/tests/functional/transformations/" \
"@OpenVINO_SOURCE_DIR@/src/plugins/template/tests/functional/shared_tests_instances/" \
"@OpenVINO_SOURCE_DIR@/docs/template_extension/" \
"@OpenVINO_SOURCE_DIR@/docs/template_extension/old/" \
"@OpenVINO_SOURCE_DIR@/docs/template_extension/new/" \
"@OpenVINO_SOURCE_DIR@/docs/template_plugin/" \
"@OpenVINO_SOURCE_DIR@/docs/template_plugin/src/" \
"@OpenVINO_SOURCE_DIR@/docs/template_plugin/include/" \
"@OpenVINO_SOURCE_DIR@/docs/template_plugin/src/CMakeLists.txt" \
"@OpenVINO_SOURCE_DIR@/docs/template_plugin/tests/functional/CMakeLists.txt" \
"@OpenVINO_SOURCE_DIR@/docs/template_plugin/tests/functional/transformations/" \
"@OpenVINO_SOURCE_DIR@/docs/template_plugin/tests/functional/shared_tests_instances/" \
"@OpenVINO_SOURCE_DIR@/docs/snippets/" \
"@OpenVINO_SOURCE_DIR@/src/tests/functional/plugin/shared/include/" \
"@OpenVINO_SOURCE_DIR@/docs/HOWTO/mo_extensions/ops/" \
@@ -1106,7 +1109,7 @@ INPUT_FILTER =
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
FILTER_PATTERNS =
FILTER_PATTERNS =
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
# INPUT_FILTER) will also be used to filter the input files that are used for
@@ -1348,7 +1351,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET =
HTML_EXTRA_STYLESHEET =
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note

View File

@@ -8,6 +8,7 @@ There are two options for using the custom operation configuration file:
* Include a section with your kernels into the automatically-loaded `<lib_path>/cldnn_global_custom_kernels/cldnn_global_custom_kernels.xml` file.
* Call the `ov::Core::set_property()` method from your application with the `"CONFIG_FILE"` key and the configuration file name as a value before loading the network that uses custom operations to the plugin:
@sphinxtabset
@sphinxtab{C++}
@@ -221,13 +222,13 @@ __kernel void example_relu_kernel(
> **NOTE**: As described in the previous section, all items like
> `INPUT0_TYPE` are actually defined as OpenCL (pre-)compiler inputs by
> OpenVINO for efficiency reasons. See the [Debugging
> Tips](#debugging-tips) below for information on debugging the results.
> OpenVINO for efficiency reasons. See [Debugging
> Tips](#debugging-tips) for information on debugging the results.
## Debugging Tips<a name="debugging-tips"></a>
**Using `printf` in the OpenCL™ Kernels**.
To debug the specific values, use `printf` in your kernels.
* **Using `printf` in the OpenCL™ Kernels**.
To debug the specific values, you can use `printf` in your kernels.
However, be careful not to output excessively, which
could generate too much data. The `printf` output is typical, so
your output can be truncated to fit the buffer. Also, because of

View File

@@ -9,13 +9,13 @@
openvino_docs_Extensibility_UG_add_openvino_ops
openvino_docs_Extensibility_UG_Frontend_Extensions
openvino_docs_Extensibility_UG_GPU
openvino_docs_Extensibility_UG_VPU_Kernel
openvino_docs_IE_DG_Extensibility_DG_VPU_Kernel
openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Customize_Model_Optimizer
@endsphinxdirective
The Intel® Distribution of OpenVINO™ toolkit supports neural network models trained with various frameworks, including
TensorFlow, PyTorch, ONNX, PaddlePaddle, Apache MXNet, Caffe, and Kaldi. The list of supported operations is different for
TensorFlow, PyTorch, ONNX, PaddlePaddle, MXNet, Caffe, and Kaldi. The list of supported operations is different for
each of the supported frameworks. To see the operations supported by your framework, refer to
[Supported Framework Operations](../MO_DG/prepare_model/Supported_Frameworks_Layers.md).
@@ -52,7 +52,7 @@ Depending on model format used for import, mapping of custom operation is implem
2. If model is represented in TensorFlow, Caffe, Kaldi or MXNet formats, then [Model Optimizer Extensions](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md) should be used. This approach is available for model conversion in Model Optimizer only.
Existing of two approaches simultaneously is explained by two different types of frontends used for model conversion in OpenVINO: new frontends (ONNX, PaddlePaddle) and legacy frontends (TensorFlow, Caffe, Kaldi and Apache MXNet). Model Optimizer can use both front-ends in contrast to the direct import of model with `read_model` method which can use new frontends only. Follow one of the appropriate guides referenced above to implement mappings depending on framework frontend.
Existing of two approaches simultaneously is explained by two different types of frontends used for model conversion in OpenVINO: new frontends (ONNX, PaddlePaddle) and legacy frontends (TensorFlow, Caffe, Kaldi and MXNet). Model Optimizer can use both front-ends in contrast to the direct import of model with `read_model` method which can use new frontends only. Follow one of the appropriate guides referenced above to implement mappings depending on framework frontend.
If you are implementing extensions for ONNX or PaddlePaddle new frontends and plan to use Model Optimizer `--extension` option for model conversion, then the extensions should be
@@ -68,7 +68,7 @@ Remaining part of this guide uses Frontend Extension API applicable for new fron
A custom operation class and a new mapping frontend extension class object should be registered to be usable in OpenVINO runtime.
> **NOTE**: This documentation is written based on the [Template extension](https://github.com/openvinotoolkit/openvino/tree/master/src/core/template_extension/new), which demonstrates extension development details based on minimalistic `Identity` operation that is a placeholder for your real custom operation. You can review the complete code, which is fully compliable, to see how it works.
> **NOTE**: This documentation is written based on the [Template extension](https://github.com/openvinotoolkit/openvino/tree/master/docs/template_extension/new), which demonstrates extension development details based on minimalistic `Identity` operation that is a placeholder for your real custom operation. You can review the complete code, which is fully compliable, to see how it works.
To load the extensions to the `ov::Core` object, use the `ov::Core::add_extension` method, this method allows to load library with extensions or extensions from the code.
@@ -138,7 +138,7 @@ This CMake script finds the OpenVINO™ using the `find_package` CMake command.
To build the extension library, run the commands below:
```sh
$ cd src/core/template_extension/new
$ cd docs/template_extension/new
$ mkdir build
$ cd build
$ cmake -DOpenVINO_DIR=<OpenVINO_DIR> ../

View File

@@ -1,4 +1,4 @@
# How to Implement Custom Layers for VPU (Intel® Neural Compute Stick 2) {#openvino_docs_Extensibility_UG_VPU_Kernel}
# How to Implement Custom Layers for VPU (Intel® Neural Compute Stick 2) {#openvino_docs_IE_DG_Extensibility_DG_VPU_Kernel}
To enable operations not supported by OpenVINO™ out of the box, you need a custom extension for Model Optimizer, a custom nGraph operation set, and a custom kernel for the device you will target. This page describes custom kernel support for one the VPU, the Intel® Neural Compute Stick 2 device, which uses the MYRIAD device plugin.

View File

@@ -1,6 +1,6 @@
# Custom OpenVINO™ Operations {#openvino_docs_Extensibility_UG_add_openvino_ops}
OpenVINO™ Extension API allows you to register custom operations to support models with operations which OpenVINO™ does not support out-of-the-box. This capability requires writing code in C++, so if you are using Python to develop your application you need to build a separate shared library implemented in C++ first and load it in Python using `add_extension` API. Please refer to [Create library with extensions](Intro.md#create-library-with-extensions) for more details on library creation and usage. The remining part of this document describes how to implement an operation class.
OpenVINO™ Extension API allows you to register custom operations to support models with operations which OpenVINO™ does not support out-of-the-box.
## Operation Class

View File

@@ -4,7 +4,7 @@ The goal of this chapter is to explain how to use Frontend extension classes to
This API is applicable for new frontends only, which exist for ONNX and PaddlePaddle. If a different model format is used, follow legacy [Model Optimizer Extensions](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md) guide.
> **NOTE**: This documentation is written based on the [Template extension](https://github.com/openvinotoolkit/openvino/tree/master/src/core/template_extension/new), which demonstrates extension development details based on minimalistic `Identity` operation that is a placeholder for your real custom operation. You can review the complete code, which is fully compliable, to see how it works.
> **NOTE**: This documentation is written based on the [Template extension](https://github.com/openvinotoolkit/openvino/tree/master/docs/template_extension/new), which demonstrates extension development details based on minimalistic `Identity` operation that is a placeholder for your real custom operation. You can review the complete code, which is fully compliable, to see how it works.
## Single Operation Mapping with OpExtension

Some files were not shown because too many files have changed in this diff Show More