Skip to content

Commit 7e31bcb

Browse files
committed
Merge remote-tracking branch 'origin/master' into new_inputs_rank_align
2 parents ebf0130 + 6609383 commit 7e31bcb

File tree

285 files changed

+13497
-2266
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

285 files changed

+13497
-2266
lines changed

.github/workflows/job_cxx_unit_tests.yml

+2
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ jobs:
162162
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-Transformations.xml
163163
164164
- name: Common test utils tests
165+
if: ${{ runner.os != 'macOS' }} # Ticket: 134469
165166
run: |
166167
source ${INSTALL_DIR}/setupvars.sh
167168
${INSTALL_TEST_DIR}/ov_util_tests --gtest_print_time=1 \
@@ -216,6 +217,7 @@ jobs:
216217
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-TemplateFuncTests.xml
217218
218219
- name: OV utils unit tests
220+
if: ${{ runner.os != 'macOS' }} # Ticket: 134469
219221
run: |
220222
source ${INSTALL_DIR}/setupvars.sh
221223
${INSTALL_TEST_DIR}/ov_util_tests --gtest_print_time=1 \

.github/workflows/job_python_unit_tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ jobs:
211211
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/py_frontend_tests --junitxml=${INSTALL_TEST_DIR}/TEST-test_py_fontend.xml
212212
213213
- name: PyTorch Layer Tests
214-
if: ${{ fromJSON(inputs.affected-components).PyTorch_FE.test && runner.arch != 'ARM64' }} # Ticket: 126287
214+
if: ${{ fromJSON(inputs.affected-components).PyTorch_FE.test && runner.arch != 'ARM64' }} # Ticket: 126287, 142196
215215
run: python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/pytorch_tests -n logical -m precommit --junitxml=${INSTALL_TEST_DIR}/TEST-pytorch.xml
216216
env:
217217
TEST_DEVICE: CPU

.github/workflows/linux.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ jobs:
695695
if: fromJSON(needs.smart_ci.outputs.affected_components).TOKENIZERS
696696

697697
GPU:
698-
name: GPU ${{ matrix.TEST_TYPE }} Tests
698+
name: GPU Tests
699699
needs: [ Build, Smart_CI ]
700700
if: fromJSON(needs.smart_ci.outputs.affected_components).GPU
701701
timeout-minutes: 80

.github/workflows/mac_arm64.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
run: |
181181
cmake \
182182
-DCUSTOM_OPERATIONS="calculate_grid;complex_mul;fft;grid_sample;sparse_conv;sparse_conv_transpose" \
183-
-DOPENVINO_EXTRA_MODULES=${{ OPENVINO_CONTRIB_REPO }}/modules/custom_operations \
183+
-DOPENVINO_EXTRA_MODULES=${{ env.OPENVINO_CONTRIB_REPO }}/modules/custom_operations \
184184
-S ${{ env.OPENVINO_REPO }} \
185185
-B ${{ env.BUILD_DIR }}
186186
cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }}

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ if(OV_GENERATOR_MULTI_CONFIG)
7171
string(REPLACE ";" " " config_types "${CMAKE_CONFIGURATION_TYPES}")
7272
message (STATUS "CMAKE_CONFIGURATION_TYPES ............. " ${config_types})
7373
unset(config_types)
74-
if(CMAKE_GENERATOR MATCHES "^Ninja Multi-Config$")
74+
if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
7575
message (STATUS "CMAKE_DEFAULT_BUILD_TYPE .............. " ${CMAKE_DEFAULT_BUILD_TYPE})
7676
endif()
7777
else()

cmake/developer_package/cross_compile/native_compile.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function(ov_native_compile_external_project)
7171
endif()
7272

