Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mryzhov committed Nov 17, 2021
2 parents 637a356 + 14d1f7c commit 0f3b5c8
Show file tree
Hide file tree
Showing 1,157 changed files with 40,343 additions and 19,382 deletions.
32 changes: 29 additions & 3 deletions .ci/azure/linux.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
trigger:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/*

resources:
repositories:
- repository: openvino_contrib
Expand All @@ -12,6 +21,16 @@ resources:

jobs:
- job: Lin
strategy:
matrix:
Dynamic:
CMAKE_BUILD_SHARED_LIBS: 'ON'
PYTHON_STATIC_ARGS:
Static:
CMAKE_BUILD_SHARED_LIBS: 'OFF'
PYTHON_STATIC_ARGS: -m "not dynamic_library and not template_plugin"
maxParallel: 2

# About 150% of total time
timeoutInMinutes: 90

Expand Down Expand Up @@ -117,6 +136,9 @@ jobs:
-DVERBOSE_BUILD=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DENABLE_PYTHON=ON
-DBUILD_SHARED_LIBS=$(CMAKE_BUILD_SHARED_LIBS)
-DENABLE_GNA=$(CMAKE_BUILD_SHARED_LIBS)
-DENABLE_ONEDNN_FOR_GPU=$(CMAKE_BUILD_SHARED_LIBS)
-DPYTHON_EXECUTABLE=/usr/bin/python3.8
-DENABLE_WHEEL=ON
-DENABLE_TESTS=ON
Expand Down Expand Up @@ -174,10 +196,12 @@ jobs:
- script: $(INSTALL_DIR)/samples/cpp/build_samples.sh
workingDirectory: $(BUILD_SAMPLES_DIR)
displayName: 'Build cpp samples'
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'ON')

- script: $(INSTALL_DIR)/samples/c/build_samples.sh
workingDirectory: $(BUILD_SAMPLES_DIR)
displayName: 'Build c samples'
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'ON')

- script: rm -fr $(BUILD_DIR)
displayName: 'Clean build dir'
Expand All @@ -187,13 +211,13 @@ jobs:
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_TEST_DIR)/pyngraph --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
. $(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 Python Bindings Tests'
continueOnError: false
- script: |
export MO_ROOT=$(INSTALL_DIR)/tools/model_optimizer
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_DIR)/tools/model_optimizer/unit_tests --junitxml=TEST-ModelOptimizer.xml
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_DIR)/tests/model_optimizer/unit_tests --junitxml=TEST-ModelOptimizer.xml
displayName: 'Model Optimizer UT'
continueOnError: false
Expand Down Expand Up @@ -226,6 +250,7 @@ jobs:
- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/gnaUnitTests --gtest_output=xml:TEST-gnaUnitTests.xml
displayName: 'GNA UT'
continueOnError: false
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'ON')

- script: . $(SETUPVARS) && $(INSTALL_TEST_DIR)/vpuUnitTests --gtest_output=xml:TEST-vpuUnitTests.xml
displayName: 'VPU UT'
Expand All @@ -246,6 +271,7 @@ jobs:
- 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: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'OFF')

- script: |
export DATA_PATH=$(MODELS_PATH)
Expand All @@ -258,7 +284,7 @@ jobs:
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
cd $(REPO_DIR)/inference-engine/ie_bridges/python/tests
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest --junitxml=TEST-PythonAPI.xml
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest --junitxml=TEST-PythonAPI.xml $(PYTHON_STATIC_ARGS)
displayName: 'Python API Tests'
continueOnError: false
Expand Down
9 changes: 9 additions & 0 deletions .ci/azure/linux_conditional_compilation.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
trigger:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/*

jobs:
- job: LinCC
# About 150% of total time
Expand Down
15 changes: 11 additions & 4 deletions .ci/azure/linux_ngraph_onnx.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
trigger:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/*

jobs:
- job: OpenVINO_ONNX_CI
strategy:
matrix:
Release:
BUILD_TYPE: 'Release'
PROTOBUF_LITE: 'ON'
TOX_COMMAND: 'tox && tox -e zoo_models'
Debug:
BUILD_TYPE: 'Debug'
PROTOBUF_LITE: 'ON'
TOX_COMMAND: 'tox'
maxParallel: 2

Expand Down Expand Up @@ -77,10 +84,10 @@ jobs:
condition: ne(variables['BUILD_TYPE'], 'Debug')

- script: sudo docker build --tag=openvino-onnx-ci-image --file=.ci/openvino-onnx/Dockerfile --build-arg BUILD_TYPE=$(BUILD_TYPE) --build-arg PROTOBUF_LITE=$(PROTOBUF_LITE) .
displayName: 'Docker build $(BUILD_TYPE) protobuf-lite: $(PROTOBUF_LITE)'
displayName: 'Docker build $(BUILD_TYPE)'

- script: sudo fallocate -l 64G /swapfile ; sudo mkswap /swapfile ; sudo swapon /swapfile ; df ; free -h
displayName: 'Create swap'

- script: sudo docker run --name openvino-onnx-ci-container --volume $(MODELS_DIR)/models_data/model_zoo/onnx_model_zoo_$(ONNX_MODEL_ZOO_SHA):/root/.onnx/model_zoo/onnx_model_zoo --volume $(MODELS_DIR)/msft:/root/.onnx/model_zoo/MSFT openvino-onnx-ci-image /bin/bash -c "$(TOX_COMMAND)"
displayName: 'Docker run $(BUILD_TYPE) protobuf-lite: $(PROTOBUF_LITE)'
displayName: 'Docker run $(BUILD_TYPE)'
8 changes: 8 additions & 0 deletions .ci/azure/linux_onnxruntime.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
trigger:
branches:
include:
- releases/*
paths:
exclude:
- docs/*

jobs:
- job: onnxruntime
timeoutInMinutes: 90
Expand Down
9 changes: 9 additions & 0 deletions .ci/azure/mac.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
trigger:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/*

resources:
repositories:
- repository: openvino_contrib
Expand Down
24 changes: 23 additions & 1 deletion .ci/azure/windows.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
trigger:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/*

resources:
repositories:
- repository: openvino_contrib
Expand All @@ -12,6 +21,14 @@ resources:

jobs:
- job: Win
strategy:
matrix:
Dynamic:
CMAKE_BUILD_SHARED_LIBS: 'ON'
Static:
CMAKE_BUILD_SHARED_LIBS: 'OFF'
maxParallel: 2

# About 150% of total time
timeoutInMinutes: 120

Expand Down Expand Up @@ -102,7 +119,7 @@ jobs:
- script: |
set PATH=$(WORK_DIR)\ninja-win;%PATH%
call "$(MSVS_VARS_PATH)" && cmake -GNinja -DENABLE_REQUIREMENTS_INSTALL=OFF -DENABLE_FASTER_BUILD=ON -DENABLE_TEMPLATE_PLUGIN=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" -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)
call "$(MSVS_VARS_PATH)" && cmake -GNinja -DENABLE_CLDNN=$(CMAKE_BUILD_SHARED_LIBS) -DBUILD_SHARED_LIBS=$(CMAKE_BUILD_SHARED_LIBS) -DENABLE_REQUIREMENTS_INSTALL=OFF -DENABLE_FASTER_BUILD=ON -DENABLE_TEMPLATE_PLUGIN=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" -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'
Expand Down Expand Up @@ -135,10 +152,12 @@ jobs:
- script: $(INSTALL_DIR)\samples\cpp\build_samples_msvc.bat
workingDirectory: $(BUILD_SAMPLES_DIR)
displayName: 'Build cpp samples'
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'ON')

- script: $(INSTALL_DIR)\samples\c\build_samples_msvc.bat
workingDirectory: $(BUILD_SAMPLES_DIR)
displayName: 'Build c samples'
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'ON')

- script: rd /Q /S $(BUILD_DIR)
displayName: 'Clean build dir'
Expand All @@ -152,10 +171,12 @@ jobs:
- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\paddlepaddle_tests --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-PaddlePaddle.xml
displayName: 'PaddlePaddle Frontend UT'
continueOnError: false
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'ON')

- script: call $(SETUPVARS) && $(INSTALL_TEST_DIR)\tensorflow_tests --gtest_print_time=1 --gtest_output=xml:TEST-Tensorflow.xml
displayName: 'Tensorflow Frontend UT'
continueOnError: false
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'ON')

- script: |
set PATH=$(IB_DIR);%PATH%
Expand Down Expand Up @@ -197,6 +218,7 @@ jobs:
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
displayName: 'CPU FuncTests - IB'
continueOnError: false
condition: eq(variables['CMAKE_BUILD_SHARED_LIBS'], 'OFF')
- script: |
set DATA_PATH=$(MODELS_PATH)
Expand Down
9 changes: 9 additions & 0 deletions .ci/azure/windows_conditional_compilation.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
trigger:
branches:
include:
- master
- releases/*
paths:
exclude:
- docs/*

jobs:
- job: WinCC
# About 150% of total time
Expand Down
4 changes: 1 addition & 3 deletions .ci/openvino-onnx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ LABEL version=2021.03.30.1

# Build configuration arguments
ARG BUILD_TYPE=Release
ARG PROTOBUF_LITE=ON

ARG http_proxy
ARG https_proxy
Expand Down Expand Up @@ -69,8 +68,7 @@ RUN cmake .. \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DNGRAPH_ONNX_FRONTEND_ENABLE=ON \
-DOPENVINO_DEBUG_ENABLE=OFF \
-DCMAKE_INSTALL_PREFIX=/openvino/dist \
-DNGRAPH_USE_PROTOBUF_LITE=${PROTOBUF_LITE}
-DCMAKE_INSTALL_PREFIX=/openvino/dist
RUN make -j $(nproc) install

# Run tests via tox
Expand Down
6 changes: 2 additions & 4 deletions .ci/openvino-onnx/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ DOCKER_IMAGE_TAG = "openvino-onnx-ci-image"
ONNX_MODEL_ZOO_SHA = "d58213534f2a4d1c4b19ba62b3bb5f544353256e"

BACKEND_CONFIGURATIONS = [
[ name: "Release", build_type: "Release", protobuf_lite : "OFF" ],
[ name: "Debug", build_type: "Debug", protobuf_lite : "OFF" ],
[ name: "Rel_Lite", build_type: "Release", protobuf_lite : "ON" ],
[ name: "Release", build_type: "Release" ],
[ name: "Debug", build_type: "Debug" ],
]

// workaround for aborting previous builds on PR update
Expand Down Expand Up @@ -111,7 +110,6 @@ def buildDockerImage(Map configuration, String workdir) {
sh """
docker build --tag=${docker_image_tag} \
--build-arg BUILD_TYPE=${configuration.build_type} \
--build-arg PROTOBUF_LITE=${configuration.protobuf_lite} \
--file=.ci/openvino-onnx/Dockerfile \
--build-arg http_proxy=${HTTP_PROXY} \
--build-arg https_proxy=${HTTPS_PROXY} .
Expand Down
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,9 @@ include(cmake/test_model_zoo.cmake)
add_subdirectory(thirdparty)
add_subdirectory(openvino)
add_subdirectory(ngraph)
add_subdirectory(runtime)
add_subdirectory(inference-engine)

# for Template plugin
openvino_developer_export_targets(COMPONENT ngraph TARGETS ngraph_backend interpreter_backend)
add_subdirectory(runtime)
include(cmake/extra_modules.cmake)

if(ENABLE_SAMPLES)
add_subdirectory(samples)
endif()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OpenVINO™ Toolkit
[![Stable release](https://img.shields.io/badge/version-2021.4.1-green.svg)](https://github.com/openvinotoolkit/openvino/releases/tag/2021.4.1)
[![Stable release](https://img.shields.io/badge/version-2021.4.2-green.svg)](https://github.com/openvinotoolkit/openvino/releases/tag/2021.4.2)
[![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)
Expand Down
32 changes: 21 additions & 11 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,22 @@ if(THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
endif()

if(WIN32 AND X86_64)
#TODO: add target_path to be platform specific as well, to avoid following if
# TODO: add target_path to be platform specific as well, to avoid following if
RESOLVE_DEPENDENCY(TBB
ARCHIVE_WIN "tbb2020_20200415_win.zip"
TARGET_PATH "${TEMP}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "f1c9b9e2861efdaa01552bd25312ccbc5feeb45551e5f91ae61e29221c5c1479")
RESOLVE_DEPENDENCY(TBBBIND_2_5
ARCHIVE_WIN "tbbbind_2_5_static_win_v1.zip"
TARGET_PATH "${TEMP}/tbbbind_2_5"
ENVIRONMENT "TBBBIND_2_5_ROOT"
SHA256 "a67afeea8cf194f97968c800dab5b5459972908295242e282045d6b8953573c1")
if(ENABLE_TBBBIND_2_5)
RESOLVE_DEPENDENCY(TBBBIND_2_5
ARCHIVE_WIN "tbbbind_2_5_static_win_v1.zip"
TARGET_PATH "${TEMP}/tbbbind_2_5"
ENVIRONMENT "TBBBIND_2_5_ROOT"
SHA256 "a67afeea8cf194f97968c800dab5b5459972908295242e282045d6b8953573c1")
else()
message(WARNING "prebuilt TBBBIND_2_5 is not available.
Build oneTBB from sources and set TBBROOT environment var before OpenVINO cmake configure")
endif()
elseif(ANDROID) # Should be before LINUX due LINUX is detected as well
RESOLVE_DEPENDENCY(TBB
ARCHIVE_ANDROID "tbb2020_20200404_android.tgz"
Expand All @@ -126,11 +131,16 @@ if(THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO")
TARGET_PATH "${TEMP}/tbb"
ENVIRONMENT "TBBROOT"
SHA256 "95b2f3b0b70c7376a0c7de351a355c2c514b42c4966e77e3e34271a599501008")
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")
if(ENABLE_TBBBIND_2_5)
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()
message(WARNING "prebuilt TBBBIND_2_5 is not available.
Build oneTBB from sources and set TBBROOT environment var before OpenVINO cmake configure")
endif()
elseif(LINUX AND AARCH64)
RESOLVE_DEPENDENCY(TBB
ARCHIVE_LIN "keembay/tbb2020_38404_kmb_lic.tgz"
Expand Down
13 changes: 12 additions & 1 deletion cmake/developer_package/IEDevScriptsConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,13 @@ endif()

# General flags

macro(ov_install_static_lib target comp)
if(NOT BUILD_SHARED_LIBS)
install(TARGETS ${target} EXPORT OpenVINOTargets
ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT ${comp})
endif()
endmacro()

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

Expand Down Expand Up @@ -235,7 +242,11 @@ endif()
# macro to mark target as conditionally compiled

function(ie_mark_target_as_cc TARGET_NAME)
target_link_libraries(${TARGET_NAME} PRIVATE openvino::conditional_compilation)
set(cc_library openvino::conditional_compilation)
if(TARGET IE::conditional_compilation)
set(cc_library IE::conditional_compilation)
endif()
target_link_libraries(${TARGET_NAME} PRIVATE ${cc_library})

if(NOT (SELECTIVE_BUILD STREQUAL "ON"))
return()
Expand Down
4 changes: 0 additions & 4 deletions cmake/developer_package/plugins/create_plugins_hpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,4 @@ endforeach()
set(IE_PLUGINS_MAP_DEFINITION "${IE_PLUGINS_MAP_DEFINITION}
};\n")


message("${IE_PLUGINS_DECLARATIONS}")
message("${IE_PLUGINS_MAP_DEFINITION}")

configure_file("${IE_PLUGINS_HPP_HEADER_IN}" "${IE_PLUGINS_HPP_HEADER}" @ONLY)
Loading

0 comments on commit 0f3b5c8

Please sign in to comment.