7373
if(OV_GENERATOR_MULTI_CONFIG)
74-
if(CMAKE_GENERATOR MATCHES "^Ninja Multi-Config$")
74+
if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
7575
list(APPEND ARG_CMAKE_ARGS "-DCMAKE_CONFIGURATION_TYPES=${CMAKE_DEFAULT_BUILD_TYPE}")
7676
list(APPEND ARG_CMAKE_ARGS "-DCMAKE_DEFAULT_BUILD_TYPE=${CMAKE_DEFAULT_BUILD_TYPE}")
7777
endif()

cmake/features.cmake

+9-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,15 @@ else()
162162
set(ENABLE_SYSTEM_FLATBUFFERS_DEFAULT ON)
163163
endif()
164164

165-
ov_dependent_option (ENABLE_SYSTEM_TBB "Enables use of system TBB" OFF "THREADING MATCHES TBB" OFF)
165+
# use system TBB only for Debian / RPM packages
166+
if(CPACK_GENERATOR MATCHES "^(DEB|RPM|CONDA-FORGE|BREW|CONAN|VCPKG)$")
167+
set(ENABLE_SYSTEM_TBB_DEFAULT ${ENABLE_SYSTEM_LIBS_DEFAULT})
168+
else()
169+
set(ENABLE_SYSTEM_TBB_DEFAULT OFF)
170+
endif()
171+
172+
ov_dependent_option (ENABLE_SYSTEM_TBB "Enables use of system TBB" ${ENABLE_SYSTEM_TBB_DEFAULT}
173+
"THREADING MATCHES TBB" OFF)
166174
ov_option (ENABLE_SYSTEM_PUGIXML "Enables use of system PugiXML" OFF)
167175
# the option is on by default, because we use only flatc compiler and don't use any libraries
168176
ov_dependent_option(ENABLE_SYSTEM_FLATBUFFERS "Enables use of system flatbuffers" ${ENABLE_SYSTEM_FLATBUFFERS_DEFAULT}

cmake/packaging/debian.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ macro(ov_cpack_settings)
9393
2023.3.0 2023.3.1 2023.3.2 2023.3.3 2023.3.4 2023.3.5
9494
2024.0.0
9595
2024.1.0
96+
2024.2.0
9697
)
9798

9899
ov_check_conflicts_versions(conflicting_versions)

cmake/packaging/rpm.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ macro(ov_cpack_settings)
8181
2023.3.0 2023.3.1 2023.3.2 2023.3.3 2023.3.4 2023.3.5
8282
2024.0.0
8383
2024.1.0
84+
2024.2.0
8485
)
8586

8687
ov_check_conflicts_versions(conflicting_versions)

cmake/templates/OpenVINOConfig.cmake.in

+12
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,16 @@
9292
# `OpenVINO_VERSION_PATCH`
9393
# Patch version component
9494
#
95+
# OpenVINO build configuration variables:
96+
#
97+
# `OpenVINO_GLIBCXX_USE_CXX11_ABI`
98+
# Linux only: defines _GLIBCXX_USE_CXX11_ABI used to compiled OpenVINO
99+
#
95100

96101
@PACKAGE_INIT@
97102

103+
set(OpenVINO_GLIBCXX_USE_CXX11_ABI "@OV_GLIBCXX_USE_CXX11_ABI@")
104+
98105
#
99106
# Common functions
100107
#
@@ -473,6 +480,11 @@ set(_OV_ENABLE_OPENVINO_BUILD_SHARED "@BUILD_SHARED_LIBS@")
473480
if(NOT TARGET openvino)
474481
set(_ov_as_external_package ON)
475482
include("${CMAKE_CURRENT_LIST_DIR}/OpenVINOTargets.cmake")
483+
484+
# since OpenVINO is compiled with _GLIBCXX_USE_CXX11_ABI=0
485+
if(NOT OpenVINO_GLIBCXX_USE_CXX11_ABI STREQUAL "")
486+
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=${OpenVINO_GLIBCXX_USE_CXX11_ABI})
487+
endif()
476488
endif()
477489

478490
if(NOT _OV_ENABLE_OPENVINO_BUILD_SHARED)

cmake/templates/OpenVINODeveloperPackageConfig.cmake.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ endif()
2222
get_property(_OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
2323
if(_OV_GENERATOR_MULTI_CONFIG)
2424
list(APPEND ov_options CMAKE_CONFIGURATION_TYPES)
25-
if(CMAKE_GENERATOR MATCHES "^Ninja Multi-Config$")
25+
if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
2626
list(APPEND ov_options CMAKE_DEFAULT_BUILD_TYPE)
2727
endif()
2828
else()

cmake/templates/OpenVINODeveloperPackageConfigRelocatable.cmake.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ endif()
1818
get_property(_OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
1919
if(_OV_GENERATOR_MULTI_CONFIG)
2020
list(APPEND ov_options CMAKE_CONFIGURATION_TYPES)
21-
if(CMAKE_GENERATOR MATCHES "^Ninja Multi-Config$")
21+
if(CMAKE_GENERATOR STREQUAL "Ninja Multi-Config")
2222
list(APPEND ov_options CMAKE_DEFAULT_BUILD_TYPE)
2323
endif()
2424
else()

docs/articles_en/assets/snippets/ov_hetero.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,5 @@ auto compiled_model = core.compile_model(model, "HETERO",
5353
);
5454
//! [configure_fallback_devices]
5555
}
56-
57-
{
58-
//! [set_pipeline_parallelism]
59-
std::set<ov::hint::ModelDistributionPolicy> model_policy = {ov::hint::ModelDistributionPolicy::PIPELINE_PARALLEL};
60-
auto compiled_model =
61-
core.compile_model(model, "HETERO:GPU.1,GPU.2", ov::hint::model_distribution_policy(model_policy));
62-
//! [set_pipeline_parallelism]
63-
}
6456
return 0;
6557
}

docs/articles_en/assets/snippets/ov_hetero.py

-12
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,3 @@ def main():
5353
core.set_property("CPU", {hints.inference_precision: ov.Type.f32})
5454
compiled_model = core.compile_model(model=model, device_name="HETERO")
5555
#! [configure_fallback_devices]
56-
57-
#! [set_pipeline_parallelism]
58-
import openvino.properties.hint as hints
59-
60-
compiled_model = core.compile_model(
61-
model,
62-
device_name="HETERO:GPU.1,GPU.2",
63-
config={
64-
hints.model_distribution_policy:
65-
"PIPELINE_PARALLEL"
66-
})
67-
#! [set_pipeline_parallelism]

docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/hetero-execution.rst

+17-51
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,29 @@ Execution via the heterogeneous mode can be divided into two independent steps:
1818

1919
1. Setting hardware affinity to operations (`ov::Core::query_model <https://docs.openvino.ai/2024/api/c_cpp_api/classov_1_1_core.html#doxid-classov-1-1-core-1acdf8e64824fe4cf147c3b52ab32c1aab>`__ is used internally by the Hetero device).
2020
2. Compiling a model to the Heterogeneous device assumes splitting the model to parts, compiling them on the specified devices (via `ov::device::priorities <https://docs.openvino.ai/2024/api/c_cpp_api/structov_1_1device_1_1_priorities.html>`__), and executing them in the Heterogeneous mode. The model is split to subgraphs in accordance with the affinities, where a set of connected operations with the same affinity is to be a dedicated subgraph. Each subgraph is compiled on a dedicated device and multiple `ov::CompiledModel <https://docs.openvino.ai/2024/api/c_cpp_api/classov_1_1_compiled_model.html#doxid-classov-1-1-compiled-model>`__ objects are made, which are connected via automatically allocated intermediate tensors.
21-
22-
If you set pipeline parallel (via ``ov::hint::model_distribution_policy``), the model is split into multiple stages, and each stage is assigned to a different device. The output of one stage is fed as input to the next stage.
2321

2422
These two steps are not interconnected and affinities can be set in one of two ways, used separately or in combination (as described below): in the ``manual`` or the ``automatic`` mode.
2523

2624
Defining and Configuring the Hetero Device
27-
##########################################
25+
++++++++++++++++++++++++++++++++++++++++++
2826

2927
Following the OpenVINO™ naming convention, the Hetero execution plugin is assigned the label of ``"HETERO".`` It may be defined with no additional parameters, resulting in defaults being used, or configured further with the following setup options:
3028

3129

32-
+--------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------+
33-
| Parameter Name & C++ property | Property values | Description |
34-
+============================================+=============================================================+===========================================================+
35-
| | "MULTI_DEVICE_PRIORITIES" | | ``HETERO: <device names>`` | | Lists the devices available for selection. |
36-
| | ``ov::device::priorities`` | | | | The device sequence will be taken as priority |
37-
| | | | comma-separated, no spaces | | from high to low. |
38-
+--------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------+
39-
| | | | ``empty`` | | Model distribution policy for inference with |
40-
| | "MODEL_DISTRIBUTION_POLICY" | | ``ov::hint::ModelDistributionPolicy::PIPELINE_PARALLEL`` | | multiple devices. Distribute model to multiple |
41-
| | | | | | devices during model compilation. |
42-
| | ``ov::hint::model_distribution_policy`` | | HETERO only support PIPELINE_PARALLEL, The default value | | |
43-
| | | | is empty | | |
44-
+--------------------------------------------+-------------------------------------------------------------+-----------------------------------------------------------+
30+
+-------------------------------+--------------------------------------------+-----------------------------------------------------------+
31+
| Parameter Name & C++ property | Property values | Description |
32+
+===============================+============================================+===========================================================+
33+
| | "MULTI_DEVICE_PRIORITIES" | | HETERO: <device names> | | Lists the devices available for selection. |
34+
| | ``ov::device::priorities`` | | comma-separated, no spaces | | The device sequence will be taken as priority |
35+
| | | | | | from high to low. |
36+
+-------------------------------+--------------------------------------------+-----------------------------------------------------------+
37+
4538

4639
Manual and Automatic modes for assigning affinities
47-
###################################################
40+
+++++++++++++++++++++++++++++++++++++++++++++++++++
4841

4942
The Manual Mode
50-
++++++++++++++++++
43+
--------------------
5144

5245
It assumes setting affinities explicitly for all operations in the model using `ov::Node::get_rt_info <https://docs.openvino.ai/2024/api/c_cpp_api/classov_1_1_node.html#doxid-classov-1-1-node-1a6941c753af92828d842297b74df1c45a>`__ with the ``"affinity"`` key.
5346

@@ -73,10 +66,7 @@ Randomly selecting operations and setting affinities may lead to decrease in mod
7366

7467

7568
The Automatic Mode
76-
++++++++++++++++++
77-
78-
Without pipeline parallelism
79-
-----------------------------
69+
--------------------
8070

8171
It decides automatically which operation is assigned to which device according to the support from dedicated devices (``GPU``, ``CPU``, etc.) and query model step is called implicitly by Hetero device during model compilation.
8272

@@ -100,33 +90,9 @@ It does not take into account device peculiarities such as the inability to infe
10090
:language: cpp
10191
:fragment: [compile_model]
10292

103-
Pipeline parallelism
104-
------------------------
105-
106-
The pipeline parallelism is set via ``ov::hint::model_distribution_policy``. This mode is an efficient technique to infer large models on multiple devices. The model is split into multiple stages, and each stage is assigned to a different device (``dGPU``, ``iGPU``, ``CPU``, etc.). This mode assign operations to different devices as reasonably as possible, ensuring that different stages can be executed in sequence and minimizing the amount of data transfer between different devices.
107-
108-
For large models which don’t fit on a single first priority device, model pipeline parallelism is employed where certain parts of the model are placed on different devices to ensure that the device has enough memory to infer these operations.
109-
110-
111-
.. tab-set::
112-
113-
.. tab-item:: Python
114-
:sync: py
115-
116-
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_hetero.py
117-
:language: Python
118-
:fragment: [set_pipeline_parallelism]
119-
120-
.. tab-item:: C++
121-
:sync: cpp
122-
123-
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_hetero.cpp
124-
:language: cpp
125-
:fragment: [set_pipeline_parallelism]
126-
12793

12894
Using Manual and Automatic Modes in Combination
129-
+++++++++++++++++++++++++++++++++++++++++++++++
95+
-----------------------------------------------
13096

13197
In some cases you may need to consider manually adjusting affinities which were set automatically. It usually serves minimizing the number of total subgraphs to optimize memory transfers. To do it, you need to "fix" the automatically assigned affinities like so:
13298

@@ -155,7 +121,7 @@ Importantly, the automatic mode will not work if any operation in a model has it
155121
`ov::Core::query_model <https://docs.openvino.ai/2024/api/c_cpp_api/classov_1_1_core.html#doxid-classov-1-1-core-1acdf8e64824fe4cf147c3b52ab32c1aab>`__ does not depend on affinities set by a user. Instead, it queries for an operation support based on device capabilities.
156122
157123
Configure fallback devices
158-
##########################
124+
++++++++++++++++++++++++++
159125

160126
If you want different devices in Hetero execution to have different device-specific configuration options, you can use the special helper property `ov::device::properties <https://docs.openvino.ai/2024/api/c_cpp_api/structov_1_1device_1_1_properties.html#doxid-group-ov-runtime-cpp-prop-api-1ga794d09f2bd8aad506508b2c53ef6a6fc>`__:
161127

@@ -180,15 +146,15 @@ If you want different devices in Hetero execution to have different device-speci
180146
In the example above, the ``GPU`` device is configured to enable profiling data and uses the default execution precision, while ``CPU`` has the configuration property to perform inference in ``fp32``.
181147

182148
Handling of Difficult Topologies
183-
################################
149+
++++++++++++++++++++++++++++++++
184150

185151
Some topologies are not friendly to heterogeneous execution on some devices, even to the point of being unable to execute.
186152
For example, models having activation operations that are not supported on the primary device are split by Hetero into multiple sets of subgraphs which leads to suboptimal execution.
187153
If transmitting data from one subgraph to another part of the model in the heterogeneous mode takes more time than under normal execution, heterogeneous execution may be unsubstantiated.
188154
In such cases, you can define the heaviest part manually and set the affinity to avoid sending data back and forth many times during one inference.
189155

190156
Analyzing Performance of Heterogeneous Execution
191-
################################################
157+
++++++++++++++++++++++++++++++++++++++++++++++++
192158

193159
After enabling the ``OPENVINO_HETERO_VISUALIZE`` environment variable, you can dump GraphViz ``.dot`` files with annotations of operations per devices.
194160

@@ -220,7 +186,7 @@ Here is an example of the output for Googlenet v1 running on HDDL (device no lon
220186
221187
222188
Sample Usage
223-
############
189+
++++++++++++++++++++
224190

225191
OpenVINO™ sample programs can use the Heterogeneous execution used with the ``-d`` option:
226192

docs/nbdoc/consts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
repo_owner = "openvinotoolkit"
77
repo_name = "openvino_notebooks"
88
repo_branch = "tree/main"
9-
artifacts_link = "http://repository.toolbox.iotg.sclab.intel.com/projects/ov-notebook/0.1.0-latest/20240506220807/dist/rst_files/"
9+
artifacts_link = "http://repository.toolbox.iotg.sclab.intel.com/projects/ov-notebook/0.1.0-latest/20240515220822/dist/rst_files/"
1010
blacklisted_extensions = ['.xml', '.bin']
1111
notebooks_repo = "https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/"
1212
notebooks_binder = "https://mybinder.org/v2/gh/openvinotoolkit/openvino_notebooks/HEAD?filepath="

0 commit comments

Comments
 (0)