diff --git a/cmake/developer_package/ncc_naming_style/ncc_naming_style.cmake b/cmake/developer_package/ncc_naming_style/ncc_naming_style.cmake
index 8efdf859a42..c2da0f5a732 100644
--- a/cmake/developer_package/ncc_naming_style/ncc_naming_style.cmake
+++ b/cmake/developer_package/ncc_naming_style/ncc_naming_style.cmake
@@ -23,7 +23,7 @@ execute_process(
ERROR_VARIABLE error_var)
if(NOT clang_find_result EQUAL "0")
- message(WARNING "Please, install libclang-[N]-dev package (required for ncc naming style check)")
+ 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)
@@ -106,9 +106,9 @@ function(ov_ncc_naming_style)
"${NCC_STYLE_SOURCE_DIRECTORY}/*.cpp")
list(APPEND NCC_STYLE_ADDITIONAL_INCLUDE_DIRECTORIES "${NCC_STYLE_SOURCE_DIRECTORY}")
-
# without it sources with same name from different directories will map to same .ncc_style target
file(RELATIVE_PATH source_dir_rel ${CMAKE_SOURCE_DIR} ${NCC_STYLE_SOURCE_DIRECTORY})
+
foreach(source IN LISTS sources)
set(output_file "${ncc_style_bin_dir}/${source_dir_rel}/${source}.ncc_style")
set(full_source_path "${NCC_STYLE_SOURCE_DIRECTORY}/${source}")
diff --git a/docs/Doxyfile.config b/docs/Doxyfile.config
index adffa442688..fa8a893de49 100644
--- a/docs/Doxyfile.config
+++ b/docs/Doxyfile.config
@@ -264,6 +264,10 @@ TAB_SIZE = 4
ALIASES = "ref_ie{1}=@ref InferenceEngine::\1 \"\1\""
ALIASES += sphinxdirective="\n\xmlonly"
ALIASES += endsphinxdirective="\endxmlonly"
+ALIASES += sphinxtabset="\n\xmlonly\endxmlonly\n"
+ALIASES += endsphinxtabset="\n\xmlonly\endxmlonly\n"
+ALIASES += sphinxtab{1}="\n\xmlonly\1\endxmlonly\n"
+ALIASES += endsphinxtab="\n\xmlonly\endxmlonly\n"
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
diff --git a/docs/Extensibility_UG/Intro.md b/docs/Extensibility_UG/Intro.md
index f0df72daf47..47de4c1f907 100644
--- a/docs/Extensibility_UG/Intro.md
+++ b/docs/Extensibility_UG/Intro.md
@@ -1,4 +1,4 @@
-# OpenVINO Extensibility Mechanism {#openvino_docs_Extensibility_UG_Intro}
+# OpenVINO Extensibility Mechanism {#openvino_docs_Extensibility_UG_Intro}
@sphinxdirective
@@ -7,41 +7,67 @@
:hidden:
openvino_docs_Extensibility_UG_add_openvino_ops
+ openvino_docs_Extensibility_UG_Frontend_Extensions
openvino_docs_Extensibility_UG_GPU
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, MXNet, Caffe, and Kaldi. The list of supported operations (layers) 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).
-Custom operations, that is those not included in the list, are not recognized by OpenVINO™ out-of-the-box. Therefore, creating Intermediate Representation (IR) for a model using them requires additional steps. This guide illustrates the workflow for running inference on topologies featuring custom operations, allowing you to plug in your own implementation for existing or completely new operations.
+Custom operations, that is those not included in the list, are not recognized by OpenVINO™ out-of-the-box. The need in custom operation may appear in two main cases:
-If your model contains operations not normally supported by OpenVINO™, the OpenVINO™ Extensibility API lets you add support for those custom operations and use one implementation for Model Optimizer and OpenVINO™ Runtime.
+1. A regular framework operation that is new or rarely used and that’s why hasn’t been supported in OpenVINO yet.
-There are two steps to support inference of a model with custom operation(s):
-1. Add support for a [custom operation in the Model Optimizer](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md) so
-the Model Optimizer can generate the IR with the operation.
-2. Create a custom operation in it as described in the [Custom Operation](add_openvino_ops.md).
+2. A new user operation that was created for some specific model topology by a model author using framework extension capabilities.
-## OpenVINO™ Extensions
+Importing models with such operations requires additional steps. This guide illustrates the workflow for running inference on models featuring custom operations, allowing you to plug in your own implementation for them. OpenVINO™ Extensibility API lets you add support for those custom operations and use one implementation for Model Optimizer and OpenVINO™ Runtime.
-OpenVINO™ provides extensions for:
+Defining a new custom operation basically consist of two parts:
- * [Custom OpenVINO™ Operation](add_openvino_ops.md):
- - Enables the creation of unsupported operations
- - Enables the use of `ov::Core::read_model` to read models with unsupported operations
- - Provides a shape inference mechanism for custom operations
- - Provides an evaluate method that allows you to support the operation on CPU or perform constant folding
- * [Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md):
- - Enables support of new operations to generate IR
- - Enables support of custom transformations to replace sub-graphs for performance optimization
+1. Definition of operation semantics in OpenVINO, the code that describes how this operation should be inferred consuming input tensor(s) and producing output tensor(s).
-> **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. You can review the complete code, which is fully compilable and up-to-date, to see how it works.
+2. Mapping rule that facilitates conversion of framework operation representation to OpenVINO defined operation semantics.
-## Load extensions to OpenVINO™ Runtime
+The first part is required for inference, the second part is required for successful import of a model containing such operations from the original framework model format. There are several options to implement each part, the next sections will describe them in detail.
+
+## Definition of Operation Semantics
+
+
+If the custom operation can be mathematically represented as a combination of exiting OpenVINO operations and such decomposition gives desired performance, then low-level operation implementation is not required. When deciding feasibility of such decomposition refer to the latest OpenVINO operation set. You can use any valid combination of exiting operations. How to map a custom operation is described in the next section of this document.
+
+If such decomposition is not possible or appears too bulky with lots of consisting operations that are not performing well, then a new class for the custom operation should be implemented as described in the [Custom Operation Guide](add_openvino_ops.md).
+
+Prefer implementing a custom operation class if you already have a generic C++ implementation of operation kernel. Otherwise try to decompose the operation first as described above and then after verifying correctness of inference and resulting performance, optionally invest to implementing bare metal C++ implementation.
+
+## Mapping from Framework Operation
+
+Depending on model format used for import, mapping of custom operation is implemented differently, choose one of:
+
+1. If model is represented in ONNX (including models exported from Pytorch in ONNX) or PaddlePaddle formats, then one of the classes from [Frontend Extension API](frontend_extensions.md) should be used. It consists of several classes available in C++ which can be used with Model Optimizer `--extensions` option or when model is imported directly to OpenVINO run-time using read_model method. Python API is also available for run-time model importing.
+
+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 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
+
+1. Implemented in C++ only
+
+2. Compiled as a separate shared library (see details how to do that later in this guide).
+
+You cannot write new frontend extensions using Python API if you plan to use them with Model Optimizer.
+
+Remaining part of this guide uses Frontend Extension API applicable for new frontends.
+
+## Registering Extensions
+
+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/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.
@@ -49,27 +75,50 @@ To load the extensions to the `ov::Core` object, use the `ov::Core::add_extensio
Extensions can be loaded from code with `ov::Core::add_extension` method:
+@sphinxtabset
+
+@sphinxtab{C++}
+
+@snippet docs/snippets/ov_extensions.cpp add_extension
+
+@endsphinxtab
+
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_extensions.py add_extension
+
+@endsphinxtab
+
+@endsphinxtabset
+
+`Identity` is custom operation class defined in [Custom Operation Guide](add_openvino_ops.md). This is enough to enable reading IR which uses `Identity` extension operation emitted by Model Optimizer. To be able to load original model directly to the runtime, you need to add also a mapping extension:
+
@sphinxdirective
.. tab:: C++
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
:language: cpp
- :fragment: add_extension
+ :fragment: add_frontend_extension
.. tab:: Python
.. doxygensnippet:: docs/snippets/ov_extensions.py
:language: python
- :fragment: add_extension
+ :fragment: add_frontend_extension
@endsphinxdirective
+
+When Python API is used there is no way to implement a custom OpenVINO operation. Also, even if custom OpenVINO operation is implemented in C++ and loaded to the runtime through a shared library, there is still no way to add a frontend mapping extension that refers to this custom operation. Use C++ shared library approach to implement both operations semantics and framework mapping in this case.
+
+You still can use Python for operation mapping and decomposition in case if operations from the standard OpenVINO operation set is used only.
### Create library with extensions
-You need to create extension library in following cases:
- - Load extensions to Model Optimizer
- - Load extensions to Python application
+You need to create extension library in the following cases:
+ - Convert model with custom operations in Model Optimizer
+ - Load model with custom operations in Python application. It is applicable for both framework model and IR.
+ - Loading models with custom operations in tools that support loading extensions from a library, for example `benchmark_app`.
If you want to create an extension library, for example in order to load these extensions to the Model Optimizer, you need to do next steps:
Create an entry point for extension library. OpenVINO™ provides an `OPENVINO_CREATE_EXTENSIONS()` macro, which allows to define an entry point to a library with OpenVINO™ Extensions.
@@ -97,24 +146,25 @@ $ cmake --build .
After the build you can use path to your extension library to load your extensions to OpenVINO™ Runtime:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_extensions.cpp
- :language: cpp
- :fragment: add_extension_lib
+@snippet docs/snippets/ov_extensions.cpp add_extension_lib
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_extensions.py
- :language: python
- :fragment: add_extension_lib
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_extensions.py add_extension_lib
+
+@endsphinxtab
+
+@endsphinxtabset
## See Also
* [OpenVINO Transformations](./ov_transformations.md)
-* [Using Inference Engine Samples](../OV_Runtime_UG/Samples_Overview.md)
+* [Using OpenVINO Runtime Samples](../OV_Runtime_UG/Samples_Overview.md)
* [Hello Shape Infer SSD sample](../../samples/cpp/hello_reshape_ssd/README.md)
+
diff --git a/docs/Extensibility_UG/add_openvino_ops.md b/docs/Extensibility_UG/add_openvino_ops.md
index 7c5ed06f1fd..c292060159d 100644
--- a/docs/Extensibility_UG/add_openvino_ops.md
+++ b/docs/Extensibility_UG/add_openvino_ops.md
@@ -1,4 +1,4 @@
-# Custom OpenVINO™ Operations {#openvino_docs_Extensibility_UG_add_openvino_ops}
+# 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.
@@ -20,14 +20,10 @@ Follow the steps below to add a custom operation:
5. Override the `visit_attributes` method, which enables serialization and deserialization of operation attributes. An `AttributeVisitor` is passed to the method, and the implementation is expected to walk over all the attributes in the op using the type-aware `on_attribute` helper. Helpers are already implemented for standard C++ types like `int64_t`, `float`, `bool`, `vector`, and for existing OpenVINO defined types.
-6. Override `evaluate`, which is an optional method that enables fallback of some devices to this implementation and the application of constant folding if there is a custom operation on the constant branch. If your operation contains `evaluate` method you also need to override the `has_evaluate` method, this method allow to get information about availability of `evaluate` method for the operation.
-
-7. Add the `OPENVINO_FRAMEWORK_MAP` macro if you want to map custom operation to framework operation with the same name. It is an optional macro which can be used for one to one mapping. In order to use this macro please include frontend specific headers:
- @snippet template_extension/new/identity.hpp op:frontend_include
+6. Override `evaluate`, which is an optional method that enables fallback of some devices to this implementation and the application of constant folding if there is a custom operation on the constant branch. If your operation contains `evaluate` method you also need to override the `has_evaluate` method, this method allows to get information about availability of `evaluate` method for the operation.
Based on that, declaration of an operation class can look as follows:
-@snippet template_extension/new/identity.hpp op:header
### Operation Constructors
@@ -55,8 +51,9 @@ OpenVINO™ operation contains two constructors:
@snippet template_extension/new/identity.cpp op:visit_attributes
-### `evaluate()` and `has_evaluate()`
+### evaluate() and has_evaluate()
`ov::Node::evaluate` method enables you to apply constant folding to an operation.
@snippet template_extension/new/identity.cpp op:evaluate
+
diff --git a/docs/Extensibility_UG/frontend_extensions.md b/docs/Extensibility_UG/frontend_extensions.md
new file mode 100644
index 00000000000..7ad109752f6
--- /dev/null
+++ b/docs/Extensibility_UG/frontend_extensions.md
@@ -0,0 +1,105 @@
+# Frontend Extensions {#openvino_docs_Extensibility_UG_Frontend_Extensions}
+
+The goal of this chapter is to explain how to use Frontend extension classes to facilitate mapping of custom operations from framework model representation to OpenVINO representation. Refer to [Introduction to OpenVINO Extension](Intro.md) to understand entire flow.
+
+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/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
+
+This section covers the case when a single operation in framework representation is mapped to a single operation in OpenVINO representation. This is called *one-to-one mapping*. There is `OpExtension` class that works well if all the following conditions are satisfied:
+
+1. Number of inputs to operation in the Framework representation is the same as in the OpenVINO representation.
+
+2. Number of outputs is also the same in both representations.
+
+3. Inputs can be indexed and are mapped in order correspondingly, e.g. input with index 0 in framework representation maps to input with index 0 in OpenVINO representation and so on.
+
+4. The same for outputs.
+
+5. Each attribute in OpenVINO operation can be initialized from one of the attributes of original operation or by some predefined constant value. Value of copied attributes cannot contain expressions, value is accepted as-is, so type of a value should be compatible.
+
+> **NOTE**: `OpExtension` class is currently available for ONNX frontend only. PaddlePaddle frontend has named inputs and outputs for operation (not indexed) therefore OpExtension mapping is not applicable for this case.
+
+The next example maps ONNX operation with type [“Identity”]( https://github.com/onnx/onnx/blob/main/docs/Operators.md#Identity) to OpenVINO template extension `Identity` class.
+
+@snippet ov_extensions.cpp frontend_extension_Identity_header
+@snippet ov_extensions.cpp frontend_extension_Identity
+
+The mapping doesn’t involve any attributes, as operation Identity doesn’t have them.
+
+Extension objects, like just constructed `extension` can be used to add to the OpenVINO runtime just before the loading a model that contains custom operations:
+
+@snippet ov_extensions.cpp frontend_extension_read_model
+
+Or extensions can be constructed in a separately compiled shared library. Separately compiled library can be used in Model Optimizer or `benchmark_app`. Read about how to build and load such library in chapter “Create library with extensions” in [Introduction to OpenVINO Extension](Intro.md).
+
+If operation have multiple inputs and/or outputs they will be mapped in order. The type of elements in input/output tensors should match expected types in the surrounding operations. For example, if custom operation produces `f32` data type then operation that consumes this output should also support `f32`. Otherwise, model conversion fails with an error, there are no automatic type conversion happens.
+
+### Converting to Standard OpenVINO Operation
+
+`OpExtension` class can be used when mapping to one of the operations from standard OpenVINO operation set is what you need and there is no class like `TemplateExtension::Identity` implemented.
+
+Here is an example for a custom framework operation “MyRelu”. Suppose it is mathematically equivalent to standard `Relu` that exists in OpenVINO operation set, but for some reason has type name “MyRelu”. In this case you can directly say that “MyRelu” -> `Relu` mapping should be used:
+
+@snippet ov_extensions.cpp frontend_extension_MyRelu
+
+In the resulting converted OpenVINO model, “MyRelu” operation will be replaced by the standard operation `Relu` from the latest available OpenVINO operation set. Notice that when standard operation is used, it can be specified using just a type string (“Relu”) instead of using a `ov::opset8::Relu` class name as a template parameter for `OpExtension`. This method is available for operations from the standard operation set only. For a user custom OpenVINO operation the corresponding class should be always specified as a template parameter as it was demonstrated with `TemplateExtension::Identity`.
+
+### Attributes Mapping
+
+As described above, `OpExtension` is useful when attributes can be mapped one by one or initialized by a constant. If the set of attributes in framework representation and OpenVINO representation completely match by their names and types, nothing should be specified in OpExtension constructor parameters. The attributes are discovered and mapped automatically based on `visit_attributes` method that should be defined for any OpenVINO operation.
+
+Imagine you have CustomOperation class implementation that has two attributes with names `attr1` and `attr2`:
+
+@snippet ov_extensions.cpp frontend_extension_CustomOperation
+
+And original model in framework representation also has operation with name “CustomOperatoin” with the same `attr1` and `attr2` attributes. Then with the following code:
+
+@snippet ov_extensions.cpp frontend_extension_CustomOperation_as_is
+
+both `attr1` and `attr2` are copied from framework representation to OpenVINO representation automatically. If for some reason names of attributes are different but values still can be copied “as-is” you can pass attribute names mapping in `OpExtension` constructor:
+
+@snippet ov_extensions.cpp frontend_extension_CustomOperation_rename
+
+Where `fw_attr1` and `fw_attr2` are names for corresponding attributes in framework operation representation.
+
+If copying of an attribute is not what you need, `OpExtension` also can set attribute to predefined constant value. For the same `CustomOperation`, imagine you want to set `attr2` to value 5 instead of copying from `fw_attr2`, to achieve that do the following:
+
+@snippet ov_extensions.cpp frontend_extension_CustomOperation_rename_set
+
+So the conclusion is that each attribute of target OpenVINO operation should be initialized either by
+
+1. Setting automatically due to name matching
+
+2. Mapped by attribute name
+
+3. Set to a constant value
+
+This is achieved by specifying maps as arguments for `OpExtension` constructor.
+
+
+## Mapping to Multiple Operations with ConversionExtension
+
+Previous sections cover the case when a single operation is mapped to a single operation with optional adjustment in names and attribute values. That is likely enough for your own custom operation with existing C++ kernel implementation. In this case your framework representation and OpenVINO representation for the operation are under your control and inputs/outpus/attributes can be aligned to make `OpExtension` usable.
+
+In case if one-to-one mapping is not possible, *decomposition to multiple operations* should be considered. It is achieved by using more verbose and less automated `ConversionExtension` class. It enables writing arbitrary code to replace a single framework operation by multiple connected OpenVINO operations constructing dependency graph of any complexity.
+
+`ConversionExtension` maps a single operation to a function which builds a graph using OpenVINO operation classes. Follow chapter [Build a Model in OpenVINO Runtime](@ref ov_ug_build_model) to learn how to use OpenVINO operation classes to build a fragment of model for replacement.
+
+The next example illustrates using `ConversionExtension` for conversion of “ThresholdedRelu” from ONNX according to the formula: `ThresholdedRelu(x, alpha) -> Multiply(x, Convert(Greater(x, alpha), type=float))`.
+
+> **NOTE**: `ThresholdedRelu` is one of the standard ONNX operators which is supported by ONNX frontend natively out-of-the-box. Here we are re-implementing it to illustrate how you can add a similar support for your custom operation instead of `ThresholdedRelu`.
+
+@snippet ov_extensions.cpp frontend_extension_ThresholdedReLU_header
+@snippet ov_extensions.cpp frontend_extension_ThresholdedReLU
+
+To access original framework operation attribute value and connect to inputs, `node` object of type `NodeContext` is used. It has two main methods:
+
+* `NodeContext::get_input` to get input with a given index,
+
+* `NodeContext::get_attribute` to get attribute value with a given name.
+
+The conversion function should return a vector of node outputs that are mapped to corresponding outputs of the original framework operation in the same order.
+
diff --git a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/lpt.md b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/lpt.md
index dc7e2db4f78..07c21dcaa9d 100644
--- a/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/lpt.md
+++ b/docs/IE_PLUGIN_DG/plugin_transformation_pipeline/low_precision_transformations/lpt.md
@@ -236,11 +236,11 @@ This step is optional. It modifies the nGraph function to a device-specific oper
Let's explore quantized [TensorFlow* implementation of ResNet-50](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/resnet-50-tf) model. Use [Model Downloader](@ref omz_tools_downloader) tool to download the `fp16` model from [OpenVINO™ Toolkit - Open Model Zoo repository](https://github.com/openvinotoolkit/open_model_zoo):
```sh
-./downloader.py --name resnet-50-tf --precisions FP16-INT8
+omz_downloader --name resnet-50-tf --precisions FP16-INT8
```
After that you should quantize model by the [Model Quantizer](@ref omz_tools_downloader) tool.
```sh
-./quantizer.py --model_dir public/resnet-50-tf --dataset_dir --precisions=FP16-INT8
+omz_quantizer --model_dir public/resnet-50-tf --dataset_dir --precisions=FP16-INT8
```
### Inference
@@ -259,7 +259,7 @@ Result model depends on different factors:
Information about layer precision is stored in the performance counters that are
-available from the Inference Engine API. For example, the part of performance counters table for quantized [TensorFlow* implementation of ResNet-50](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/resnet-50-tf) model inference on CPU Plugin looks as follows:
+available from the OpenVINO Runtime API. For example, the part of performance counters table for quantized [TensorFlow* implementation of ResNet-50](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/resnet-50-tf) model inference on CPU Plugin looks as follows:
| layerName | execStatus | layerType | execType | realTime (ms) | cpuTime (ms) |
diff --git a/docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md b/docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md
index 0fa581a39ab..52c92f6174b 100644
--- a/docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md
+++ b/docs/MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md
@@ -1,4 +1,4 @@
-# Model Optimizer User Guide {#openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide}
+# Convert model with Model Optimizer {#openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide}
@sphinxdirective
diff --git a/docs/MO_DG/prepare_model/Getting_performance_numbers.md b/docs/MO_DG/prepare_model/Getting_performance_numbers.md
index be253fc5709..419b2162a51 100644
--- a/docs/MO_DG/prepare_model/Getting_performance_numbers.md
+++ b/docs/MO_DG/prepare_model/Getting_performance_numbers.md
@@ -9,7 +9,7 @@ When evaluating performance of your model with the OpenVINO Runtime, you must me
- Track separately the operations that happen outside the OpenVINO Runtime, like video decoding.
-> **NOTE**: Some image pre-processing can be baked into the IR and accelerated accordingly. For more information, refer to [Embedding the Preprocessing](Additional_Optimizations.md). Also consider [_runtime_ preprocessing optimizations](../../optimization_guide/dldt_deployment_optimization_common).
+> **NOTE**: Some image pre-processing can be baked into the IR and accelerated accordingly. For more information, refer to [Embedding the Preprocessing](Additional_Optimizations.md). Also consider [Runtime Optimizations of the Preprocessing](../../optimization_guide/dldt_deployment_optimization_common).
## Tip 2. Getting Credible Performance Numbers
@@ -53,17 +53,32 @@ When comparing the OpenVINO Runtime performance with the framework or another re
Further, finer-grained insights into inference performance breakdown can be achieved with device-specific performance counters and/or execution graphs.
Both [C++](../../../samples/cpp/benchmark_app/README.md) and [Python](../../../tools/benchmark_tool/README.md) versions of the `benchmark_app` supports a `-pc` command-line parameter that outputs internal execution breakdown.
-Below is example of CPU plugin output for a network (since the device is CPU, the layers wall clock `realTime` and the `cpu` time are the same):
+For example, below is the part of performance counters for quantized [TensorFlow* implementation of ResNet-50](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/resnet-50-tf) model inference on [CPU Plugin](../../OV_Runtime_UG/supported_plugins/CPU.md).
+Notice that since the device is CPU, the layers wall clock `realTime` and the `cpu` time are the same. Information about layer precision is also stored in the performance counters.
+
+| layerName | execStatus | layerType | execType | realTime (ms) | cpuTime (ms) |
+| --------------------------------------------------------- | ---------- | ------------ | -------------------- | ------------- | ------------ |
+| resnet\_model/batch\_normalization\_15/FusedBatchNorm/Add | EXECUTED | Convolution | jit\_avx512\_1x1\_I8 | 0.377 | 0.377 |
+| resnet\_model/conv2d\_16/Conv2D/fq\_input\_0 | NOT\_RUN | FakeQuantize | undef | 0 | 0 |
+| resnet\_model/batch\_normalization\_16/FusedBatchNorm/Add | EXECUTED | Convolution | jit\_avx512\_I8 | 0.499 | 0.499 |
+| resnet\_model/conv2d\_17/Conv2D/fq\_input\_0 | NOT\_RUN | FakeQuantize | undef | 0 | 0 |
+| resnet\_model/batch\_normalization\_17/FusedBatchNorm/Add | EXECUTED | Convolution | jit\_avx512\_1x1\_I8 | 0.399 | 0.399 |
+| resnet\_model/add\_4/fq\_input\_0 | NOT\_RUN | FakeQuantize | undef | 0 | 0 |
+| resnet\_model/add\_4 | NOT\_RUN | Eltwise | undef | 0 | 0 |
+| resnet\_model/add\_5/fq\_input\_1 | NOT\_RUN | FakeQuantize | undef | 0 | 0 |
+
+
+ The `exeStatus` column of the table includes possible values:
+ - `EXECUTED` - layer was executed by standalone primitive,
+ - `NOT_RUN` - layer was not executed by standalone primitive or was fused with another operation and executed in another layer primitive.
+
+ The `execType` column of the table includes inference primitives with specific suffixes. The layers have the following marks:
+ * Suffix `I8` for layers that had 8-bit data type input and were computed in 8-bit precision
+ * Suffix `FP32` for layers computed in 32-bit precision
+
+ All `Convolution` layers are executed in int8 precision. Rest layers are fused into Convolutions using post operations optimization technique, which is described in [Internal CPU Plugin Optimizations](../../OV_Runtime_UG/supported_plugins/CPU.md).
+ This contains layers name (as seen in IR), layers type and execution statistics.
-```
-conv1 EXECUTED layerType: Convolution realTime: 706 cpu: 706 execType: jit_avx2
-conv2_1_x1 EXECUTED layerType: Convolution realTime: 137 cpu: 137 execType: jit_avx2_1x1
-fc6 EXECUTED layerType: Convolution realTime: 233 cpu: 233 execType: jit_avx2_1x1
-fc6_nChw8c_nchw EXECUTED layerType: Reorder realTime: 20 cpu: 20 execType: reorder
-out_fc6 EXECUTED layerType: Output realTime: 3 cpu: 3 execType: unknown
-relu5_9_x2 OPTIMIZED_OUT layerType: ReLU realTime: 0 cpu: 0 execType: undef
-```
-This contains layers name (as seen in IR), layers type and execution statistics. Notice the `OPTIMIZED_OUT`, which indicates that the particular activation was fused into adjacent convolution.
Both benchmark_app versions also support "exec_graph_path" command-line option governing the OpenVINO to output the same per-layer execution statistics, but in the form of the plugin-specific [Netron-viewable](https://netron.app/) graph to the specified file.
Notice that on some devices, the execution graphs/counters may be pretty intrusive overhead-wise.
@@ -71,4 +86,4 @@ Also, especially when performance-debugging the [latency case](../../optimizatio
Finally, the performance statistics with both performance counters and execution graphs is averaged, so such a data for the [dynamically-shaped inputs](../../OV_Runtime_UG/ov_dynamic_shapes.md) should be measured carefully (ideally by isolating the specific shape and executing multiple times in a loop, to gather the reliable data).
-OpenVINO in general and individual plugins are heavily instrumented with Intel® instrumentation and tracing technology (ITT), so another option is to compile the OpenVINO from the source code with the ITT enabled and using tools like [Intel® VTune™ Profiler](https://software.intel.com/en-us/vtune) to get detailed inference performance breakdown and additional insights in the application-level performance on the timeline view.
\ No newline at end of file
+OpenVINO in general and individual plugins are heavily instrumented with Intel® instrumentation and tracing technology (ITT), so another option is to compile the OpenVINO from the source code with the ITT enabled and using tools like [Intel® VTune™ Profiler](https://software.intel.com/en-us/vtune) to get detailed inference performance breakdown and additional insights in the application-level performance on the timeline view.
diff --git a/docs/MO_DG/prepare_model/convert_model/Convert_Model_From_ONNX.md b/docs/MO_DG/prepare_model/convert_model/Convert_Model_From_ONNX.md
index 08dacd50aa6..70baf49263d 100644
--- a/docs/MO_DG/prepare_model/convert_model/Convert_Model_From_ONNX.md
+++ b/docs/MO_DG/prepare_model/convert_model/Convert_Model_From_ONNX.md
@@ -1,4 +1,4 @@
-# Converting a ONNX* Model {#openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_ONNX}
+# Converting an ONNX Model {#openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_ONNX}
## Introduction to ONNX
[ONNX*](https://github.com/onnx/onnx) is a representation format for deep learning models. ONNX allows AI developers easily transfer models between different frameworks that helps to choose the best combination for them. Today, PyTorch\*, Caffe2\*, Apache MXNet\*, Microsoft Cognitive Toolkit\* and other tools are developing ONNX support.
diff --git a/docs/MO_DG/prepare_model/convert_model/Converting_Model.md b/docs/MO_DG/prepare_model/convert_model/Converting_Model.md
index e21acb7139d..6cfd5a77304 100644
--- a/docs/MO_DG/prepare_model/convert_model/Converting_Model.md
+++ b/docs/MO_DG/prepare_model/convert_model/Converting_Model.md
@@ -12,7 +12,7 @@ This is an offline approach to set static shapes and it can save time and memory
To learn more about runtime shape change please see a dedicated article about [reshape feature](../../../OV_Runtime_UG/ShapeInference.md).
For more information about the dynamic shapes, refer to [Dynamic Shapes](../../../OV_Runtime_UG/ov_dynamic_shapes.md)
-OpenVINO Runtime API can have limitations to infer models with undefined dimensions on some hardware.
+OpenVINO Runtime API can have limitations to infer models with undefined dimensions on some hardware (see [Features support matrix](../../../OV_Runtime_UG/supported_plugins/Device_Plugins.md) for reference).
In this case, the `--input_shape` parameter and the [reshape method](../../../OV_Runtime_UG/ShapeInference.md) can help resolving undefined dimensions.
Sometimes Model Optimizer is unable to convert models out-of-the-box (only the `--input_model` parameter is specified).
diff --git a/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_GNMT_From_Tensorflow.md b/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_GNMT_From_Tensorflow.md
index a50f2dcacce..36f7066f388 100644
--- a/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_GNMT_From_Tensorflow.md
+++ b/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_GNMT_From_Tensorflow.md
@@ -240,7 +240,7 @@ Outputs of the model:
1. With benchmark app:
```sh
-python3 benchmark_app.py -m -d CPU
+benchmark_app -m -d CPU
```
diff --git a/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_RetinaNet_From_Tensorflow.md b/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_RetinaNet_From_Tensorflow.md
index 510ff2f5862..cc7e1b584f2 100644
--- a/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_RetinaNet_From_Tensorflow.md
+++ b/docs/MO_DG/prepare_model/convert_model/tf_specific/Convert_RetinaNet_From_Tensorflow.md
@@ -3,7 +3,7 @@
This tutorial explains how to convert RetinaNet model to the Intermediate Representation (IR).
[Public RetinaNet model](https://github.com/fizyr/keras-retinanet) does not contain pretrained TensorFlow\* weights.
-To convert this model to the TensorFlow\* format, you can use [Reproduce Keras* to TensorFlow* Conversion tutorial](https://docs.openvino.ai/latest/omz_models_model_retinanet_tf.html).
+To convert this model to the TensorFlow\* format, you can use [Reproduce Keras* to TensorFlow* Conversion tutorial](@ref omz_models_model_retinanet_tf).
After you convert the model to TensorFlow* format, run the Model Optimizer command below:
```sh
diff --git a/docs/OV_Runtime_UG/Int8Inference.md b/docs/OV_Runtime_UG/Int8Inference.md
index 20f002b2a29..2ff1180b977 100644
--- a/docs/OV_Runtime_UG/Int8Inference.md
+++ b/docs/OV_Runtime_UG/Int8Inference.md
@@ -30,14 +30,12 @@ At runtime, the quantized model is loaded to the plugin. The plugin uses the `Lo
Let's explore quantized [TensorFlow* implementation of the ResNet-50](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/resnet-50-tf) model. Use [Model Downloader](@ref omz_tools_downloader) to download the `FP16` model from [OpenVINO™ Toolkit - Open Model Zoo repository](https://github.com/openvinotoolkit/open_model_zoo):
-> **NOTE**: If you installed OpenVINO with pip, use `omz_downloader` and `omz_quantizer` instead of `download.py` and `quantize.py`. See [Open Model Zoo documentation](https://github.com/openvinotoolkit/open_model_zoo/tree/master/tools/model_tools#model-downloader-usage). Replace `./benchmark_app` with `benchmark_app`.
-
```sh
-/tools/downloader/downloader.py --name resnet-50-tf --precisions FP16-INT8
+omz_downloader --name resnet-50-tf --precisions FP16-INT8
```
After that you should quantize the model with the [Model Quantizer](@ref omz_tools_downloader) tool.
```sh
-/tools/downloader/quantizer.py --model_dir public/resnet-50-tf --dataset_dir --precisions=FP16-INT8
+omz_quantizer --model_dir public/resnet-50-tf --dataset_dir --precisions=FP16-INT8
```
The simplest way to infer the model and collect performance counters is the [Benchmark Application](../../samples/cpp/benchmark_app/README.md):
@@ -61,30 +59,3 @@ For 8-bit integer computations, a model must be quantized. Quantized models can
![int8_flow]
-## Performance Counters
-
-Information about layer precision is stored in the performance counters that are
-available from the Inference Engine API. For example, the part of performance counters table for quantized [TensorFlow* implementation of ResNet-50](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/resnet-50-tf) model inference on [CPU Plugin](supported_plugins/CPU.md) looks as follows:
-
-
-| layerName | execStatus | layerType | execType | realTime (ms) | cpuTime (ms) |
-| --------------------------------------------------------- | ---------- | ------------ | -------------------- | ------------- | ------------ |
-| resnet\_model/batch\_normalization\_15/FusedBatchNorm/Add | EXECUTED | Convolution | jit\_avx512\_1x1\_I8 | 0.377 | 0.377 |
-| resnet\_model/conv2d\_16/Conv2D/fq\_input\_0 | NOT\_RUN | FakeQuantize | undef | 0 | 0 |
-| resnet\_model/batch\_normalization\_16/FusedBatchNorm/Add | EXECUTED | Convolution | jit\_avx512\_I8 | 0.499 | 0.499 |
-| resnet\_model/conv2d\_17/Conv2D/fq\_input\_0 | NOT\_RUN | FakeQuantize | undef | 0 | 0 |
-| resnet\_model/batch\_normalization\_17/FusedBatchNorm/Add | EXECUTED | Convolution | jit\_avx512\_1x1\_I8 | 0.399 | 0.399 |
-| resnet\_model/add\_4/fq\_input\_0 | NOT\_RUN | FakeQuantize | undef | 0 | 0 |
-| resnet\_model/add\_4 | NOT\_RUN | Eltwise | undef | 0 | 0 |
-| resnet\_model/add\_5/fq\_input\_1 | NOT\_RUN | FakeQuantize | undef | 0 | 0 |
-
-
- The `exeStatus` column of the table includes possible values:
- - `EXECUTED` - layer was executed by standalone primitive,
- - `NOT_RUN` - layer was not executed by standalone primitive or was fused with another operation and executed in another layer primitive.
-
- The `execType` column of the table includes inference primitives with specific suffixes. The layers have the following marks:
- * Suffix `I8` for layers that had 8-bit data type input and were computed in 8-bit precision
- * Suffix `FP32` for layers computed in 32-bit precision
-
- All `Convolution` layers are executed in int8 precision. Rest layers are fused into Convolutions using post operations optimization technique, which is described in [Internal CPU Plugin Optimizations](supported_plugins/CPU.md).
diff --git a/docs/OV_Runtime_UG/PythonPackage_Overview.md b/docs/OV_Runtime_UG/PythonPackage_Overview.md
deleted file mode 100644
index 5e03eb3295c..00000000000
--- a/docs/OV_Runtime_UG/PythonPackage_Overview.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# OpenVINO™ Python* Package
-
-OpenVINO™ Python\* package includes types to measure model and calibrate to low precision.
-
-The OpenVINO™ Python\* package available in the `/python/python3.X` directory.
-
-The OpenVINO™ Python\* package includes the following sub-packages:
-
- - [openvino.inference_engine](../../src/bindings/python/docs/api_overview.md) - Python\* wrapper on OpenVINO™ Inference Engine.
- - `openvino.tools.accuracy_checker` - Measure accuracy.
- - `openvino.tools.benchmark` - Measure latency and throughput.
-
-## See Also
-* [Integrate with Customer Application New API](integrate_with_your_application.md)
diff --git a/docs/OV_Runtime_UG/Python_API_exclusives.md b/docs/OV_Runtime_UG/Python_API_exclusives.md
index 3d3375acb34..92e9fa0266d 100644
--- a/docs/OV_Runtime_UG/Python_API_exclusives.md
+++ b/docs/OV_Runtime_UG/Python_API_exclusives.md
@@ -6,25 +6,13 @@ OpenVINO™ Runtime Python API is exposing additional features and helpers to el
`CompiledModel` can be easily created with the helper method. It hides `Core` creation and applies `AUTO` device by default.
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [auto_compilation]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py auto_compilation
## Model/CompiledModel inputs and outputs
Besides functions aligned to C++ API, some of them have their Pythonic counterparts or extensions. For example, `Model` and `CompiledModel` inputs/outputs can be accessed via properties.
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [properties_example]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py properties_example
Refer to Python API documentation on which helper functions or properties are available for different classes.
@@ -32,37 +20,19 @@ Refer to Python API documentation on which helper functions or properties are av
Python API allows passing data as tensors. `Tensor` object holds a copy of the data from the given array. `dtype` of numpy arrays is converted to OpenVINO™ types automatically.
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [tensor_basics]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py tensor_basics
### Shared memory mode
`Tensor` objects can share the memory with numpy arrays. By specifing `shared_memory` argument, a `Tensor` object does not perform copy of data and has access to the memory of the numpy array.
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [tensor_shared_mode]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py tensor_shared_mode
### Slices of array's memory
One of the `Tensor` class constructors allows to share the slice of array's memory. When `shape` is specified in the constructor that has the numpy array as first argument, it triggers the special shared memory mode.
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [tensor_slice_mode]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py tensor_slice_mode
## Running inference
@@ -70,35 +40,17 @@ Python API supports extra calling methods to synchronous and asynchronous modes
All infer methods allow users to pass data as popular numpy arrays, gathered in either Python dicts or lists.
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [passing_numpy_array]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py passing_numpy_array
Results from inference can be obtained in various ways:
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [getting_results]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py getting_results
### Synchronous mode - extended
Python API provides different synchronous calls to infer model, which block the application execution. Additionally these calls return results of inference:
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [sync_infer]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py sync_infer
### AsyncInferQueue
@@ -108,25 +60,13 @@ Each job is distinguishable by unique `id`, which is in the range from 0 up to n
Function call `start_async` is not required to be synchronized, it waits for any available job if queue is busy/overloaded. Every `AsyncInferQueue` code block should end with `wait_all` function. It provides "global" synchronization of all jobs in the pool and ensure that access to them is safe.
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [asyncinferqueue]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py asyncinferqueue
#### Acquire results from requests
After the call to `wait_all`, jobs and their data can be safely accessed. Acquring of a specific job with `[id]` returns `InferRequest` object, which results in seamless retrieval of the output data.
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [asyncinferqueue_access]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py asyncinferqueue_access
#### Setting callbacks
@@ -134,10 +74,4 @@ Another feature of `AsyncInferQueue` is ability of setting callbacks. When callb
The callback of `AsyncInferQueue` is uniform for every job. When executed, GIL is acquired to ensure safety of data manipulation inside the function.
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_python_exclusives.py
- :language: python
- :fragment: [asyncinferqueue_set_callback]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_python_exclusives.py asyncinferqueue_set_callback
diff --git a/docs/OV_Runtime_UG/ShapeInference.md b/docs/OV_Runtime_UG/ShapeInference.md
index 85b7cb75c61..a8b1ef80570 100644
--- a/docs/OV_Runtime_UG/ShapeInference.md
+++ b/docs/OV_Runtime_UG/ShapeInference.md
@@ -39,6 +39,8 @@ There are other approaches to change model input shapes during the stage of
@@ -103,7 +105,7 @@ For example, [publicly available Inception family models from TensorFlow*](https
- Changing the model input shape may significantly affect its accuracy.
For example, Object Detection models from TensorFlow have resizing restrictions by design.
To keep the model valid after the reshape, choose a new input shape that satisfies conditions listed in the `pipeline.config` file.
-For details, refer to the Tensorflow Object Detection API models resizing techniques.
+For details, refer to the Tensorflow Object Detection API models resizing techniques.
### How To Fix Non-Reshape-able Model
@@ -179,6 +181,8 @@ There are other approaches to change model input shapes during the stage of
@@ -230,7 +234,7 @@ Dictionary values (representing new shapes) could be
@endsphinxdirective
-Please find usage scenarios of `reshape` feature in our [samples](Samples_Overview.md) and [demos](ToDo), starting with [Hello Reshape Sample](../../samples/python/hello_reshape_ssd/README.html)
+Please find usage scenarios of `reshape` feature in our [samples](Samples_Overview.md), starting with [Hello Reshape Sample](../../samples/python/hello_reshape_ssd/README.html)
Practically, some models are not ready to be reshaped. In this case, a new input shape cannot be set with the Model Optimizer or the `Model.reshape` method.
diff --git a/docs/OV_Runtime_UG/auto_device_selection.md b/docs/OV_Runtime_UG/auto_device_selection.md
index bfb65a51dbf..d1a388be676 100644
--- a/docs/OV_Runtime_UG/auto_device_selection.md
+++ b/docs/OV_Runtime_UG/auto_device_selection.md
@@ -205,14 +205,14 @@ For unlimited device choice:
@sphinxdirective
.. code-block:: sh
- ./benchmark_app –d AUTO –m -i -niter 1000
+ benchmark_app –d AUTO –m -i -niter 1000
@endsphinxdirective
For limited device choice:
@sphinxdirective
.. code-block:: sh
- ./benchmark_app –d AUTO:CPU,GPU,MYRIAD –m -i -niter 1000
+ benchmark_app –d AUTO:CPU,GPU,MYRIAD –m -i -niter 1000
@endsphinxdirective
For more information, refer to the [C++](../../samples/cpp/benchmark_app/README.md) or [Python](../../tools/benchmark_tool/README.md) version instructions.
diff --git a/docs/OV_Runtime_UG/automatic_batching.md b/docs/OV_Runtime_UG/automatic_batching.md
index d21fe94b61e..54c1a6d26a3 100644
--- a/docs/OV_Runtime_UG/automatic_batching.md
+++ b/docs/OV_Runtime_UG/automatic_batching.md
@@ -9,77 +9,86 @@ The feature primarily targets existing code written for inferencing many request
As explained below, the auto-batching functionality can be also used via a special *virtual* device.
Batching is a straightforward way of leveraging the GPU compute power and saving on communication overheads. The automatic batching is _implicitly_ triggered on the GPU when the `ov::hint::PerformanceMode::THROUGHPUT` is specified for the `ov::hint::performance_mode` property for the compile_model or set_property calls.
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_auto_batching.cpp
- :language: cpp
- :fragment: [compile_model]
+@sphinxtab{C++}
-.. tab:: Python
+@snippet docs/snippets/ov_auto_batching.cpp compile_model
+
+@endsphinxtab
+
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_auto_batching.py compile_model
+
+@endsphinxtab
+
+@endsphinxtabset
- .. doxygensnippet:: docs/snippets/ov_auto_batching.py
- :language: python
- :fragment: [compile_model]
-@endsphinxdirective
> **NOTE**: You can disable the Auto-Batching (for example, for the GPU device) from being triggered by the `ov::hint::PerformanceMode::THROUGHPUT`. To do that, pass the `ov::hint::allow_auto_batching` set to **false** in addition to the `ov::hint::performance_mode`:
-@sphinxdirective
-.. tab:: C++
- .. doxygensnippet:: docs/snippets/ov_auto_batching.cpp
- :language: cpp
- :fragment: [compile_model_no_auto_batching]
+@sphinxtabset
-.. tab:: Python
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_auto_batching.py
- :language: python
- :fragment: [compile_model_no_auto_batching]
+@snippet docs/snippets/ov_auto_batching.cpp compile_model_no_auto_batching
-@endsphinxdirective
+@endsphinxtab
+
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_auto_batching.py compile_model_no_auto_batching
+
+@endsphinxtab
+
+@endsphinxtabset
Alternatively, to enable the Auto-Batching in the legacy apps not akin to the notion of the performance hints, you may need to use the **explicit** device notion, such as 'BATCH:GPU'. In both cases (the *throughput* hint or explicit BATCH device), the optimal batch size selection happens automatically (the implementation queries the `ov::optimal_batch_size` property from the device, passing the model's graph as the parameter). The actual value depends on the model and device specifics, for example, on-device memory for the dGPUs.
Auto-Batching support is not limited to the GPUs, but if a device does not support the `ov::optimal_batch_size` yet, it can work with the auto-batching only when specifying an explicit batch size, for example, "BATCH:(16)".
This _automatic batch size selection_ assumes that the application queries the `ov::optimal_number_of_infer_requests` to create and run the returned number of requests simultaneously:
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_auto_batching.cpp
- :language: cpp
- :fragment: [query_optimal_num_requests]
+@sphinxtab{C++}
-.. tab:: Python
+@snippet docs/snippets/ov_auto_batching.cpp query_optimal_num_requests
- .. doxygensnippet:: docs/snippets/ov_auto_batching.py
- :language: python
- :fragment: [query_optimal_num_requests]
+@endsphinxtab
+
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_auto_batching.py query_optimal_num_requests
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
If not enough inputs were collected, the `timeout` value makes the transparent execution fall back to the execution of individual requests. Configuration-wise, this is the AUTO_BATCH_TIMEOUT property.
The timeout, which adds itself to the execution time of the requests, heavily penalizes the performance. To avoid this, in cases when your parallel slack is bounded, give the OpenVINO an additional hint.
For example, the application processes only 4 video streams, so there is no need to use a batch larger than 4. The most future-proof way to communicate the limitations on the parallelism is to equip the performance hint with the optional `ov::hint::num_requests` configuration key set to 4. For the GPU this will limit the batch size, for the CPU - the number of inference streams, so each device uses the `ov::hint::num_requests` while converting the hint to the actual device configuration options:
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_auto_batching.cpp
- :language: cpp
- :fragment: [hint_num_requests]
+@sphinxtab{C++}
-.. tab:: Python
+@snippet docs/snippets/ov_auto_batching.cpp hint_num_requests
- .. doxygensnippet:: docs/snippets/ov_auto_batching.py
- :language: python
- :fragment: [hint_num_requests]
+@endsphinxtab
+
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_auto_batching.py hint_num_requests
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
For the *explicit* usage, you can limit the batch size using "BATCH:GPU(4)", where 4 is the number of requests running in parallel.
@@ -89,6 +98,7 @@ To achieve the best performance with the Automatic Batching, the application sho
- Operate the number of inference requests that represents the multiple of the batch size. In the above example, for batch size 4, the application should operate 4, 8, 12, 16, etc. requests.
- Use the requests, grouped by the batch size, together. For example, the first 4 requests are inferred, while the second group of the requests is being populated. Essentially, the Automatic Batching shifts the asynchronousity from the individual requests to the groups of requests that constitute the batches.
- Balance the 'timeout' value vs the batch size. For example, in many cases having a smaller timeout value/batch size may yield better performance than large batch size, but with the timeout value that is not large enough to accommodate the full number of the required requests.
+ - When the Automatic Batching is enabled, the 'timeout' property of the `ov::CompiledModel` can be changed any time, even after model loading/compilation. For example, setting the value to 0 effectively disables the auto-batching, as requests' collection would be omitted.
- Carefully apply the auto-batching to the pipelines. For example for the conventional video-sources->detection->classification flow, it is the most benefical to do auto-batching over the inputs to the detection stage. Whereas the resulting number of detections is usually fluent, which makes the auto-batching less applicable for the classification stage.
The following are limitations of the current implementations:
@@ -110,11 +120,12 @@ Following the OpenVINO convention for devices names, the *batching* device is na
### Testing Automatic Batching Performance with the Benchmark_App
The `benchmark_app`, that exists in both [C++](../../samples/cpp/benchmark_app/README.md) and [Python](../../tools/benchmark_tool/README.md) versions, is the best way to evaluate the performance of the Automatic Batching:
- The most straighforward way is performance hints:
-- - benchmark_app **-hint tput** -d GPU -m 'path to your favorite model'
+ - benchmark_app **-hint tput** -d GPU -m 'path to your favorite model'
- Overriding the strict rules of implicit reshaping by the batch dimension via the explicit device notion:
-- - benchmark_app **-hint none -d BATCH:GPU** -m 'path to your favorite model'
+ - benchmark_app **-hint none -d BATCH:GPU** -m 'path to your favorite model'
- Finally, overriding the automatically-deduced batch size as well:
-- - $benchmark_app -hint none -d **BATCH:GPU(16)** -m 'path to your favorite model'
+ - $benchmark_app -hint none -d **BATCH:GPU(16)** -m 'path to your favorite model'
+ - notice that some shell versions (e.g. `bash`) may require adding quotes around complex device names, i.e. -d "BATCH:GPU(16)"
The last example is also applicable to the CPU or any other device that generally supports the batched execution.
diff --git a/docs/install_guides/deployment-manager-tool.md b/docs/OV_Runtime_UG/deployment/deployment-manager-tool.md
similarity index 52%
rename from docs/install_guides/deployment-manager-tool.md
rename to docs/OV_Runtime_UG/deployment/deployment-manager-tool.md
index 23e1ecebbae..59b91a89f3b 100644
--- a/docs/install_guides/deployment-manager-tool.md
+++ b/docs/OV_Runtime_UG/deployment/deployment-manager-tool.md
@@ -1,4 +1,4 @@
-# OpenVINO™ Deployment Manager Guide {#openvino_docs_install_guides_deployment_manager_tool}
+# Deployment Manager {#openvino_docs_install_guides_deployment_manager_tool}
The Deployment Manager is a Python* command-line tool that creates a deployment package by assembling the model, IR files, your application, and associated dependencies into a runtime package for your target device. This tool is delivered within the Intel® Distribution of OpenVINO™ toolkit for Linux*, Windows* and macOS* release packages and is available after installation in the `/tools/deployment_manager` directory.
@@ -6,17 +6,18 @@ The Deployment Manager is a Python* command-line tool that creates a deployment
* Intel® Distribution of OpenVINO™ toolkit
* To run inference on a target device other than CPU, device drivers must be pre-installed:
- * **For Linux**, see the following sections in the [installation instructions for Linux](../install_guides/installing-openvino-linux.md):
- * Steps for Intel® Processor Graphics (GPU) section
- * Steps for Intel® Neural Compute Stick 2 section
- * Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
- * **For Windows**, see the following sections in the [installation instructions for Windows](../install_guides/installing-openvino-windows.md):
- * Steps for Intel® Processor Graphics (GPU)
- * Steps for the Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
- * **For macOS**, see the following section in the [installation instructions for macOS](../install_guides/installing-openvino-macos.md):
- * Steps for Intel® Neural Compute Stick 2 section
-
-> **IMPORTANT**: The operating system on the target system must be the same as the development system on which you are creating the package. For example, if the target system is Ubuntu 18.04, the deployment package must be created from the OpenVINO™ toolkit installed on Ubuntu 18.04.
+ * **For Linux**, see the following sections in the [installation instructions for Linux](../../install_guides/installing-openvino-linux.md):
+ * Steps for [Intel® Processor Graphics (GPU)](../../install_guides/configurations-for-intel-gpu.md) section
+ * Steps for [Intel® Neural Compute Stick 2 section](../../install_guides/configurations-for-ncs2.md)
+ * Steps for [Intel® Vision Accelerator Design with Intel® Movidius™ VPUs](../../install_guides/installing-openvino-config-ivad-vpu.md)
+ * Steps for [Intel® Gaussian & Neural Accelerator (GNA)](../../install_guides/configurations-for-intel-gna.md)
+ * **For Windows**, see the following sections in the [installation instructions for Windows](../../install_guides/installing-openvino-windows.md):
+ * Steps for [Intel® Processor Graphics (GPU)](../../install_guides/configurations-for-intel-gpu.md)
+ * Steps for the [Intel® Vision Accelerator Design with Intel® Movidius™ VPUs](../../install_guides/installing-openvino-config-ivad-vpu.md)
+ * **For macOS**, see the following section in the [installation instructions for macOS](../../install_guides/installing-openvino-macos.md):
+ * Steps for [Intel® Neural Compute Stick 2 section](../../install_guides/configurations-for-ncs2.md)
+
+> **IMPORTANT**: The operating system on the target system must be the same as the development system on which you are creating the package. For example, if the target system is Ubuntu 18.04, the deployment package must be created from the OpenVINO™ toolkit installed on Ubuntu 18.04.
> **TIP**: If your application requires additional dependencies, including the Microsoft Visual C++ Redistributable, use the ['--user_data' option](https://docs.openvino.ai/latest/openvino_docs_install_guides_deployment_manager_tool.html#run-standard-cli-mode) to add them to the deployment archive. Install these dependencies on the target host before running inference.
@@ -31,77 +32,77 @@ There are two ways to create a deployment package that includes inference-relate
.. raw:: html
-
+
@endsphinxdirective
-
+
Interactive mode provides a user-friendly command-line interface that will guide you through the process with text prompts.
-1. To launch the Deployment Manager in interactive mode, open a new terminal window, go to the Deployment Manager tool directory and run the tool script without parameters:
+To launch the Deployment Manager in interactive mode, open a new terminal window, go to the Deployment Manager tool directory and run the tool script without parameters:
- @sphinxdirective
+@sphinxdirective
- .. tab:: Linux
-
- .. code-block:: sh
-
- cd /tools/deployment_manager
+.. tab:: Linux
- ./deployment_manager.py
+ .. code-block:: sh
- .. tab:: Windows
-
- .. code-block:: bat
+ cd /tools/deployment_manager
+
+ ./deployment_manager.py
+
+.. tab:: Windows
- cd \deployment_tools\tools\deployment_manager
- .\deployment_manager.py
-
- .. tab:: macOS
-
- .. code-block:: sh
+ .. code-block:: bat
+
+ cd \deployment_tools\tools\deployment_manager
+ .\deployment_manager.py
+
+.. tab:: macOS
- cd /tools/deployment_manager
- ./deployment_manager.py
+ .. code-block:: sh
+
+ cd /tools/deployment_manager
+ ./deployment_manager.py
@endsphinxdirective
-2. The target device selection dialog is displayed:
+The target device selection dialog is displayed:
- 
+
- Use the options provided on the screen to complete selection of the target devices and press **Enter** to proceed to the package generation dialog. if you want to interrupt the generation process and exit the program, type **q** and press **Enter**.
+Use the options provided on the screen to complete selection of the target devices and press **Enter** to proceed to the package generation dialog. if you want to interrupt the generation process and exit the program, type **q** and press **Enter**.
-3. Once you accept the selection, the package generation dialog is displayed:
+Once you accept the selection, the package generation dialog is displayed:
- 
+
- The target devices you have selected at the previous step appear on the screen. To go back and change the selection, type **b** and press **Enter**. Use the options provided to configure the generation process, or use the default settings.
+The target devices you have selected at the previous step appear on the screen. To go back and change the selection, type **b** and press **Enter**. Use the options provided to configure the generation process, or use the default settings.
- * `o. Change output directory` (optional): Path to the output directory. By default, it's set to your home directory.
+* `o. Change output directory` (optional): Path to the output directory. By default, it's set to your home directory.
- * `u. Provide (or change) path to folder with user data` (optional): Path to a directory with user data (IRs, models, datasets, etc.) files and subdirectories required for inference, which will be added to the deployment archive. By default, it's set to `None`, which means you will separately copy the user data to the target system.
+* `u. Provide (or change) path to folder with user data` (optional): Path to a directory with user data (IRs, models, datasets, etc.) files and subdirectories required for inference, which will be added to the deployment archive. By default, it's set to `None`, which means you will separately copy the user data to the target system.
- * `t. Change archive name` (optional): Deployment archive name without extension. By default, it is set to `openvino_deployment_package`.
+* `t. Change archive name` (optional): Deployment archive name without extension. By default, it is set to `openvino_deployment_package`.
-4. Once all the parameters are set, type **g** and press **Enter** to generate the package for the selected target devices. To interrupt the generation process and exit the program, type **q** and press **Enter**.
+Once all the parameters are set, type **g** and press **Enter** to generate the package for the selected target devices. To interrupt the generation process and exit the program, type **q** and press **Enter**.
- The script successfully completes and the deployment package is generated in the specified output directory.
+The script successfully completes and the deployment package is generated in the specified output directory.
@sphinxdirective
-.. raw:: html
+.. raw:: html
+
+
-
-
@endsphinxdirective
### Run Standard CLI Mode
-
+
@sphinxdirective
.. raw:: html
-
+
@endsphinxdirective
Alternatively, you can run the Deployment Manager tool in the standard CLI mode. In this mode, you specify the target devices and other parameters as command-line arguments of the Deployment Manager Python script. This mode facilitates integrating the tool in an automation pipeline.
@@ -113,29 +114,29 @@ To launch the Deployment Manager tool in the standard mode, open a new terminal
.. tab:: Linux
.. code-block:: sh
-
+
cd /tools/deployment_manager
- ./deployment_manager.py <--targets> [--output_dir] [--archive_name] [--user_data]
-
-.. tab:: Windows
+ ./deployment_manager.py <--targets> [--output_dir] [--archive_name] [--user_data]
- .. code-block:: bat
+.. tab:: Windows
- cd \deployment_tools\tools\deployment_manager
+ .. code-block:: bat
+
+ cd \tools\deployment_manager
.\deployment_manager.py <--targets> [--output_dir] [--archive_name] [--user_data]
-
-.. tab:: macOS
+
+.. tab:: macOS
.. code-block:: sh
cd /tools/deployment_manager
./deployment_manager.py <--targets> [--output_dir] [--archive_name] [--user_data]
-
+
@endsphinxdirective
The following options are available:
-* `<--targets>` (required): List of target devices to run inference. To specify more than one target, separate them with spaces. For example: `--targets cpu gpu vpu`. You can get a list of currently available targets by running the program with the `-h` option.
+* `<--targets>` (required): List of target devices to run inference. To specify more than one target, separate them with spaces. For example: `--targets cpu gpu vpu`. You can get a list of currently available targets by running the program with the `-h` option.
* `[--output_dir]` (optional): Path to the output directory. By default, it is set to your home directory.
@@ -147,80 +148,82 @@ The script successfully completes, and the deployment package is generated in th
@sphinxdirective
-.. raw:: html
+.. raw:: html
+
+
-
-
@endsphinxdirective
## Deploy Package on Target Systems
-After the Deployment Manager has successfully completed, you can find the generated `.tar.gz` (for Linux or macOS) or `.zip` (for Windows) package in the output directory you specified.
+After the Deployment Manager has successfully completed, you can find the generated `.tar.gz` (for Linux or macOS) or `.zip` (for Windows) package in the output directory you specified.
To deploy the OpenVINO Runtime components from the development machine to the target system, perform the following steps:
1. Copy the generated archive to the target system using your preferred method.
2. Unpack the archive into the destination directory on the target system (if your archive name is different from the default shown below, replace the `openvino_deployment_package` with the name you use).
+@sphinxdirective
- @sphinxdirective
-
- .. tab:: Linux
-
- .. code-block:: sh
-
- tar xf openvino_deployment_package.tar.gz -C
-
- .. tab:: Windows
-
- Use the archiver of your choice to unzip the file.
-
- .. tab:: macOS
-
- .. code-block:: sh
-
- tar xf openvino_deployment_package.tar.gz -C
-
- @endsphinxdirective
+.. tab:: Linux
+
+ .. code-block:: sh
+
+ tar xf openvino_deployment_package.tar.gz -C
+
+.. tab:: Windows
+
+ .. code-block:: bat
+
+ Use the archiver of your choice to unzip the file.
+
+.. tab:: macOS
+
+ .. code-block:: sh
+
+ tar xf openvino_deployment_package.tar.gz -C
+
+@endsphinxdirective
+
+ The package is unpacked to the destination directory and the following files and subdirectories are created:
-The package is unpacked to the destination directory and the following files and subdirectories are created:
-
* `setupvars.sh` — Copy of `setupvars.sh`
* `runtime` — Contains the OpenVINO runtime binary files.
* `install_dependencies` — Snapshot of the `install_dependencies` directory from the OpenVINO installation directory.
* `` — The directory with the user data (IRs, datasets, etc.) you specified while configuring the package.
-3. For Linux, to run inference on a target Intel® GPU, Intel® Movidius™ VPU, or Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, you need to install additional dependencies by running the `install_openvino_dependencies.sh` script on the target machine:
- ```sh
- cd /openvino/install_dependencies
- sudo -E ./install_openvino_dependencies.sh
- ```
+For Linux, to run inference on a target Intel® GPU, Intel® Movidius™ VPU, or Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, you need to install additional dependencies by running the `install_openvino_dependencies.sh` script on the target machine:
+
+```sh
+cd /openvino/install_dependencies
+sudo -E ./install_openvino_dependencies.sh
+```
+
+Set up the environment variables:
-4. Set up the environment variables:
-
- @sphinxdirective
-
- .. tab:: Linux
-
- .. code-block:: sh
+@sphinxdirective
- cd /openvino/
- source ./setupvars.sh
-
- .. tab:: Windows
-
- .. code-block:: bat
+.. tab:: Linux
- cd \openvino\
- .\setupvars.bat
-
- .. tab:: macOS
-
- .. code-block:: sh
+ .. code-block:: sh
+
+ cd /openvino/
+ source ./setupvars.sh
- cd /openvino/
- source ./setupvars.sh
-
- @endsphinxdirective
+.. tab:: Windows
+
+ .. code-block:: bat
+
+ cd \openvino\
+ .\setupvars.bat
+
+.. tab:: macOS
+
+ .. code-block:: sh
+
+ cd /openvino/
+ source ./setupvars.sh
+
+@endsphinxdirective
You have now finished the deployment of the OpenVINO Runtime components to the target system.
diff --git a/docs/OV_Runtime_UG/deployment/deployment_intro.md b/docs/OV_Runtime_UG/deployment/deployment_intro.md
new file mode 100644
index 00000000000..6dbf2d71df4
--- /dev/null
+++ b/docs/OV_Runtime_UG/deployment/deployment_intro.md
@@ -0,0 +1,68 @@
+# Deploy with OpenVINO {#openvino_deployment_guide}
+
+@sphinxdirective
+
+.. toctree::
+ :maxdepth: 1
+ :hidden:
+
+ openvino_docs_install_guides_deployment_manager_tool
+ openvino_docs_deploy_local_distribution
+
+@endsphinxdirective
+
+Once the [OpenVINO application development](../integrate_with_your_application.md) has been finished, usually application developers need to deploy their applications to end users. There are several ways how to achieve that:
+
+- Set a dependency on existing prebuilt packages (so called _centralized distribution_):
+ - Using Debian / RPM packages, a recommended way for a family of Linux operation systems
+ - Using pip package manager on PyPi, default approach for Python-based applications
+ - Using Docker images. If the application should be deployed as a Docker image, developer can use a pre-built runtime OpenVINO Docker image as a base image in the Dockerfile for the application container image. You can find more info about available OpenVINO Docker images in the Install Guides for [Linux](../../install_guides/installing-openvino-docker-linux.md) and [Windows](../../install_guides/installing-openvino-docker-windows.md).
+Also, if you need to customize OpenVINO Docker image, you can use [Docker CI Framework](https://github.com/openvinotoolkit/docker_ci) to generate a Dockerfile and built it.
+- Grab a necessary functionality of OpenVINO together with your application (so-called _local distribution_):
+ - Using [OpenVINO Deployment manager](deployment-manager-tool.md) providing a convinient way create a distribution package
+ - Using advanced [Local distribution](local-distribution.md) approach
+ - Using [static version of OpenVINO Runtime linked into the final app](https://github.com/openvinotoolkit/openvino/wiki/StaticLibraries)
+
+The table below shows which distribution type can be used depending on target operation system:
+
+@sphinxdirective
+
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+| Distribution type | Operation systems |
+|------- ---------- | ----------------- |
+| Debian packages | Ubuntu 18.04 long-term support (LTS), 64-bit; Ubuntu 20.04 long-term support (LTS), 64-bit |
+| RMP packages | Red Hat Enterprise Linux 8, 64-bit |
+| Docker images | Ubuntu 18.04 long-term support (LTS), 64-bit; Ubuntu 20.04 long-term support (LTS), 64-bit; Red Hat Enterprise Linux 8, 64-bit; Windows Server Core base LTSC 2019, 64-bit; Windows 10, version 20H2, 64-bit |
+| PyPi (pip package manager) | See [https://pypi.org/project/openvino/](https://pypi.org/project/openvino/) |
+| [OpenVINO Deployment Manager](deployment-manager-tool.md) | All operation systems |
+| [Local distribution](local-distribution.md) | All operation systems |
+| [Build OpenVINO statically and link into the final app](https://github.com/openvinotoolkit/openvino/wiki/StaticLibraries) | All operation systems |
+
+@sphinxdirective
+
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+Depending on the distribution type, the granularity of OpenVINO packages may vary: PyPi distribution [OpenVINO has a single package 'openvino'](https://pypi.org/project/openvino/) containing all the runtime libraries and plugins, while more configurable ways like [Local distribution](local-distribution.md) provide higher granularity, so it is important to now some details about the set of libraries which are part of OpenVINO Runtime package:
+
+![deployment_simplified]
+
+- The main library `openvino` is used by C++ user's applications to link against with. The library provides all OpenVINO Runtime public API for both OpenVINO API 2.0 and Inference Engine, nGraph APIs. For C language applications `openvino_c` is additionally required for distribution.
+- The _optional_ plugin libraries like `openvino_intel_cpu_plugin` (matching `openvino_.+_plugin` pattern) are used to provide inference capabilities on specific devices or additional capabitilies like [Hetero execution](../hetero_execution.md) or [Multi-Device execution](../multi_device.md).
+- The _optional_ plugin libraries like `openvino_ir_frontnend` (matching `openvino_.+_frontend`) are used to provide capabilities to read models of different file formats like OpenVINO IR, ONNX or Paddle.
+
+The _optional_ means that if the application does not use the capability enabled by the plugin, the plugin's library or package with the plugin is not needed in the final distribution.
+
+The information above covers granularity aspects of majority distribution types, more detailed information is only needed and provided in [Local Distribution](local-distribution.md).
+
+> **NOTE**: Depending on target OpenVINO devices, you also have to use [Configurations for GPU](../../install_guides/configurations-for-intel-gpu.md), [Configurations for GNA](../../install_guides/configurations-for-intel-gna.md), [Configurations for NCS2](../../install_guides/configurations-for-ncs2.md) or [Configurations for VPU](../../install_guides/installing-openvino-config-ivad-vpu.md) for proper configuration of deployed machines.
+
+[deployment_simplified]: ../../img/deployment_simplified.png
diff --git a/docs/OV_Runtime_UG/deployment/local-distribution.md b/docs/OV_Runtime_UG/deployment/local-distribution.md
new file mode 100644
index 00000000000..5d1af6a503c
--- /dev/null
+++ b/docs/OV_Runtime_UG/deployment/local-distribution.md
@@ -0,0 +1,162 @@
+# Local distribution {#openvino_docs_deploy_local_distribution}
+
+The local distribution implies that each C or C++ application / installer will have its own copies of OpenVINO Runtime binaries. However, OpenVINO has a scalable plugin-based architecture which implies that some components can be loaded in runtime only if they are really needed. So, it is important to understand which minimal set of libraries is really needed to deploy the application and this guide helps to achieve this goal.
+
+> **NOTE**: The steps below are operation system independent and refer to a library file name without any prefixes (like `lib` on Unix systems) or suffixes (like `.dll` on Windows OS). Do not put `.lib` files on Windows OS to the distribution, because such files are needed only on a linker stage.
+
+Local dsitribution is also appropriate for OpenVINO binaries built from sources using [Build instructions](https://github.com/openvinotoolkit/openvino/wiki#how-to-build), but the guide below supposes OpenVINO Runtime is built dynamically. For case of [Static OpenVINO Runtime](https://github.com/openvinotoolkit/openvino/wiki/StaticLibraries) select the required OpenVINO capabilities on CMake configuration stage using [CMake Options for Custom Compilation](https://github.com/openvinotoolkit/openvino/wiki/CMakeOptionsForCustomCompilation), the build and link the OpenVINO components into the final application.
+
+### C++ or C language
+
+Independently on language used to write the application, `openvino` must always be put to the final distribution since is a core library which orshectrates with all the inference and frontend plugins.
+If your application is written with C language, then you need to put `openvino_c` additionally.
+
+The `plugins.xml` file with information about inference devices must also be taken as support file for `openvino`.
+
+> **NOTE**: in Intel Distribution of OpenVINO, `openvino` depends on TBB libraries which are used by OpenVINO Runtime to optimally saturate the devices with computations, so it must be put to the distribution package
+
+### Pluggable components
+
+The picture below demonstrates dependnecies between the OpenVINO Runtime core and pluggable libraries:
+
+![deployment_full]
+
+#### Compute devices
+
+For each inference device, OpenVINO Runtime has its own plugin library:
+- `openvino_intel_cpu_plugin` for [Intel CPU devices](../supported_plugins/CPU.md)
+- `openvino_intel_gpu_plugin` for [Intel GPU devices](../supported_plugins/GPU.md)
+- `openvino_intel_gna_plugin` for [Intel GNA devices](../supported_plugins/GNA.md)
+- `openvino_intel_myriad_plugin` for [Intel MYRIAD devices](../supported_plugins/MYRIAD.md)
+- `openvino_intel_hddl_plugin` for [Intel HDDL device](../supported_plugins/HDDL.md)
+- `openvino_arm_cpu_plugin` for [ARM CPU devices](../supported_plugins/ARM_CPU.md)
+
+Depending on what devices is used in the app, put the appropriate libraries to the distribution package.
+
+As it is shown on the picture above, some plugin libraries may have OS-specific dependencies which are either backend libraries or additional supports files with firmware, etc. Refer to the table below for details:
+
+@sphinxdirective
+
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+#### Execution capabilities
+
+`HETERO`, `MULTI`, `BATCH`, `AUTO` execution capabilities can also be used explicitly or implicitly by the application. Use the following recommendation scheme to decide whether to put the appropriate libraries to the distribution package:
+- If [AUTO](../auto_device_selection.md) is used explicitly in the application or `ov::Core::compile_model` is used without specifying a device, put the `openvino_auto_plugin` to the distribution
+ > **NOTE**: Auto device selection relies on [inference device plugins](../supported_plugins/Device_Plugins.md), so if are not sure what inference devices are available on target machine, put all inference plugin libraries to the distribution. If the `ov::device::priorities` is used for `AUTO` to specify a limited device list, grab the corresponding device plugins only.
+
+- If [MULTI](../multi_device.md) is used explicitly, put the `openvino_auto_plugin` to the distribution
+- If [HETERO](../hetero_execution.md) is either used explicitly or `ov::hint::performance_mode` is used with GPU, put the `openvino_hetero_plugin` to the distribution
+- If [BATCH](../automatic_batching.md) is either used explicitly or `ov::hint::performance_mode` is used with GPU, put the `openvino_batch_plugin` to the distribution
+
+#### Reading models
+
+OpenVINO Runtime uses frontend libraries dynamically to read models in different formats:
+- To read OpenVINO IR `openvino_ir_frontend` is used
+- To read ONNX file format `openvino_onnx_frontend` is used
+- To read Paddle file format `openvino_paddle_frontend` is used
+
+Depending on what types of model file format are used in the application in `ov::Core::read_model`, peek up the appropriate libraries.
+
+> **NOTE**: The recommended way to optimize the size of final distribution package is to [convert models using Model Optimizer](../../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) to OpenVINO IR, in this case you don't have to keep ONNX, Paddle and other frontend libraries in the distribution package.
+
+#### (Legacy) Preprocessing via G-API
+
+> **NOTE**: [G-API](../../gapi/gapi_intro.md) preprocessing is a legacy functionality, use [preprocessing capabilities from OpenVINO 2.0](../preprocessing_overview.md) which do not require any additional libraries.
+
+If the application uses `InferenceEngine::PreProcessInfo::setColorFormat` or `InferenceEngine::PreProcessInfo::setResizeAlgorithm` methods, OpenVINO Runtime dynamically loads `openvino_gapi_preproc` plugin to perform preprocessing via G-API.
+
+### Examples
+
+#### CPU + IR in C-written application
+
+C-written application performs inference on CPU and reads models stored as OpenVINO IR:
+- `openvino_c` library is a main dependency of the application. It links against this library
+- `openvino` is used as a private dependency for `openvino` and also used in the deployment
+- `openvino_intel_cpu_plugin` is used for inference
+- `openvino_ir_frontend` is used to read source model
+
+#### MULTI execution on GPU and MYRIAD in tput mode
+
+C++ written application performs inference [simultaneously on GPU and MYRIAD devices](../multi_device.md) with `ov::hint::PerformanceMode::THROUGHPUT` property, reads models stored in ONNX file format:
+- `openvino` library is a main dependency of the application. It links against this library
+- `openvino_intel_gpu_plugin` and `openvino_intel_myriad_plugin` are used for inference
+- `openvino_auto_plugin` is used for `MULTI` multi-device execution
+- `openvino_auto_batch_plugin` can be also put to the distribution to improve saturation of [Intel GPU](../supported_plugins/GPU.md) device. If there is no such plugin, [Automatic batching](../automatic_batching.md) is turned off.
+- `openvino_onnx_frontend` is used to read source model
+
+#### Auto device selection between HDDL and CPU
+
+C++ written application performs inference with [automatic device selection](../auto_device_selection.md) with device list limited to HDDL and CPU, model is [created using C++ code](../model_representation.md):
+- `openvino` library is a main dependency of the application. It links against this library
+- `openvino_auto_plugin` is used to enable automatic device selection feature
+- `openvino_intel_hddl_plugin` and `openvino_intel_cpu_plugin` are used for inference, `AUTO` selects between CPU and HDDL devices according to their physical existance on deployed machine.
+- No frontend library is needed because `ov::Model` is created in code.
+
+[deployment_full]: ../../img/deployment_full.png
diff --git a/docs/OV_Runtime_UG/hetero_execution.md b/docs/OV_Runtime_UG/hetero_execution.md
index 2591232b6d7..1b802eb2793 100644
--- a/docs/OV_Runtime_UG/hetero_execution.md
+++ b/docs/OV_Runtime_UG/hetero_execution.md
@@ -31,21 +31,22 @@ Following the OpenVINO™ naming convention, the Hetero execution plugin is assi
#### The Manual Mode
It assumes setting affinities explicitly for all operations in the model using `ov::Node::get_rt_info` with the `"affinity"` key.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_hetero.cpp
- :language: cpp
- :fragment: [set_manual_affinities]
+@snippet docs/snippets/ov_hetero.cpp set_manual_affinities
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_hetero.py
- :language: python
- :fragment: [set_manual_affinities]
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_hetero.py set_manual_affinities
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
@@ -55,40 +56,40 @@ It decides automatically which operation is assigned to which device according t
The automatic mode causes "greedy" behavior and assigns all operations that can be executed on a given device to it, according to the priorities you specify (for example, `ov::device::priorities("GPU,CPU")`).
It does not take into account device peculiarities such as the inability to infer certain operations without other special operations placed before or after that layer. If the device plugin does not support the subgraph topology constructed by the HETERO device, then you should set affinity manually.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_hetero.cpp
- :language: cpp
- :fragment: [compile_model]
+@snippet docs/snippets/ov_hetero.cpp compile_model
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_hetero.py
- :language: python
- :fragment: [compile_model]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_hetero.py compile_model
+
+@endsphinxtab
+
+@endsphinxtabset
#### Using Manual and Automatic Modes in Combination
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:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_hetero.cpp
- :language: cpp
- :fragment: [fix_automatic_affinities]
+@snippet docs/snippets/ov_hetero.cpp fix_automatic_affinities
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_hetero.py
- :language: python
- :fragment: [fix_automatic_affinities]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_hetero.py fix_automatic_affinities
+
+@endsphinxtab
+
+@endsphinxtabset
Importantly, the automatic mode will not work if any operation in a model has its `"affinity"` already initialized.
@@ -97,21 +98,21 @@ Importantly, the automatic mode will not work if any operation in a model has it
### Configure fallback devices
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`:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_hetero.cpp
- :language: cpp
- :fragment: [configure_fallback_devices]
+@snippet docs/snippets/ov_hetero.cpp configure_fallback_devices
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_hetero.py
- :language: python
- :fragment: [configure_fallback_devices]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_hetero.py configure_fallback_devices
+
+@endsphinxtab
+
+@endsphinxtabset
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`.
diff --git a/docs/OV_Runtime_UG/img/configuration_dialog.png b/docs/OV_Runtime_UG/img/configuration_dialog.png
new file mode 100644
index 00000000000..e8f3995d432
--- /dev/null
+++ b/docs/OV_Runtime_UG/img/configuration_dialog.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2d6db31aee32fc54a0c58fff77aca191070da87a85148998ed837e81cd3b708e
+size 42540
diff --git a/docs/OV_Runtime_UG/img/deploy_encrypted_model.png b/docs/OV_Runtime_UG/img/deploy_encrypted_model.png
index 9338c59dcf2..419e0a22fb6 100644
--- a/docs/OV_Runtime_UG/img/deploy_encrypted_model.png
+++ b/docs/OV_Runtime_UG/img/deploy_encrypted_model.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:25ed719bdd525dc0b606ef17a3fec5303ea032dfe6b2d167e1b19b6100b6fb37
-size 16516
+oid sha256:9ba2a85ae6c93405f9b6e11c3c41ab20ffe13e8ae64403fa9802af6d96b314b1
+size 35008
diff --git a/docs/OV_Runtime_UG/img/selection_dialog.png b/docs/OV_Runtime_UG/img/selection_dialog.png
new file mode 100644
index 00000000000..86570aae170
--- /dev/null
+++ b/docs/OV_Runtime_UG/img/selection_dialog.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0812f173a2fca3a3fce86d5b1df36e4d956c35bb09fcadbab0f26f17ccc97b5e
+size 43417
diff --git a/docs/OV_Runtime_UG/integrate_with_your_application.md b/docs/OV_Runtime_UG/integrate_with_your_application.md
index 6bc3644da58..e12bc161356 100644
--- a/docs/OV_Runtime_UG/integrate_with_your_application.md
+++ b/docs/OV_Runtime_UG/integrate_with_your_application.md
@@ -8,6 +8,7 @@
openvino_docs_OV_Runtime_UG_Model_Representation
openvino_docs_OV_Runtime_UG_Infer_request
+ openvino_docs_OV_Runtime_UG_Python_API_exclusives
@endsphinxdirective
@@ -27,39 +28,39 @@ This section provides step-by-step instructions to implement a typical inference
Include next files to work with OpenVINO™ Runtime:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/src/main.cpp
- :language: cpp
- :fragment: [include]
+@snippet docs/snippets/src/main.cpp include
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/src/main.py
- :language: python
- :fragment: [import]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/src/main.py import
+
+@endsphinxtab
+
+@endsphinxtabset
Use the following code to create OpenVINO™ Core to manage available devices and read model objects:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/src/main.cpp
- :language: cpp
- :fragment: [part1]
+@snippet docs/snippets/src/main.cpp part1
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/src/main.py
- :language: python
- :fragment: [part1]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/src/main.py part1
+
+@endsphinxtab
+
+@endsphinxtabset
### Step 2. Compile the Model
@@ -67,61 +68,73 @@ Use the following code to create OpenVINO™ Core to manage available devices an
Compile the model for a specific device using `ov::Core::compile_model()`:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. tab:: IR
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/src/main.cpp
- :language: cpp
- :fragment: [part2_1]
+@sphinxtab{IR}
- .. tab:: ONNX
+@snippet docs/snippets/src/main.cpp part2_1
- .. doxygensnippet:: docs/snippets/src/main.cpp
- :language: cpp
- :fragment: [part2_2]
+@endsphinxtab
- .. tab:: PaddlePaddle
+@sphinxtab{ONNX}
- .. doxygensnippet:: docs/snippets/src/main.cpp
- :language: cpp
- :fragment: [part2_3]
+@snippet docs/snippets/src/main.cpp part2_2
- .. tab:: ov::Model
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/src/main.cpp
- :language: cpp
- :fragment: [part2_4]
+@sphinxtab{PaddlePaddle}
-.. tab:: Python
+@snippet docs/snippets/src/main.cpp part2_3
- .. tab:: IR
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/src/main.py
- :language: python
- :fragment: [part2_1]
+@sphinxtab{ov::Model}
- .. tab:: ONNX
+@snippet docs/snippets/src/main.cpp part2_4
- .. doxygensnippet:: docs/snippets/src/main.py
- :language: python
- :fragment: [part2_2]
+@endsphinxtab
- .. tab:: PaddlePaddle
+@endsphinxtabset
- .. doxygensnippet:: docs/snippets/src/main.py
- :language: python
- :fragment: [part2_3]
+@endsphinxtab
- .. tab:: ov::Model
+@sphinxtab{Python}
- .. doxygensnippet:: docs/snippets/src/main.py
- :language: python
- :fragment: [part2_4]
+@sphinxtabset
-@endsphinxdirective
+@sphinxtab{IR}
+
+@snippet docs/snippets/src/main.py part2_1
+
+@endsphinxtab
+
+@sphinxtab{ONNX}
+
+@snippet docs/snippets/src/main.py part2_2
+
+@endsphinxtab
+
+@sphinxtab{PaddlePaddle}
+
+@snippet docs/snippets/src/main.py part2_3
+
+@endsphinxtab
+
+@sphinxtab{ov::Model}
+
+@snippet docs/snippets/src/main.py part2_4
+
+@endsphinxtab
+
+@endsphinxtabset
+
+@endsphinxtab
+
+@endsphinxtabset
The `ov::Model` object represents any models inside the OpenVINO™ Runtime.
For more details please read article about [OpenVINO™ Model representation](model_representation.md).
@@ -134,61 +147,61 @@ To learn how to change the device configuration, read the [Query device properti
`ov::InferRequest` class provides methods for model inference in OpenVINO™ Runtime. Create an infer request using the following code (see [InferRequest detailed documentation](./ov_infer_request.md) for more details):
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/src/main.cpp
- :language: cpp
- :fragment: [part3]
+@snippet docs/snippets/src/main.cpp part3
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/src/main.py
- :language: python
- :fragment: [part3]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/src/main.py part3
+
+@endsphinxtab
+
+@endsphinxtabset
### Step 4. Set Inputs
You can use external memory to create `ov::Tensor` and use the `ov::InferRequest::set_input_tensor` method to put this tensor on the device:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/src/main.cpp
- :language: cpp
- :fragment: [part4]
+@snippet docs/snippets/src/main.cpp part4
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/src/main.py
- :language: python
- :fragment: [part4]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/src/main.py part4
+
+@endsphinxtab
+
+@endsphinxtabset
### Step 5. Start Inference
OpenVINO™ Runtime supports inference in either synchronous or asynchronous mode. Using the Async API can improve application's overall frame-rate, because rather than wait for inference to complete, the app can keep working on the host, while the accelerator is busy. You can use `ov::InferRequest::start_async` to start model inference in the asynchronous mode and call `ov::InferRequest::wait` to wait for the inference results:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/src/main.cpp
- :language: cpp
- :fragment: [part5]
+@snippet docs/snippets/src/main.cpp part5
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/src/main.py
- :language: python
- :fragment: [part5]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/src/main.py part5
+
+@endsphinxtab
+
+@endsphinxtabset
This section demonstrates a simple pipeline, to get more information about other ways to perform inference, read the dedicated ["Run inference" section](./ov_infer_request.md).
@@ -196,21 +209,21 @@ This section demonstrates a simple pipeline, to get more information about other
Go over the output tensors and process the inference results.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/src/main.cpp
- :language: cpp
- :fragment: [part6]
+@snippet docs/snippets/src/main.cpp part6
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/src/main.py
- :language: python
- :fragment: [part6]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/src/main.py part6
+
+@endsphinxtab
+
+@endsphinxtabset
## Link and Build Your C++ Application with OpenVINO™ Runtime
diff --git a/docs/OV_Runtime_UG/layout_overview.md b/docs/OV_Runtime_UG/layout_overview.md
index c164fb8a1be..493e56b08c9 100644
--- a/docs/OV_Runtime_UG/layout_overview.md
+++ b/docs/OV_Runtime_UG/layout_overview.md
@@ -20,82 +20,82 @@ Reasons when you may want to care about input/output layout:
### Short
The easiest way is to fully specify each dimension with one alphabetical letter
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_layout.cpp
- :language: cpp
- :fragment: [ov:layout:simple]
+@snippet docs/snippets/ov_layout.cpp ov:layout:simple
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_layout.py
- :language: python
- :fragment: [ov:layout:simple]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_layout.py ov:layout:simple
+
+@endsphinxtab
+
+@endsphinxtabset
This assigns 'N' to first dimension, 'C' to second, 'H' to 3rd and 'W' to 4th
### Advanced
Advanced syntax allows assigning a word to a dimension. To do this, wrap layout with square brackets `[]` and specify each name separated by comma `,`
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_layout.cpp
- :language: cpp
- :fragment: [ov:layout:complex]
+@snippet docs/snippets/ov_layout.cpp ov:layout:complex
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_layout.py
- :language: python
- :fragment: [ov:layout:complex]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_layout.py ov:layout:complex
+
+@endsphinxtab
+
+@endsphinxtabset
### Partially defined layout
If some dimension is not important, it's name can be set to `?`
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_layout.cpp
- :language: cpp
- :fragment: [ov:layout:partially_defined]
+@snippet docs/snippets/ov_layout.cpp ov:layout:partially_defined
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_layout.py
- :language: python
- :fragment: [ov:layout:partially_defined]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_layout.py ov:layout:partially_defined
+
+@endsphinxtab
+
+@endsphinxtabset
### Dynamic layout
If number of dimensions is not important, ellipsis `...` can be used to specify variadic number of dimensions.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_layout.cpp
- :language: cpp
- :fragment: [ov:layout:dynamic]
+@snippet docs/snippets/ov_layout.cpp ov:layout:dynamic
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_layout.py
- :language: python
- :fragment: [ov:layout:dynamic]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_layout.py ov:layout:dynamic
+
+@endsphinxtab
+
+@endsphinxtabset
### Predefined names
@@ -108,22 +108,21 @@ Layout has pre-defined some widely used in computer vision dimension names:
These names are used in [PreProcessing API](./preprocessing_overview.md) and there is a set of helper functions to get appropriate dimension index from layout
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_layout.cpp
- :language: cpp
- :fragment: [ov:layout:predefined]
+@snippet docs/snippets/ov_layout.cpp ov:layout:predefined
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_layout.py
- :language: python
- :fragment: [ov:layout:predefined]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_layout.py ov:layout:predefined
+@endsphinxtab
+
+@endsphinxtabset
### Equality
@@ -133,21 +132,21 @@ Layout names are case-insensitive, which means that ```Layout("NCHW") == Layout(
Layout can be converted to string in advanced syntax format. Can be useful for debugging and serialization purposes
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_layout.cpp
- :language: cpp
- :fragment: [ov:layout:dump]
+@snippet docs/snippets/ov_layout.cpp ov:layout:dump
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_layout.py
- :language: python
- :fragment: [ov:layout:dump]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_layout.py ov:layout:dump
+
+@endsphinxtab
+
+@endsphinxtabset
## See also
diff --git a/docs/OV_Runtime_UG/migration_ov_2_0/common_inference_pipeline.md b/docs/OV_Runtime_UG/migration_ov_2_0/common_inference_pipeline.md
index c7d0e6594f8..7f3aa58d28b 100644
--- a/docs/OV_Runtime_UG/migration_ov_2_0/common_inference_pipeline.md
+++ b/docs/OV_Runtime_UG/migration_ov_2_0/common_inference_pipeline.md
@@ -80,162 +80,162 @@ OpenVINO™ Runtime API 2.0:
Inference Engine API fills inputs as `I32` precision (**not** aligned with the original model):
-@sphinxdirective
+@sphinxtabset
-.. tab:: IR v10
+@sphinxtab{IR v10}
- .. doxygensnippet:: docs/snippets/ie_common.cpp
- :language: cpp
- :fragment: [ie:get_input_tensor]
+@snippet docs/snippets/ie_common.cpp ie:get_input_tensor
-.. tab:: IR v11
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ie_common.cpp
- :language: cpp
- :fragment: [ie:get_input_tensor]
+@sphinxtab{IR v11}
-.. tab:: ONNX
+@snippet docs/snippets/ie_common.cpp ie:get_input_tensor
- .. doxygensnippet:: docs/snippets/ie_common.cpp
- :language: cpp
- :fragment: [ie:get_input_tensor]
+@endsphinxtab
-.. tab:: Model created in code
+@sphinxtab{ONNX}
- .. doxygensnippet:: docs/snippets/ie_common.cpp
- :language: cpp
- :fragment: [ie:get_input_tensor]
+@snippet docs/snippets/ie_common.cpp ie:get_input_tensor
-@endsphinxdirective
+@endsphinxtab
+
+@sphinxtab{Model created in code}
+
+@snippet docs/snippets/ie_common.cpp ie:get_input_tensor
+
+@endsphinxtab
+
+@endsphinxtabset
OpenVINO™ Runtime API 2.0 fills inputs as `I64` precision (aligned with the original model):
-@sphinxdirective
+@sphinxtabset
-.. tab:: IR v10
+@sphinxtab{IR v10}
- .. doxygensnippet:: docs/snippets/ov_common.cpp
- :language: cpp
- :fragment: [ov_api_2_0:get_input_tensor_v10]
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:get_input_tensor_v10
-.. tab:: IR v11
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_common.cpp
- :language: cpp
- :fragment: [ov_api_2_0:get_input_tensor_aligned]
+@sphinxtab{IR v11}
-.. tab:: ONNX
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:get_input_tensor_aligned
- .. doxygensnippet:: docs/snippets/ov_common.cpp
- :language: cpp
- :fragment: [ov_api_2_0:get_input_tensor_aligned]
+@endsphinxtab
-.. tab:: Model created in code
+@sphinxtab{ONNX}
- .. doxygensnippet:: docs/snippets/ov_common.cpp
- :language: cpp
- :fragment: [ov_api_2_0:get_input_tensor_aligned]
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:get_input_tensor_aligned
-@endsphinxdirective
+@endsphinxtab
+
+@sphinxtab{Model created in code}
+
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:get_input_tensor_aligned
+
+@endsphinxtab
+
+@endsphinxtabset
## 6. Start Inference
Inference Engine API:
-@sphinxdirective
+@sphinxtabset
-.. tab:: Sync
+@sphinxtab{Sync}
- .. doxygensnippet:: docs/snippets/ie_common.cpp
- :language: cpp
- :fragment: [ie:inference]
+@snippet docs/snippets/ie_common.cpp ie:inference
-.. tab:: Async
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ie_common.cpp
- :language: cpp
- :fragment: [ie:start_async_and_wait]
+@sphinxtab{Async}
-@endsphinxdirective
+@snippet docs/snippets/ie_common.cpp ie:start_async_and_wait
+
+@endsphinxtab
+
+@endsphinxtabset
OpenVINO™ Runtime API 2.0:
-@sphinxdirective
+@sphinxtabset
-.. tab:: Sync
+@sphinxtab{Sync}
- .. doxygensnippet:: docs/snippets/ov_common.cpp
- :language: cpp
- :fragment: [ov_api_2_0:inference]
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:inference
-.. tab:: Async
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_common.cpp
- :language: cpp
- :fragment: [ov_api_2_0:start_async_and_wait]
+@sphinxtab{Async}
-@endsphinxdirective
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:start_async_and_wait
+
+@endsphinxtab
+
+@endsphinxtabset
## 7. Process the Inference Results
Inference Engine API processes outputs as `I32` precision (**not** aligned with the original model):
-@sphinxdirective
+@sphinxtabset
-.. tab:: IR v10
+@sphinxtab{IR v10}
- .. doxygensnippet:: docs/snippets/ie_common.cpp
- :language: cpp
- :fragment: [ie:get_output_tensor]
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:inference
-.. tab:: IR v11
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ie_common.cpp
- :language: cpp
- :fragment: [ie:get_output_tensor]
+@sphinxtab{IR v11}
-.. tab:: ONNX
+@snippet docs/snippets/ie_common.cpp ie:get_output_tensor
- .. doxygensnippet:: docs/snippets/ie_common.cpp
- :language: cpp
- :fragment: [ie:get_output_tensor]
+@endsphinxtab
-.. tab:: Model created in code
+@sphinxtab{ONNX}
- .. doxygensnippet:: docs/snippets/ie_common.cpp
- :language: cpp
- :fragment: [ie:get_output_tensor]
+@snippet docs/snippets/ie_common.cpp ie:get_output_tensor
-@endsphinxdirective
+@endsphinxtab
+
+@sphinxtab{Model created in code}
+
+@snippet docs/snippets/ie_common.cpp ie:get_output_tensor
+
+@endsphinxtab
+
+@endsphinxtabset
OpenVINO™ Runtime API 2.0 processes outputs:
- For IR v10 as `I32` precision (**not** aligned with the original model) to match **old** behavior
- For IR v11, ONNX, ov::Model, Paddle as `I64` precision (aligned with the original model) to match **new** behavior
-@sphinxdirective
+@sphinxtabset
-.. tab:: IR v10
+@sphinxtab{IR v10}
- .. doxygensnippet:: docs/snippets/ov_common.cpp
- :language: cpp
- :fragment: [ov_api_2_0:get_output_tensor_v10]
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:get_output_tensor_v10
-.. tab:: IR v11
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_common.cpp
- :language: cpp
- :fragment: [ov_api_2_0:get_output_tensor_aligned]
+@sphinxtab{IR v11}
-.. tab:: ONNX
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:get_output_tensor_aligned
- .. doxygensnippet:: docs/snippets/ov_common.cpp
- :language: cpp
- :fragment: [ov_api_2_0:get_output_tensor_aligned]
+@endsphinxtab
-.. tab:: Model created in code
+@sphinxtab{ONNX}
- .. doxygensnippet:: docs/snippets/ov_common.cpp
- :language: cpp
- :fragment: [ov_api_2_0:get_output_tensor_aligned]
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:get_output_tensor_aligned
-@endsphinxdirective
+@endsphinxtab
+
+@sphinxtab{Model created in code}
+
+@snippet docs/snippets/ov_common.cpp ov_api_2_0:get_output_tensor_aligned
+
+@endsphinxtab
+
+@endsphinxtabset
diff --git a/docs/OV_Runtime_UG/migration_ov_2_0/configure_devices.md b/docs/OV_Runtime_UG/migration_ov_2_0/configure_devices.md
index 1ddd799a352..fb773c58549 100644
--- a/docs/OV_Runtime_UG/migration_ov_2_0/configure_devices.md
+++ b/docs/OV_Runtime_UG/migration_ov_2_0/configure_devices.md
@@ -20,160 +20,184 @@ The snippets below show how to migrate from Inference Engine device configuratio
Inference Engine API:
-@sphinxdirective
+@sphinxtabset
-.. tab:: Devices
+@sphinxtab{Devices}
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [core_set_config]
+@snippet docs/snippets/ov_properties_migration.cpp core_set_config
-.. tab:: Model Loading
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [core_load_network]
+@sphinxtab{Model Loading}
-.. tab:: Execution
+@snippet docs/snippets/ov_properties_migration.cpp core_load_network
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [executable_network_set_config]
+@endsphinxtab
-@endsphinxdirective
+@sphinxtab{Execution}
+
+@snippet docs/snippets/ov_properties_migration.cpp executable_network_set_config
+
+@endsphinxtab
+
+@endsphinxtabset
OpenVINO Runtime API 2.0:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. tab:: Devices
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [core_set_property]
+@sphinxtab{Devices}
- .. tab:: Model Loading
+@snippet docs/snippets/ov_properties_migration.cpp core_set_property
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [core_compile_model]
+@endsphinxtab
- .. tab:: Execution
+@sphinxtab{Model Loading}
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [compiled_model_set_property]
+@snippet docs/snippets/ov_properties_migration.cpp core_compile_model
-.. tab:: Python
+@endsphinxtab
- .. tab:: Devices
+@sphinxtab{Execution}
- .. doxygensnippet:: docs/snippets/ov_properties_migration.py
- :language: python
- :fragment: [core_set_property]
+@snippet docs/snippets/ov_properties_migration.cpp compiled_model_set_property
- .. tab:: Model Loading
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_migration.py
- :language: python
- :fragment: [core_compile_model]
+@endsphinxtabset
- .. tab:: Execution
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_migration.py
- :language: python
- :fragment: [compiled_model_set_property]
+@sphinxtab{Python}
-@endsphinxdirective
+@sphinxtabset
+
+@sphinxtab{Devices}
+
+@snippet docs/snippets/ov_properties_migration.py core_set_property
+
+@endsphinxtab
+
+@sphinxtab{Model Loading}
+
+@snippet docs/snippets/ov_properties_migration.py core_compile_model
+
+@endsphinxtab
+
+@sphinxtab{Execution}
+
+@snippet docs/snippets/ov_properties_migration.py compiled_model_set_property
+
+@endsphinxtab
+
+@endsphinxtabset
+
+@endsphinxtab
+
+@endsphinxtabset
### Get information
Inference Engine API:
-@sphinxdirective
+@sphinxtabset
-.. tab:: Device configuration
+@sphinxtab{Device Configuration}
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [core_get_config]
+@snippet docs/snippets/ov_properties_migration.cpp core_get_config
-.. tab:: Device metrics
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [core_get_metric]
+@sphinxtab{Device metrics}
-.. tab:: Execution config
+@snippet docs/snippets/ov_properties_migration.cpp core_get_metric
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [executable_network_get_config]
+@endsphinxtab
-.. tab:: Execution metrics
+@sphinxtab{Execution config}
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [executable_network_get_metric]
+@snippet docs/snippets/ov_properties_migration.cpp executable_network_get_config
-@endsphinxdirective
+@endsphinxtab
+
+@sphinxtab{Execution metrics}
+
+@snippet docs/snippets/ov_properties_migration.cpp executable_network_get_metric
+
+@endsphinxtab
+
+@endsphinxtabset
OpenVINO Runtime API 2.0:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. tab:: Device configuration
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [core_get_rw_property]
+@sphinxtab{Device Configuration}
- .. tab:: Device metrics
+@snippet docs/snippets/ov_properties_migration.cpp core_get_rw_property
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [core_get_ro_property]
+@endsphinxtab
- .. tab:: Execution config
+@sphinxtab{Device metrics}
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [compiled_model_get_rw_property]
+@snippet docs/snippets/ov_properties_migration.cpp core_get_ro_property
- .. tab:: Execution metrics
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_migration.cpp
- :language: cpp
- :fragment: [compiled_model_get_ro_property]
+@sphinxtab{Execution config}
-.. tab:: Python
+@snippet docs/snippets/ov_properties_migration.cpp compiled_model_get_rw_property
- .. tab:: Device configuration
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_migration.py
- :language: python
- :fragment: [core_get_rw_property]
+@sphinxtab{Execution metrics}
- .. tab:: Device metrics
+@snippet docs/snippets/ov_properties_migration.cpp compiled_model_get_ro_property
- .. doxygensnippet:: docs/snippets/ov_properties_migration.py
- :language: python
- :fragment: [core_get_ro_property]
+@endsphinxtab
- .. tab:: Execution config
+@endsphinxtabset
- .. doxygensnippet:: docs/snippets/ov_properties_migration.py
- :language: python
- :fragment: [compiled_model_get_rw_property]
+@endsphinxtab
- .. tab:: Execution metrics
+@sphinxtab{Python}
- .. doxygensnippet:: docs/snippets/ov_properties_migration.py
- :language: python
- :fragment: [compiled_model_get_ro_property]
+@sphinxtabset
-@endsphinxdirective
+@sphinxtab{Device Configuration}
+
+@snippet docs/snippets/ov_properties_migration.py core_get_rw_property
+
+@endsphinxtab
+
+@sphinxtab{Device metrics}
+
+@snippet docs/snippets/ov_properties_migration.py core_get_ro_property
+
+@endsphinxtab
+
+@sphinxtab{Execution config}
+
+@snippet docs/snippets/ov_properties_migration.py compiled_model_get_rw_property
+
+@endsphinxtab
+
+@sphinxtab{Execution metrics}
+
+@snippet docs/snippets/ov_properties_migration.py compiled_model_get_ro_property
+
+@endsphinxtab
+
+@endsphinxtabset
+
+@endsphinxtab
+
+@endsphinxtabset
diff --git a/docs/OV_Runtime_UG/migration_ov_2_0/deployment_migration.md b/docs/OV_Runtime_UG/migration_ov_2_0/deployment_migration.md
index 0eb86abd370..9bc193382a8 100644
--- a/docs/OV_Runtime_UG/migration_ov_2_0/deployment_migration.md
+++ b/docs/OV_Runtime_UG/migration_ov_2_0/deployment_migration.md
@@ -14,7 +14,7 @@ Starting from OpenVINO 2022.1, Model Optimizer, Post-Training Optimization tool
The structure of OpenVINO 2022.1 installer package has been organized as below:
- The `runtime` folder includes headers, libraries and CMake interfaces.
-- The `tools` folder contains [the compile tool](../../../tools/compile_tool/README.md), [deployment manager](../../install_guides/deployment-manager-tool.md) and a set of `requirements.txt` files with links to the corresponding versions of the `openvino-dev` package.
+- The `tools` folder contains [the compile tool](../../../tools/compile_tool/README.md), [deployment manager](../../OV_Runtime_UG/deployment/deployment-manager-tool.md) and a set of `requirements.txt` files with links to the corresponding versions of the `openvino-dev` package.
- The `python` folder contains the Python version for OpenVINO Runtime.
## Installing OpenVINO Development Tools via PyPI
@@ -153,7 +153,7 @@ To build applications without CMake interface, you can also use MSVC IDE, UNIX m
## Clearer Library Structure for Deployment
-OpenVINO 2022.1 has reorganized the libraries to make it easier for deployment. In previous versions, to perform deployment steps, you have to use several libraries. Now you can just use `openvino` or `openvino_c` based on your developing language plus necessary plugins to complete your task. For example, `openvino_intel_cpu_plugin` and `openvino_ir_frontend` plugins will enable you to load OpenVINO IRs and perform inference on CPU device.
+OpenVINO 2022.1 has reorganized the libraries to make it easier for deployment. In previous versions, to perform deployment steps, you have to use several libraries. Now you can just use `openvino` or `openvino_c` based on your developing language plus necessary plugins to complete your task. For example, `openvino_intel_cpu_plugin` and `openvino_ir_frontend` plugins will enable you to load OpenVINO IRs and perform inference on CPU device (see [Local distribution with OpenVINO](../deployment/local-distribution.md) for more details).
Here you can find some detailed comparisons on library structure between OpenVINO 2022.1 and previous versions:
diff --git a/docs/OV_Runtime_UG/migration_ov_2_0/intro.md b/docs/OV_Runtime_UG/migration_ov_2_0/intro.md
index 5f31ed51913..b824f55c650 100644
--- a/docs/OV_Runtime_UG/migration_ov_2_0/intro.md
+++ b/docs/OV_Runtime_UG/migration_ov_2_0/intro.md
@@ -1,4 +1,4 @@
-# OpenVINO™ Transition Guide for API 2.0 {#openvino_2_0_transition_guide}
+# Transition to OpenVINO™ 2.0 {#openvino_2_0_transition_guide}
@sphinxdirective
diff --git a/docs/OV_Runtime_UG/migration_ov_2_0/preprocessing.md b/docs/OV_Runtime_UG/migration_ov_2_0/preprocessing.md
index a860ac261f6..db0481d792f 100644
--- a/docs/OV_Runtime_UG/migration_ov_2_0/preprocessing.md
+++ b/docs/OV_Runtime_UG/migration_ov_2_0/preprocessing.md
@@ -25,23 +25,11 @@ In order to utilize preprocessing following imports must be added.
Inference Engine API:
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_preprocessing_migration.py
- :language: python
- :fragment: [imports]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing_migration.py imports
OpenVINO Runtime API 2.0:
-@sphinxdirective
-
-.. doxygensnippet:: docs/snippets/ov_preprocessing_migration.py
- :language: python
- :fragment: [ov_imports]
-
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing_migration.py ov_imports
There are two different namespaces `runtime`, which contains OpenVINO Runtime API classes and `preprocess` which provides Preprocessing API.
@@ -50,153 +38,154 @@ There are two different namespaces `runtime`, which contains OpenVINO Runtime AP
Inference Engine API:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.cpp
- :language: cpp
- :fragment: [mean_scale]
+@snippet docs/snippets/ov_preprocessing_migration.cpp mean_scale
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.py
- :language: python
- :fragment: [mean_scale]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing_migration.py mean_scale
+
+@endsphinxtab
+
+@endsphinxtabset
OpenVINO Runtime API 2.0:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.cpp
- :language: cpp
- :fragment: [ov_mean_scale]
+@snippet docs/snippets/ov_preprocessing_migration.cpp ov_mean_scale
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.py
- :language: python
- :fragment: [ov_mean_scale]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing_migration.py ov_mean_scale
+
+@endsphinxtab
+
+@endsphinxtabset
### Precision and layout conversions
Inference Engine API:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.cpp
- :language: cpp
- :fragment: [conversions]
+@snippet docs/snippets/ov_preprocessing_migration.cpp conversions
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.py
- :language: python
- :fragment: [conversions]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing_migration.py conversions
+
+@endsphinxtab
+
+@endsphinxtabset
OpenVINO Runtime API 2.0:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.cpp
- :language: cpp
- :fragment: [ov_conversions]
+@snippet docs/snippets/ov_preprocessing_migration.cpp ov_conversions
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.py
- :language: python
- :fragment: [ov_conversions]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing_migration.py ov_conversions
+
+@endsphinxtab
+
+@endsphinxtabset
### Image scaling
Inference Engine API:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.cpp
- :language: cpp
- :fragment: [image_scale]
+@snippet docs/snippets/ov_preprocessing_migration.cpp image_scale
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.py
- :language: python
- :fragment: [image_scale]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing_migration.py image_scale
+
+@endsphinxtab
+
+@endsphinxtabset
OpenVINO Runtime API 2.0:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.cpp
- :language: cpp
- :fragment: [ov_image_scale]
+@snippet docs/snippets/ov_preprocessing_migration.cpp ov_image_scale
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.py
- :language: python
- :fragment: [ov_image_scale]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing_migration.py ov_image_scale
+
+@endsphinxtab
+
+@endsphinxtabset
### Color space conversions
Inference Engine API:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.cpp
- :language: cpp
- :fragment: [color_space]
+@snippet docs/snippets/ov_preprocessing_migration.cpp color_space
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.py
- :language: python
- :fragment: [color_space]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing_migration.py color_space
+
+@endsphinxtab
+
+@endsphinxtabset
OpenVINO Runtime API 2.0:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.cpp
- :language: cpp
- :fragment: [ov_color_space]
+@snippet docs/snippets/ov_preprocessing_migration.cpp ov_color_space
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing_migration.py
- :language: python
- :fragment: [ov_color_space]
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_preprocessing_migration.py ov_color_space
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
**See also:**
- [Preprocessing details](../preprocessing_details.md)
diff --git a/docs/OV_Runtime_UG/model_representation.md b/docs/OV_Runtime_UG/model_representation.md
index 4e49108f2fe..593dadc4f24 100644
--- a/docs/OV_Runtime_UG/model_representation.md
+++ b/docs/OV_Runtime_UG/model_representation.md
@@ -8,7 +8,7 @@ Sinks of the graph have no consumers and are not included in the results vector.
Each operation in `ov::Model` has the `std::shared_ptr` type.
-For details on how to build a model in OpenVINO™ Runtime, see the [Build a Model in OpenVINO™ Runtime](@ref build_model) section.
+For details on how to build a model in OpenVINO™ Runtime, see the [Build a Model in OpenVINO™ Runtime](@ref ov_ug_build_model) section.
OpenVINO™ Runtime allows to use different approaches to work with model inputs/outputs:
- `ov::Model::inputs()`/`ov::Model::outputs()` methods allow to get vector of all input/output ports.
@@ -16,21 +16,21 @@ OpenVINO™ Runtime allows to use different approaches to work with model inputs
- Methods `ov::Model::input()` and `ov::Model::output()` can be used with index of input or output from the framework model to get specific port by index.
- You can use tensor name of input or output from the original framework model together with methods `ov::Model::input()` or `ov::Model::output()` to get specific port. It means that you don't need to have any additional mapping of names from framework to OpenVINO, as it was before, OpenVINO™ Runtime allows using of native framework tensor names.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
- :language: cpp
- :fragment: [all_inputs_ouputs]
+@snippet docs/snippets/ov_model_snippets.cpp all_inputs_ouputs
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_model_snippets.py
- :language: python
- :fragment: [all_inputs_ouputs]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_model_snippets.py all_inputs_ouputs
+
+@endsphinxtab
+
+@endsphinxtabset
OpenVINO™ Runtime model representation uses special classes to work with model data types and shapes. For data types the `ov::element::Type` is used.
@@ -42,21 +42,21 @@ OpenVINO™ Runtime provides two types for shape representation:
* `ov::PartialShape` - Represents dynamic shapes. That means that the rank or some of dimensions are dynamic (dimension defines an interval or undefined). `ov::PartialShape` can be converted to `ov::Shape` using the `get_shape()` method if all dimensions are static; otherwise the conversion raises an exception.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
- :language: cpp
- :fragment: [ov:partial_shape]
+@snippet docs/snippets/ov_model_snippets.cpp ov:partial_shape
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_model_snippets.py
- :language: python
- :fragment: [ov:partial_shape]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_model_snippets.py ov:partial_shape
+
+@endsphinxtab
+
+@endsphinxtabset
But in most cases before getting static shape using `get_shape()` method, you need to check that shape is static.
@@ -72,7 +72,7 @@ Each OpenVINO™ Release introduces new operations and add these operations to a
For a complete list of operation sets supported in OpenVINO™ toolkit, see [Available Operations Sets](../ops/opset.md).
To add support of custom operations, see the [Add Custom OpenVINO Operations](../Extensibility_UG/Intro.md) document.
-## Build a Model in OpenVINO™ Runtime {#build_model}
+## Build a Model in OpenVINO™ Runtime {#ov_ug_build_model}
You can create a model from source. This section illustrates how to construct a model composed of operations from an available operation set.
@@ -80,78 +80,79 @@ Operation set `opsetX` integrates a list of pre-compiled operations that work
To build an `ov::Model` instance from `opset8` operations, include the following files:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
- :language: cpp
- :fragment: [ov:include]
+@snippet docs/snippets/ov_model_snippets.cpp ov:include
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_model_snippets.py
- :language: python
- :fragment: [import]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_model_snippets.py import
+
+@endsphinxtab
+
+@endsphinxtabset
The following code demonstrates how to create a simple model:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
- :language: cpp
- :fragment: [ov:create_simple_model]
+@snippet docs/snippets/ov_model_snippets.cpp ov:create_simple_model
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_model_snippets.py
- :language: python
- :fragment: [ov:create_simple_model]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_model_snippets.py ov:create_simple_model
+
+@endsphinxtab
+
+@endsphinxtabset
The following code creates a model with several outputs:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
- :language: cpp
- :fragment: [ov:create_advanced_model]
+@snippet docs/snippets/ov_model_snippets.cpp ov:create_advanced_model
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_model_snippets.py
- :language: python
- :fragment: [ov:create_advanced_model]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_model_snippets.py ov:create_advanced_model
+
+@endsphinxtab
+
+@endsphinxtabset
## Model debug capabilities
OpenVINO™ provides several debug capabilities:
- To receive additional messages about applied model modifications, rebuild the OpenVINO™ Runtime library with the `-DENABLE_OPENVINO_DEBUG=ON` option.
- Model can be visualized to image from the xDot format:
-@sphinxdirective
-.. tab:: C++
+ @sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
- :language: cpp
- :fragment: [ov:visualize]
+ @sphinxtab{C++}
-.. tab:: Python
+ @snippet docs/snippets/ov_model_snippets.cpp ov:visualize
- .. doxygensnippet:: docs/snippets/ov_model_snippets.py
- :language: python
- :fragment: [ov:visualize]
+ @endsphinxtab
-@endsphinxdirective
+ @sphinxtab{Python}
+
+ @snippet docs/snippets/ov_model_snippets.py ov:visualize
+
+ @endsphinxtab
+
+@endsphinxtabset
`ov::pass::VisualizeTree` can be parametrized via environment variables:
@@ -163,21 +164,20 @@ OpenVINO™ provides several debug capabilities:
OV_VISUALIZE_TREE_MEMBERS_NAME=1 - print member names
- Also model can be serialized to IR:
-@sphinxdirective
-.. tab:: C++
+ @sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
- :language: cpp
- :fragment: [ov:serialize]
+ @sphinxtab{C++}
-.. tab:: Python
+ @snippet docs/snippets/ov_model_snippets.cpp ov:serialize
- .. doxygensnippet:: docs/snippets/ov_model_snippets.py
- :language: python
- :fragment: [ov:serialize]
+ @endsphinxtab
-@endsphinxdirective
+ @sphinxtab{Python}
+
+ @snippet docs/snippets/ov_model_snippets.py ov:serialize
+
+ @endsphinxtab
## See Also
diff --git a/docs/OV_Runtime_UG/multi_device.md b/docs/OV_Runtime_UG/multi_device.md
index 7075294188f..6950b58a729 100644
--- a/docs/OV_Runtime_UG/multi_device.md
+++ b/docs/OV_Runtime_UG/multi_device.md
@@ -310,11 +310,9 @@ Note that while the performance of accelerators works well with Multi-Device, th
Every OpenVINO sample that supports the `-d` (which stands for "device") command-line option transparently accepts Multi-Device. The [Benchmark application](../../tools/benchmark_tool/README.md) is the best reference for the optimal usage of Multi-Device. As discussed earlier, you do not need to set up the number of requests, CPU streams or threads because the application provides optimal performance out of the box. Below is an example command to evaluate CPU+GPU performance with the Benchmark application:
```sh
-./benchmark_app.py –d MULTI:CPU,GPU –m
+benchmark_app –d MULTI:CPU,GPU –m
```
-> **NOTE**: If you installed OpenVINO with pip, use `benchmark_app -d MULTI:CPU,GPU -m `
-
The Multi-Device plugin supports FP16 IR files. The CPU plugin automatically upconverts it to FP32 and the other devices support it natively. Note that no demos are (yet) fully optimized for Multi-Device, by means of supporting the ov::optimal_number_of_infer_requests property, using the GPU streams/throttling, and so on.
### Video: MULTI Plugin
diff --git a/docs/OV_Runtime_UG/openvino_intro.md b/docs/OV_Runtime_UG/openvino_intro.md
index e5864a5f9d6..a20c0fb2349 100644
--- a/docs/OV_Runtime_UG/openvino_intro.md
+++ b/docs/OV_Runtime_UG/openvino_intro.md
@@ -1,8 +1,8 @@
-# OpenVINO™ Runtime User Guide {#openvino_docs_OV_Runtime_User_Guide}
+# Performing inference with OpenVINO Runtime {#openvino_docs_OV_Runtime_User_Guide}
@sphinxdirective
-.. _deep learning inference engine:
+.. _deep learning openvino runtime:
.. toctree::
:maxdepth: 1
@@ -19,8 +19,6 @@
openvino_docs_OV_UG_Performance_Hints
openvino_docs_OV_UG_Automatic_Batching
openvino_docs_IE_DG_network_state_intro
- openvino_docs_OV_Runtime_UG_Python_API_exclusives
- openvino_2_0_transition_guide
@endsphinxdirective
@@ -46,6 +44,6 @@ The scheme below illustrates the typical workflow for deploying a trained deep l
- * - **Inference Engine Concept**. Duration: 3:43
+ * - **OpenVINO Runtime Concept**. Duration: 3:43
@endsphinxdirective
diff --git a/docs/OV_Runtime_UG/ov_dynamic_shapes.md b/docs/OV_Runtime_UG/ov_dynamic_shapes.md
index 0208c2fc974..aae2fb06757 100644
--- a/docs/OV_Runtime_UG/ov_dynamic_shapes.md
+++ b/docs/OV_Runtime_UG/ov_dynamic_shapes.md
@@ -36,6 +36,7 @@ Apply those methods only if native dynamic shape API described in the following
The decision about using dynamic shapes should be based on proper benchmarking of real application with real data.
That's because unlike statically shaped models, inference of dynamically shaped ones takes different inference time depending on input data shape or input tensor content.
+Also using the dynamic shapes can bring more overheads in memory and running time per each inference call depending on hardware plugin and model used.
## Dynamic Shapes without Tricks
@@ -51,21 +52,20 @@ To avoid the tricks mentioned in the previous section there is a way to directly
This is achieved with the same reshape method that is used for alternating static shape of inputs.
Dynamic dimensions are specified as `-1` or `ov::Dimension()` instead of a positive number used for static dimensions:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
- :language: cpp
- :fragment: [ov_dynamic_shapes:reshape_undefined]
+@snippet docs/snippets/ov_dynamic_shapes.cpp ov_dynamic_shapes:reshape_undefined
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
- :language: python
- :fragment: [reshape_undefined]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_dynamic_shapes.py reshape_undefined
+@endsphinxtab
+
+@endsphinxtabset
To simplify the code, the examples assume that the model has a single input and single output.
However, there are no limitations on the number of inputs and outputs to apply dynamic shapes.
@@ -78,10 +78,10 @@ If such a model is converted with Model Optimizer or read directly by Core::read
Such dimensions automatically treated as dynamic ones.
So you don't need to call reshape if undefined dimensions are already configured in the original model or in the IR file.
-If the input model has undefined dimensions that you are not going to change during the inference, you can set them to static values, using the same `reshape` method of the model.
+If the input model has undefined dimensions that you are not going to change during the inference, it is recommended to set them to static values, using the same `reshape` method of the model.
From the API perspective any combination of dynamic and static dimensions can be configured.
-Model Optimizer provides capability to reshape the model during the conversion, including specifying dynamic dimensions.
+Model Optimizer provides identical capability to reshape the model during the conversion, including specifying dynamic dimensions.
Use this capability to save time on calling `reshape` method in the end application.
To get information about setting input shapes using Model Optimizer, refer to [Setting Input Shapes](../MO_DG/prepare_model/convert_model/Converting_Model.md)
@@ -90,21 +90,19 @@ To get information about setting input shapes using Model Optimizer, refer to [S
Besides marking a dimension just dynamic, you can also specify lower and/or upper bounds that define a range of allowed values for the dimension.
Bounds are coded as arguments for `ov::Dimension`:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
- :language: cpp
- :fragment: [ov_dynamic_shapes:reshape_bounds]
+@snippet docs/snippets/ov_dynamic_shapes.cpp ov_dynamic_shapes:reshape_bounds
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
- :language: python
- :fragment: [reshape_bounds]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_dynamic_shapes.py reshape_bounds
+@endsphinxtab
+@endsphinxtabset
Information about bounds gives opportunity for the inference plugin to apply additional optimizations.
Using dynamic shapes assumes the plugins apply more loose optimization technique during model compilation
@@ -114,8 +112,8 @@ For the same reason it is not recommended to leave dimensions as undefined witho
When specifying bounds, the lower bound is not so important as upper bound, because knowing of upper bound allows inference devices to more precisely allocate memory for intermediate tensors for inference and use lesser number of tuned kernels for different sizes.
Precisely speaking benefits of specifying lower or upper bound is device dependent.
-Depending on the plugin specifying upper bounds can be required.
-.
+Depending on the plugin specifying upper bounds can be required. For information about dynamic shapes support on different devices, see the [Features Support Matrix](@ref features_support_matrix).
+
If users known lower and upper bounds for dimension it is recommended to specify them even when plugin can execute model without the bounds.
### Setting Input Tensors
@@ -124,21 +122,19 @@ Preparing model with the reshape method was the first step.
The second step is passing a tensor with an appropriate shape to infer request.
This is similar to [regular steps](integrate_with_your_application.md), but now we can pass tensors with different shapes for the same executable model and even for the same inference request:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
- :language: cpp
- :fragment: [ov_dynamic_shapes:set_input_tensor]
+@snippet docs/snippets/ov_dynamic_shapes.cpp ov_dynamic_shapes:set_input_tensor
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
- :language: python
- :fragment: [set_input_tensor]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_dynamic_shapes.py set_input_tensor
+@endsphinxtab
+@endsphinxtabset
In the example above `set_input_tensor` is used to specify input tensors.
The real dimensions of the tensor is always static, because it is a concrete tensor and it doesn't have any dimension variations in contrast to model inputs.
@@ -149,21 +145,20 @@ Without doing that, the tensor returned by `get_input_tensor` is an empty tensor
Setting shape for input tensor is required when the corresponding input has at least one dynamic dimension regardless of bounds information.
The following example makes the same sequence of two infer request as the previous example but using `get_input_tensor` instead of `set_input_tensor`:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
- :language: cpp
- :fragment: [ov_dynamic_shapes:get_input_tensor]
+@snippet docs/snippets/ov_dynamic_shapes.cpp ov_dynamic_shapes:get_input_tensor
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
- :language: python
- :fragment: [get_input_tensor]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_dynamic_shapes.py get_input_tensor
+@endsphinxtab
+
+@endsphinxtabset
### Dynamic Shapes in Outputs
@@ -174,41 +169,40 @@ The same is true for other dimensions, like sequence length for NLP models or sp
Whether or not output has dynamic dimensions can be examined by querying output partial shape after model read or reshape.
The same is applicable for inputs. For example:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
- :language: cpp
- :fragment: [ov_dynamic_shapes:print_dynamic]
+@snippet docs/snippets/ov_dynamic_shapes.cpp ov_dynamic_shapes:print_dynamic
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
- :language: python
- :fragment: [print_dynamic]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_dynamic_shapes.py print_dynamic
+@endsphinxtab
+
+@endsphinxtabset
Appearing `?` or ranges like `1..10` means there are dynamic dimensions in corresponding inputs or outputs.
Or more programmatically:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
- :language: cpp
- :fragment: [ov_dynamic_shapes:detect_dynamic]
+@snippet docs/snippets/ov_dynamic_shapes.cpp ov_dynamic_shapes:detect_dynamic
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
- :language: python
- :fragment: [detect_dynamic]
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_dynamic_shapes.py detect_dynamic
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
If at least one dynamic dimension exists in output of the model, shape of the corresponding output tensor will be set as the result of inference call.
Before the first inference, memory for such a tensor is not allocated and has shape `[0]`.
diff --git a/docs/OV_Runtime_UG/ov_infer_request.md b/docs/OV_Runtime_UG/ov_infer_request.md
index 2574f907320..157c9f3ac9d 100644
--- a/docs/OV_Runtime_UG/ov_infer_request.md
+++ b/docs/OV_Runtime_UG/ov_infer_request.md
@@ -8,21 +8,21 @@ This class allows to set and get data for model inputs, outputs and run inferenc
`ov::InferRequest` can be created from the `ov::CompiledModel`:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [create_infer_request]
+@snippet docs/snippets/ov_infer_request.cpp create_infer_request
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [create_infer_request]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_infer_request.py create_infer_request
+
+@endsphinxtab
+
+@endsphinxtabset
## Run inference
@@ -32,188 +32,195 @@ This class allows to set and get data for model inputs, outputs and run inferenc
You can use `ov::InferRequest::infer`, which blocks the application execution, to infer model in the synchronous mode:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [sync_infer]
+@snippet docs/snippets/ov_infer_request.cpp sync_infer
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [sync_infer]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_infer_request.py sync_infer
+
+@endsphinxtab
+
+@endsphinxtabset
### Asynchronous mode
Asynchronous mode can improve application's overall frame-rate, because rather than wait for inference to complete, the app can keep working on the host, while the accelerator is busy. You can use `ov::InferRequest::start_async` to infer model in the asynchronous mode:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [async_infer]
+@snippet docs/snippets/ov_infer_request.cpp async_infer
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [async_infer]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_infer_request.py async_infer
+
+@endsphinxtab
+
+@endsphinxtabset
Asynchronous mode supports two ways the application waits for inference results:
* `ov::InferRequest::wait_for` - specifies the maximum duration in milliseconds to block the method. The method is blocked until the specified time has passed, or the result becomes available, whichever comes first.
-@sphinxdirective
+ @sphinxtabset
-.. tab:: C++
+ @sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [wait_for]
+ @snippet docs/snippets/ov_infer_request.cpp wait_for
-.. tab:: Python
+ @endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [wait_for]
+ @sphinxtab{Python}
+
+ @snippet docs/snippets/ov_infer_request.py wait_for
+
+ @endsphinxtab
+
+ @endsphinxtabset
-@endsphinxdirective
* `ov::InferRequest::wait` - waits until inference result becomes available
-@sphinxdirective
+ @sphinxtabset
-.. tab:: C++
+ @sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [wait]
+ @snippet docs/snippets/ov_infer_request.cpp wait
-.. tab:: Python
+ @endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [wait]
+ @sphinxtab{Python}
-@endsphinxdirective
+ @snippet docs/snippets/ov_infer_request.py wait
+
+ @endsphinxtab
+
+ @endsphinxtabset
Both methods are thread-safe.
When you are running several inference requests in parallel, a device can process them simultaneously, with no garauntees on the completion order. This may complicate a possible logic based on the `ov::InferRequest::wait` (unless your code needs to wait for the _all_ requests). For multi-request scenarios, consider using the `ov::InferRequest::set_callback` method to set a callback which is called upon completion of the request:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [set_callback]
+@snippet docs/snippets/ov_infer_request.cpp set_callback
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [set_callback]
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_infer_request.py set_callback
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
> **NOTE**: Use weak reference of infer_request (`ov::InferRequest*`, `ov::InferRequest&`, `std::weal_ptr`, etc.) in the callback. It is necessary to avoid cyclic references.
For more details, check [Classification Sample Async](../../samples/cpp/classification_sample_async/README.md).
You can use the `ov::InferRequest::cancel` method if you want to abort execution of the current inference request:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [cancel]
+@snippet docs/snippets/ov_infer_request.cpp cancel
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [cancel]
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_infer_request.py cancel
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
## Working with Input and Output tensors
`ov::InferRequest` allows to get input/output tensors by tensor name, index, port and without any arguments in case if model has only one input or output.
* `ov::InferRequest::get_input_tensor`, `ov::InferRequest::set_input_tensor`, `ov::InferRequest::get_output_tensor`, `ov::InferRequest::set_output_tensor` methods without arguments can be used to get or set input/output tensor for model with only one input/output:
-@sphinxdirective
-.. tab:: C++
+ @sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [get_set_one_tensor]
+ @sphinxtab{C++}
-.. tab:: Python
+ @snippet docs/snippets/ov_infer_request.cpp get_set_one_tensor
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [get_set_one_tensor]
+ @endsphinxtab
-@endsphinxdirective
+ @sphinxtab{Python}
+
+ @snippet docs/snippets/ov_infer_request.py get_set_one_tensor
+
+ @endsphinxtab
+
+ @endsphinxtabset
* `ov::InferRequest::get_input_tensor`, `ov::InferRequest::set_input_tensor`, `ov::InferRequest::get_output_tensor`, `ov::InferRequest::set_output_tensor` methods with argument can be used to get or set input/output tensor by input/output index:
-@sphinxdirective
+
+ @sphinxtabset
-.. tab:: C++
+ @sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [get_set_index_tensor]
+ @snippet docs/snippets/ov_infer_request.cpp get_set_index_tensor
-.. tab:: Python
+ @endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [get_set_index_tensor]
+ @sphinxtab{Python}
-@endsphinxdirective
+ @snippet docs/snippets/ov_infer_request.py get_set_index_tensor
+
+ @endsphinxtab
+
+ @endsphinxtabset
* `ov::InferRequest::get_tensor`, `ov::InferRequest::set_tensor` methods can be used to get or set input/output tensor by tensor name:
-@sphinxdirective
-.. tab:: C++
+ @sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [get_set_tensor]
+ @sphinxtab{C++}
-.. tab:: Python
+ @snippet docs/snippets/ov_infer_request.cpp get_set_tensor
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [get_set_tensor]
+ @endsphinxtab
-@endsphinxdirective
+ @sphinxtab{Python}
+
+ @snippet docs/snippets/ov_infer_request.py get_set_tensor
+
+ @endsphinxtab
+
+ @endsphinxtabset
* `ov::InferRequest::get_tensor`, `ov::InferRequest::set_tensor` methods can be used to get or set input/output tensor by port:
-@sphinxdirective
-.. tab:: C++
+ @sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [get_set_tensor_by_port]
+ @sphinxtab{C++}
-.. tab:: Python
+ @snippet docs/snippets/ov_infer_request.cpp get_set_tensor_by_port
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [get_set_tensor_by_port]
+ @endsphinxtab
-@endsphinxdirective
+ @sphinxtab{Python}
+
+ @snippet docs/snippets/ov_infer_request.py get_set_tensor_by_port
+
+ @endsphinxtab
+
+ @endsphinxtabset
## Examples of InferRequest usages
@@ -222,58 +229,58 @@ You can use the `ov::InferRequest::cancel` method if you want to abort execution
`ov::InferRequest` can be used to organize cascade of models. You need to have infer requests for each model.
In this case you can get output tensor from the first request using `ov::InferRequest::get_tensor` and set it as input for the second request using `ov::InferRequest::set_tensor`. But be careful, shared tensors across compiled models can be rewritten by the first model if the first infer request is run once again, while the second model has not started yet.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [cascade_models]
+@snippet docs/snippets/ov_infer_request.cpp cascade_models
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [cascade_models]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_infer_request.py cascade_models
+
+@endsphinxtab
+
+@endsphinxtabset
### Using of ROI tensors
It is possible to re-use shared input by several models. You do not need to allocate separate input tensor for a model if it processes a ROI object located inside of already allocated input of a previous model. For instance, when the first model detects objects in a video frame (stored as input tensor) and the second model accepts detected bounding boxes (ROI inside of the frame) as input. In this case, it is allowed to re-use pre-allocated input tensor (used by the first model) by the second model and just crop ROI without allocation of new memory using `ov::Tensor` with passing of `ov::Tensor` and `ov::Coordinate` as parameters.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [roi_tensor]
+@snippet docs/snippets/ov_infer_request.cpp roi_tensor
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [roi_tensor]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_infer_request.py roi_tensor
+
+@endsphinxtab
+
+@endsphinxtabset
### Using of remote tensors
You can create a remote tensor to work with remote device memory. `ov::RemoteContext` allows to create remote tensor.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_infer_request.cpp
- :language: cpp
- :fragment: [remote_tensor]
+@snippet docs/snippets/ov_infer_request.cpp remote_tensor
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_infer_request.py
- :language: python
- :fragment: [remote_tensor]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_infer_request.py remote_tensor
+
+@endsphinxtab
+
+@endsphinxtabset
diff --git a/docs/OV_Runtime_UG/performance_hints.md b/docs/OV_Runtime_UG/performance_hints.md
index 5e81921854b..051d8d66df4 100644
--- a/docs/OV_Runtime_UG/performance_hints.md
+++ b/docs/OV_Runtime_UG/performance_hints.md
@@ -1,6 +1,6 @@
# High-level Performance Hints {#openvino_docs_OV_UG_Performance_Hints}
-Each of the OpenVINO's [supported devices](supported_plugins/Supported_Devices.md) offers low-level performance settings. Tweaking this detailed configuration requires deep architecture understanding.
+Each of the OpenVINO's [supported devices](supported_plugins/Device_Plugins.md) offers low-level performance settings. Tweaking this detailed configuration requires deep architecture understanding.
Also, while the performance may be optimal for the specific combination of the device and the inferred model, the resulting configuration is not necessarily optimal for another device or model.
The OpenVINO performance hints are the new way to configure the performance with the _portability_ in mind.
diff --git a/docs/OV_Runtime_UG/preprocessing_details.md b/docs/OV_Runtime_UG/preprocessing_details.md
index b7fa4e97161..5df0ebe3015 100644
--- a/docs/OV_Runtime_UG/preprocessing_details.md
+++ b/docs/OV_Runtime_UG/preprocessing_details.md
@@ -6,58 +6,59 @@
If your model has only one input, then simple ov::preprocess::PrePostProcessor::input() will get a reference to preprocessing builder for this input (tensor, steps, model):
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:input_1]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:input_1
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:input_1]
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:input_1
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
In general, when model has multiple inputs/outputs, each one can be addressed by tensor name
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:input_name]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:input_name
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:input_name]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:input_name
+
+@endsphinxtab
+
+@endsphinxtabset
Or by it's index
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:input_index]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:input_index
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:input_index]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:input_index
+
+@endsphinxtab
+
+@endsphinxtabset
C++ references:
* ov::preprocess::InputTensorInfo
@@ -74,40 +75,39 @@ C++ references:
Typical data normalization includes 2 operations for each data item: subtract mean value and divide to standard deviation. This can be done with the following code:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:mean_scale]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:mean_scale
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:mean_scale]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:mean_scale
+@endsphinxtab
+
+@endsphinxtabset
In Computer Vision area normalization is usually done separately for R, G, B values. To do this, [layout with 'C' dimension](./layout_overview.md) shall be defined. Example:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:mean_scale_array]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:mean_scale_array
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:mean_scale_array]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:mean_scale_array
+
+@endsphinxtab
+
+@endsphinxtabset
C++ references:
* ov::preprocess::PreProcessSteps::mean()
@@ -120,21 +120,21 @@ In Computer Vision, image is represented by array of unsigned 8-but integer valu
To integrate precision conversion into execution graph as a preprocessing step, just do:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:convert_element_type]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:convert_element_type
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:convert_element_type]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:convert_element_type
+
+@endsphinxtab
+
+@endsphinxtabset
C++ references:
* ov::preprocess::InputTensorInfo::set_element_type()
@@ -147,39 +147,40 @@ Transposing of matrices/tensors is a typical operation in Deep Learning - you ma
Using [layout](./layout_overview.md) of user's tensor and layout of original model conversion can be done implicitly
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:convert_layout]
+@sphinxtab{C++}
-.. tab:: Python
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:convert_layout
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:convert_layout]
+@endsphinxtab
-@endsphinxdirective
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:convert_layout
+
+@endsphinxtab
+
+@endsphinxtabset
Or if you prefer manual transpose of axes without usage of [layout](./layout_overview.md) in your code, just do:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:convert_layout_2]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:convert_layout_2
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:convert_layout_2]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:convert_layout_2
+
+@endsphinxtab
+
+@endsphinxtabset
It performs the same transpose, but we believe that approach using source and destination layout can be easier to read and understand
@@ -195,39 +196,39 @@ Resizing of image is a typical preprocessing step for computer vision tasks. Wit
To resize the input image, it is needed to define `H` and `W` dimensions of [layout](./layout_overview.md)
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:resize_1]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:resize_1
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:resize_1]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:resize_1
+
+@endsphinxtab
+
+@endsphinxtabset
Or in case if original model has known spatial dimensions (widht+height), target width/height can be omitted
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:resize_2]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:resize_2
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:resize_2]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:resize_2
+
+@endsphinxtab
+
+@endsphinxtabset
C++ references:
* ov::preprocess::PreProcessSteps::resize()
@@ -238,41 +239,41 @@ C++ references:
Typical use case is to reverse color channels from RGB to BGR and wise versa. To do this, specify source color format in `tensor` section and perform `convert_color` preprocessing operation. In example below, user has `BGR` image and needs to convert it to `RGB` as required for model's input
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:convert_color_1]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:convert_color_1
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:convert_color_1]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:convert_color_1
+
+@endsphinxtab
+
+@endsphinxtabset
#### Color conversion - NV12/I420
Preprocessing also support YUV-family source color formats, i.e. NV12 and I420.
In advanced cases such YUV images can be splitted into separate planes, e.g. for NV12 images Y-component may come from one source and UV-component comes from another source. Concatenating such components in user's application manually is not a perfect solution from performance and device utilization perspectives, so there is a way to use Preprocessing API. For such cases there is `NV12_TWO_PLANES` and `I420_THREE_PLANES` source color formats, which will split original `input` to 2 or 3 inputs
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:convert_color_2]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:convert_color_2
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:convert_color_2]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:convert_color_2
+
+@endsphinxtab
+
+@endsphinxtabset
In this example, original `input` is being split to `input/y` and `input/uv` inputs. You can fill `input/y` from one source, and `input/uv` from another source. Color conversion to `RGB` will be performed using these sources, it is more optimal as there will be no additional copies of NV12 buffers.
@@ -289,21 +290,21 @@ Preprocessing API also allows adding custom preprocessing steps into execution g
If there is a need to insert some additional operations to execution graph right after input, like some specific crops and/or resizes - Preprocessing API can be a good choice to implement this
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:custom]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:custom
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:custom]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:custom
+
+@endsphinxtab
+
+@endsphinxtabset
C++ references:
* ov::preprocess::PreProcessSteps::custom()
@@ -324,21 +325,21 @@ Comparing to preprocessing, there is not so much operations needed to do in post
Usage of these operations is similar to Preprocessing. Some example is shown below:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:postprocess]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:postprocess
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:postprocess]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:postprocess
+
+@endsphinxtab
+
+@endsphinxtabset
C++ references:
* ov::preprocess::PostProcessSteps
diff --git a/docs/OV_Runtime_UG/preprocessing_overview.md b/docs/OV_Runtime_UG/preprocessing_overview.md
index 2b5c5ee0be8..ccbced19b4f 100644
--- a/docs/OV_Runtime_UG/preprocessing_overview.md
+++ b/docs/OV_Runtime_UG/preprocessing_overview.md
@@ -1,4 +1,4 @@
-# Overview of Preprocessing API {#openvino_docs_OV_Runtime_UG_Preprocessing_Overview}
+# Optimize Preprocessing {#openvino_docs_OV_Runtime_UG_Preprocessing_Overview}
@sphinxdirective
@@ -45,42 +45,41 @@ Intuitively, Preprocessing API consists of the following parts:
`ov::preprocess::PrePostProcessor` class allows specifying preprocessing and postprocessing steps for model read from disk.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:create]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:create
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:create]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:create
+
+@endsphinxtab
+
+@endsphinxtabset
### Declare user's data format
To address particular input of model/preprocessor, use `ov::preprocess::PrePostProcessor::input(input_name)` method
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:tensor]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:tensor
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:tensor]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:tensor
+@endsphinxtab
+
+@endsphinxtabset
Here we've specified all information about user's input:
- Precision is U8 (unsigned 8-bit integer)
@@ -92,21 +91,21 @@ Here we've specified all information about user's input:
Model's input already has information about precision and shape. Preprocessing API is not intended to modify this. The only thing that may be specified is input's data [layout](./layout_overview.md)
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:model]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:model
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:model]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:model
+
+@endsphinxtab
+
+@endsphinxtabset
Now, if model's input has `{1,3,224,224}` shape, preprocessing will be able to identify that model's `height=224`, `width=224`, `channels=3`. Height/width information is necessary for 'resize', and `channels` is needed for mean/scale normalization
@@ -115,21 +114,21 @@ Now, if model's input has `{1,3,224,224}` shape, preprocessing will be able to i
Now we can define sequence of preprocessing steps:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:steps]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:steps
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:steps]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:steps
+
+@endsphinxtab
+
+@endsphinxtabset
Here:
- Convert U8 to FP32 precision
@@ -143,21 +142,21 @@ Here:
We've finished with preprocessing steps declaration, now it is time to build it. For debugging purposes it is possible to print `PrePostProcessor` configuration on screen:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:build]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:build
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:build]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:build
+
+@endsphinxtab
+
+@endsphinxtabset
After this, `model` will accept U8 input with `{1, 480, 640, 3}` shape, with `BGR` channels order. All conversion steps will be integrated into execution graph. Now you can load model on device and pass your image to model as is, without any data manipulation on application's side
diff --git a/docs/OV_Runtime_UG/preprocessing_usecase_save.md b/docs/OV_Runtime_UG/preprocessing_usecase_save.md
index b0f5c023cd3..ebea93da552 100644
--- a/docs/OV_Runtime_UG/preprocessing_usecase_save.md
+++ b/docs/OV_Runtime_UG/preprocessing_usecase_save.md
@@ -18,59 +18,61 @@ In case if you have some preprocessing steps which can't be integrated into exec
Let's consider the example, there is an original `ONNX` model which takes one `float32` input with shape `{1, 3, 224, 224}` with `RGB` channels order, with mean/scale values applied. User's application can provide `BGR` image buffer with not fixed size. Additionally, we'll also imagine that our application provides input images as batches, each batch contains 2 images. Here is how model conversion code may look like in your model preparation script
- Includes / Imports
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:save_headers]
+@sphinxtab{C++}
-.. tab:: Python
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:save_headers
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:save_headers]
+@endsphinxtab
-@endsphinxdirective
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:save_headers
+
+@endsphinxtab
+
+@endsphinxtabset
- Preprocessing & Saving to IR code
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:save]
+@sphinxtab{C++}
-.. tab:: Python
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:save
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:save]
+@endsphinxtab
-@endsphinxdirective
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:save
+
+@endsphinxtab
+
+@endsphinxtabset
## Application code - load model to target device
After this, your application's code can load saved file and don't perform preprocessing anymore. In this example we'll also enable [model caching](./Model_caching_overview.md) to minimize load time when cached model is available
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_preprocessing.cpp
- :language: cpp
- :fragment: [ov:preprocess:save_load]
+@snippet docs/snippets/ov_preprocessing.cpp ov:preprocess:save_load
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_preprocessing.py
- :language: python
- :fragment: [ov:preprocess:save_load]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_preprocessing.py ov:preprocess:save_load
+
+@endsphinxtab
+
+@endsphinxtabset
## See Also
diff --git a/docs/OV_Runtime_UG/protecting_model_guide.md b/docs/OV_Runtime_UG/protecting_model_guide.md
index 222bdb90ffc..84b7e401ac5 100644
--- a/docs/OV_Runtime_UG/protecting_model_guide.md
+++ b/docs/OV_Runtime_UG/protecting_model_guide.md
@@ -52,7 +52,6 @@ should be called with `weights` passed as an empty `ov::Tensor`.
## Additional Resources
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
-- OpenVINO™ toolkit online documentation: [https://docs.openvino.ai](https://docs.openvino.ai)
- Model Optimizer Developer Guide: [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
- [OpenVINO™ runTime User Guide](openvino_intro.md)
- For more information on Sample Applications, see the [OpenVINO Samples Overview](Samples_Overview.md)
diff --git a/docs/OV_Runtime_UG/supported_plugins/AutoPlugin_Debugging.md b/docs/OV_Runtime_UG/supported_plugins/AutoPlugin_Debugging.md
index a2546b01e56..2c457ffd072 100644
--- a/docs/OV_Runtime_UG/supported_plugins/AutoPlugin_Debugging.md
+++ b/docs/OV_Runtime_UG/supported_plugins/AutoPlugin_Debugging.md
@@ -69,7 +69,6 @@ All major performance calls of both OpenVINO™ Runtime and the AUTO plugin are
@endsphinxdirective
For more information, you can refer to:
-* [OpenVINO profiling](https://docs.openvino.ai/latest/groupie_dev_profiling.html)
* [Intel® VTune™ Profiler User Guide](https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top/api-support/instrumentation-and-tracing-technology-apis.html)
### Analyze Code Performance on Linux
diff --git a/docs/OV_Runtime_UG/supported_plugins/Device_Plugins.md b/docs/OV_Runtime_UG/supported_plugins/Device_Plugins.md
index 2e79c9a7bc7..9c31d027c14 100644
--- a/docs/OV_Runtime_UG/supported_plugins/Device_Plugins.md
+++ b/docs/OV_Runtime_UG/supported_plugins/Device_Plugins.md
@@ -36,21 +36,21 @@ OpenVINO runtime also has several execution capabilities which work on top of ot
Devices similar to the ones we have used for benchmarking can be accessed using [Intel® DevCloud for the Edge](https://devcloud.intel.com/edge/), a remote development environment with access to Intel® hardware and the latest versions of the Intel® Distribution of the OpenVINO™ Toolkit. [Learn more](https://devcloud.intel.com/edge/get_started/devcloud/) or [Register here](https://inteliot.force.com/DevcloudForEdge/s/).
-
-## Features support matrix
+@anchor features_support_matrix
+## Features Support Matrix
The table below demonstrates support of key features by OpenVINO device plugins.
-| Capability | [CPU](CPU.md) | [GPU](GPU.md) | [GNA](GNA.md) | [VPU](VPU.md) | [Arm® CPU](ARM_CPU.md) |
-| ---------- | --- | --- | --- | --- | --- |
-| [Heterogeneous execution](../hetero_execution.md)| Yes | Yes | No | ? | Yes |
-| [Multi-device execution](../multi_device.md) | Yes | Yes | Partial | ? | Yes |
-| [Automatic batching](../automatic_batching.md) | No | Yes | No | ? | No |
-| [Multi-stream execution](@ref openvino_docs_optimization_guide_dldt_optimization_guide) | Yes | Yes | No | ? | Yes |
-| [Models caching](../Model_caching_overview.md) | Yes | Partial | Yes | ? | No |
-| [Dynamic shapes](../ov_dynamic_shapes.md) | Yes | Partial | No | ? | No |
-| Import/Export | Yes | No | Yes | ? | No |
-| [Preprocessing acceleration](../preprocessing_overview.md) | Yes | Yes | No | ? | Partial |
-| [Stateful models](../network_state_intro.md) | Yes | No | Yes | ? | No |
-| [Extensibility](@ref openvino_docs_Extensibility_UG_Intro) | Yes | Yes | No | ? | No |
+| Capability | [CPU](CPU.md) | [GPU](GPU.md) | [GNA](GNA.md) |[Arm® CPU](ARM_CPU.md) |
+| ---------- | --- | --- | --- | --- |
+| [Heterogeneous execution](../hetero_execution.md)| Yes | Yes | No | Yes |
+| [Multi-device execution](../multi_device.md) | Yes | Yes | Partial | Yes |
+| [Automatic batching](../automatic_batching.md) | No | Yes | No | No |
+| [Multi-stream execution](../../optimization_guide/dldt_deployment_optimization_tput.md) | Yes | Yes | No | Yes |
+| [Models caching](../Model_caching_overview.md) | Yes | Partial | Yes | No |
+| [Dynamic shapes](../ov_dynamic_shapes.md) | Yes | Partial | No | No |
+| [Import/Export](../../../tools/compile_tool/README.md) | Yes | No | Yes | No |
+| [Preprocessing acceleration](../preprocessing_overview.md) | Yes | Yes | No | Partial |
+| [Stateful models](../network_state_intro.md) | Yes | No | Yes | No |
+| [Extensibility](@ref openvino_docs_Extensibility_UG_Intro) | Yes | Yes | No | No |
For more details on plugin specific feature limitation, see corresponding plugin pages.
diff --git a/docs/OV_Runtime_UG/supported_plugins/GNA.md b/docs/OV_Runtime_UG/supported_plugins/GNA.md
index af7f7f16ee0..edb907578ef 100644
--- a/docs/OV_Runtime_UG/supported_plugins/GNA.md
+++ b/docs/OV_Runtime_UG/supported_plugins/GNA.md
@@ -63,28 +63,23 @@ Starting with 2021.4.1 release of OpenVINO and 03.00.00.1363 version of Windows*
to assure that workloads satisfy real-time execution. In this mode, the GNA driver automatically falls back on CPU for a particular infer request
if the HW queue is not empty, so there is no need for explicitly switching between GNA and CPU.
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/gna/configure.cpp
- :language: cpp
- :fragment: [include]
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/gna/configure.cpp
- :language: cpp
- :fragment: [ov_gna_exec_mode_hw_with_sw_fback]
+@snippet docs/snippets/gna/configure.cpp include
+@snippet docs/snippets/gna/configure.cpp ov_gna_exec_mode_hw_with_sw_fback
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/gna/configure.py
- :language: python
- :fragment: [import]
+@sphinxtab{Python}
- .. doxygensnippet:: docs/snippets/gna/configure.py
- :language: python
- :fragment: [ov_gna_exec_mode_hw_with_sw_fback]
+@snippet docs/snippets/gna/configure.py import
+@snippet docs/snippets/gna/configure.py ov_gna_exec_mode_hw_with_sw_fback
-@endsphinxdirective
+@endsphinxtab
+
+@endsphinxtabset
> **NOTE**: Due to the "first come - first served" nature of GNA driver and the QoS feature, this mode may lead to increased CPU consumption
if there are several clients using GNA simultaneously.
@@ -125,37 +120,39 @@ The GNA plugin supports import/export capability which helps to significantly de
If you are willing to export a model for a specific version of GNA HW, please use the `ov::intel_gna::compile_target` property and then export the model:
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/gna/import_export.cpp
- :language: cpp
- :fragment: [ov_gna_export]
+@sphinxtab{C++}
-.. tab:: Python
+@snippet docs/snippets/gna/import_export.cpp ov_gna_export
- .. doxygensnippet:: docs/snippets/gna/import_export.py
- :language: python
- :fragment: [ov_gna_export]
+@endsphinxtab
-@endsphinxdirective
+@sphinxtab{Python}
+
+@snippet docs/snippets/gna/import_export.py ov_gna_export
+
+@endsphinxtab
+
+@endsphinxtabset
Import model:
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/gna/import_export.cpp
- :language: cpp
- :fragment: [ov_gna_import]
+@sphinxtab{C++}
-.. tab:: Python
+@snippet docs/snippets/gna/import_export.cpp ov_gna_import
- .. doxygensnippet:: docs/snippets/gna/import_export.py
- :language: python
- :fragment: [ov_gna_import]
+@endsphinxtab
-@endsphinxdirective
+@sphinxtab{Python}
+
+@snippet docs/snippets/gna/import_export.py ov_gna_import
+
+@endsphinxtab
+
+@endsphinxtabset
[Compile Tool](@ref openvino_inference_engine_tools_compile_tool_README) or [Speech C++ Sample](@ref openvino_inference_engine_samples_speech_sample_README) can be used to compile model.
@@ -287,47 +284,45 @@ Intel® GNA plugin supports the processing of context-windowed speech frames in
Please refer to [Layout API overview](@ref openvino_docs_OV_Runtime_UG_Layout_Overview) to determine batch dimension.
-To set layout of model inputs in runtime use [Preprocessing API](@ref openvino_docs_OV_Runtime_UG_Preprocessing_Overview):
+To set layout of model inputs in runtime use [Optimize Preprocessing](@ref openvino_docs_OV_Runtime_UG_Preprocessing_Overview) guide:
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/gna/set_batch.cpp
- :language: cpp
- :fragment: [include]
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/gna/set_batch.cpp
- :language: cpp
- :fragment: [ov_gna_set_nc_layout]
+@snippet docs/snippets/gna/set_batch.cpp include
+@snippet docs/snippets/gna/set_batch.cpp ov_gna_set_nc_layout
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/gna/set_batch.py
- :language: python
- :fragment: [import]
+@sphinxtab{Python}
- .. doxygensnippet:: docs/snippets/gna/set_batch.py
- :language: python
- :fragment: [ov_gna_set_nc_layout]
+@snippet docs/snippets/gna/set_batch.py import
+@snippet docs/snippets/gna/set_batch.py ov_gna_set_nc_layout
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
then set batch size:
-@sphinxdirective
-.. tab:: C++
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/gna/set_batch.cpp
- :language: cpp
- :fragment: [ov_gna_set_batch_size]
+@sphinxtab{C++}
-.. tab:: Python
+@snippet docs/snippets/gna/set_batch.cpp ov_gna_set_batch_size
- .. doxygensnippet:: docs/snippets/gna/set_batch.py
- :language: python
- :fragment: [ov_gna_set_batch_size]
+@endsphinxtab
+
+@sphinxtab{Python}
+
+@snippet docs/snippets/gna/set_batch.py ov_gna_set_batch_size
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
Increasing batch size only improves efficiency of `MatMul` layers.
diff --git a/docs/OV_Runtime_UG/supported_plugins/GPU.md b/docs/OV_Runtime_UG/supported_plugins/GPU.md
index 7099ccc307b..645a0e937ea 100644
--- a/docs/OV_Runtime_UG/supported_plugins/GPU.md
+++ b/docs/OV_Runtime_UG/supported_plugins/GPU.md
@@ -44,27 +44,27 @@ Available devices:
Then device name can be passed to `ov::Core::compile_model()` method:
-@sphinxdirective
+@sphinxtabset
-.. tab:: Running on default device
+@sphinxtab{Running on default device}
- .. doxygensnippet:: docs/snippets/gpu/compile_model.cpp
- :language: cpp
- :fragment: [compile_model_default_gpu]
+@snippet docs/snippets/gpu/compile_model.cpp compile_model_default_gpu
-.. tab:: Running on specific GPU
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/gpu/compile_model.cpp
- :language: cpp
- :fragment: [compile_model_gpu_with_id]
+@sphinxtab{Running on specific GPU}
-.. tab:: Running on specific tile
+@snippet docs/snippets/gpu/compile_model.cpp compile_model_gpu_with_id
- .. doxygensnippet:: docs/snippets/gpu/compile_model.cpp
- :language: cpp
- :fragment: [compile_model_gpu_with_id_and_tile]
+@endsphinxtab
-@endsphinxdirective
+@sphinxtab{Running on specific tile}
+
+@snippet docs/snippets/gpu/compile_model.cpp compile_model_gpu_with_id_and_tile
+
+@endsphinxtab
+
+@endsphinxtabset
## Supported inference data types
GPU plugin supports the following data types as inference precision of internal primitives:
@@ -102,21 +102,21 @@ GPU plugin is capable of reporting `ov::max_batch_size` and `ov::optimal_batch_s
thus automatic batching is automatically enabled when `ov::optimal_batch_size` is > 1 and `ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)` is set.
Alternatively it can be enabled explicitly via the device notion, e.g. `"BATCH:GPU"`.
-@sphinxdirective
+@sphinxtabset
-.. tab:: Batching via BATCH plugin
+@sphinxtab{Batching via BATCH plugin}
- .. doxygensnippet:: docs/snippets/gpu/compile_model.cpp
- :language: cpp
- :fragment: [compile_model_batch_plugin]
+@snippet docs/snippets/gpu/compile_model.cpp compile_model_batch_plugin
-.. tab:: Batching via throughput hint
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/gpu/compile_model.cpp
- :language: cpp
- :fragment: [compile_model_auto_batch]
+@sphinxtab{Bacthing via throughput hint}
-@endsphinxdirective
+@snippet docs/snippets/gpu/compile_model.cpp compile_model_auto_batch
+
+@endsphinxtab
+
+@endsphinxtabset
See [Automatic batching page](../automatic_batching.md) for more details.
diff --git a/docs/OV_Runtime_UG/supported_plugins/GPU_RemoteTensor_API.md b/docs/OV_Runtime_UG/supported_plugins/GPU_RemoteTensor_API.md
index 638f4735293..fa98c5f9cac 100644
--- a/docs/OV_Runtime_UG/supported_plugins/GPU_RemoteTensor_API.md
+++ b/docs/OV_Runtime_UG/supported_plugins/GPU_RemoteTensor_API.md
@@ -1,5 +1,4 @@
-Remote Tensor API of GPU Plugin {#openvino_docs_OV_UG_supported_plugins_GPU_RemoteTensor_API}
-================================
+# Remote Tensor API of GPU Plugin {#openvino_docs_OV_UG_supported_plugins_GPU_RemoteTensor_API}
The GPU plugin implementation of the `ov::RemoteContext` and `ov::RemoteTensor` interfaces supports GPU
pipeline developers who need video memory sharing and interoperability with existing native APIs
@@ -38,49 +37,59 @@ additional parameter.
To create `ov::RemoteContext` object for user context, explicitly provide the context to the plugin using constructor for one
of `ov::RemoteContext` derived classes.
-@sphinxdirective
+@sphinxtabset
-.. tab:: Linux
+@sphinxtab{Linux}
- .. tab:: Create from cl_context
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [context_from_cl_context]
+@sphinxtab{Create from cl_context}
- .. tab:: Create from cl_queue
+@snippet docs/snippets/gpu/remote_objects_creation.cpp context_from_cl_context
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [context_from_cl_queue]
+@endsphinxtab
- .. tab:: Create from VADisplay
+@sphinxtab{Create from cl_queue}
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [context_from_va_display]
+@snippet docs/snippets/gpu/remote_objects_creation.cpp context_from_cl_queue
-.. tab:: Windows
+@endsphinxtab
- .. tab:: Create from cl_context
+@sphinxtab{Create from VADisplay}
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [context_from_cl_context]
+@snippet docs/snippets/gpu/remote_objects_creation.cpp context_from_va_display
- .. tab:: Create from cl_queue
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [context_from_cl_queue]
+@endsphinxtabset
- .. tab:: Create from ID3D11Device
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [context_from_d3d_device]
+@sphinxtab{Windows}
-@endsphinxdirective
+@sphinxtabset
+
+@sphinxtab{Create from cl_context}
+
+@snippet docs/snippets/gpu/remote_objects_creation.cpp context_from_cl_context
+
+@endsphinxtab
+
+@sphinxtab{Create from cl_queue}
+
+@snippet docs/snippets/gpu/remote_objects_creation.cpp context_from_cl_queue
+
+@endsphinxtab
+
+@sphinxtab{Create from ID3D11Device}
+
+@snippet docs/snippets/gpu/remote_objects_creation.cpp context_from_d3d_device
+
+@endsphinxtab
+
+@endsphinxtabset
+
+@endsphinxtabset
### Getting RemoteContext from the plugin
@@ -91,22 +100,21 @@ Once the plugin options are changed, the internal context is replaced by the new
To request the current default context of the plugin use one of the following methods:
-@sphinxdirective
+@sphinxtabset
-.. tab:: Get context from Core
+@sphinxtab{Get context from Core}
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [default_context_from_core]
+@snippet docs/snippets/gpu/remote_objects_creation.cpp default_context_from_core
-.. tab:: Get context from CompiledModel
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [default_context_from_model]
+@sphinxtab{Bacthing via throughput hint}
+@snippet docs/snippets/gpu/remote_objects_creation.cpp default_context_from_model
-@endsphinxdirective
+@endsphinxtab
+
+@endsphinxtabset
## Memory sharing between application and GPU plugin
@@ -118,61 +126,72 @@ of the `ov::RemoteContext` sub-classes.
`ov::intel_gpu::ocl::ClContext` has multiple overloads of `create_tensor` methods which allow to wrap pre-allocated native handles with `ov::RemoteTensor`
object or request plugin to allocate specific device memory. See code snippets below for more details.
-@sphinxdirective
+@sphinxtabset
-.. tab:: Wrap native handles
+@sphinxtab{Wrap native handles}
- .. tab:: USM pointer
+@sphinxtabset
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [wrap_usm_pointer]
+@sphinxtab{USM pointer}
- .. tab:: cl_mem
+@snippet docs/snippets/gpu/remote_objects_creation.cpp wrap_usm_pointer
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [wrap_cl_mem]
+@endsphinxtab
- .. tab:: cl::Buffer
+@sphinxtab{cl_mem}
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [wrap_cl_buffer]
+@snippet docs/snippets/gpu/remote_objects_creation.cpp wrap_cl_mem
- .. tab:: cl::Image2D
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [wrap_cl_image]
+@sphinxtab{cl::Buffer}
- .. tab:: biplanar NV12 surface
+@snippet docs/snippets/gpu/remote_objects_creation.cpp wrap_cl_buffer
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [wrap_nv12_surface]
+@endsphinxtab
-.. tab:: Allocate device memory
+@sphinxtab{cl::Image2D}
- .. tab:: USM host memory
+@snippet docs/snippets/gpu/remote_objects_creation.cpp wrap_cl_image
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [allocate_usm_host]
+@endsphinxtab
- .. tab:: USM device memory
+@sphinxtab{biplanar NV12 surface}
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [allocate_usm_device]
+@snippet docs/snippets/gpu/remote_objects_creation.cpp wrap_nv12_surface
- .. tab:: cl::Buffer
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/gpu/remote_objects_creation.cpp
- :language: cpp
- :fragment: [allocate_cl_buffer]
+@endsphinxtabset
+@endsphinxtab
-@endsphinxdirective
+@sphinxtab{Allocate device memory}
+
+@sphinxtabset
+
+@sphinxtab{USM host memory}
+
+@snippet docs/snippets/gpu/remote_objects_creation.cpp allocate_usm_host
+
+@endsphinxtab
+
+@sphinxtab{USM device memory}
+
+@snippet docs/snippets/gpu/remote_objects_creation.cpp allocate_usm_device
+
+@endsphinxtab
+
+@sphinxtab{cl::Buffer}
+
+@snippet docs/snippets/gpu/remote_objects_creation.cpp allocate_cl_buffer
+
+@endsphinxtab
+
+@endsphinxtabset
+
+@endsphinxtab
+
+@endsphinxtabset
`ov::intel_gpu::ocl::D3DContext` and `ov::intel_gpu::ocl::VAContext` classes are derived from `ov::intel_gpu::ocl::ClContext`,
thus they provide functionality described above and extends it
@@ -192,22 +211,22 @@ should be added before model compilation:
Since `ov::intel_gpu::ocl::ClImage2DTensor` (and derived classes) doesn't support batched surfaces, in cases when batching and surface sharing are required
at the same time, user need to set inputs via `ov::InferRequest::set_tensors` method with vector of shared surfaces for each plane:
-@sphinxdirective
+@sphinxtabset
-.. tab:: Single batch
+@sphinxtab{Single batch}
- .. doxygensnippet:: docs/snippets/gpu/preprocessing.cpp
- :language: cpp
- :fragment: [single_batch]
+@snippet docs/snippets/gpu/preprocessing.cpp single_batch
-.. tab:: Multiple batches
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/gpu/preprocessing.cpp
- :language: cpp
- :fragment: [batched_case]
+@sphinxtab{Multiple batches}
+@snippet docs/snippets/gpu/preprocessing.cpp batched_case
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
I420 color format can be processed in similar way
diff --git a/docs/OV_Runtime_UG/supported_plugins/Supported_Devices.md b/docs/OV_Runtime_UG/supported_plugins/Supported_Devices.md
index 9661eb86c3e..ec7afd53fd9 100644
--- a/docs/OV_Runtime_UG/supported_plugins/Supported_Devices.md
+++ b/docs/OV_Runtime_UG/supported_plugins/Supported_Devices.md
@@ -20,20 +20,6 @@ The OpenVINO Runtime provides unique capabilities to infer deep learning models
Devices similar to the ones we have used for benchmarking can be accessed using [Intel® DevCloud for the Edge](https://devcloud.intel.com/edge/), a remote development environment with access to Intel® hardware and the latest versions of the Intel® Distribution of the OpenVINO™ Toolkit. [Learn more](https://devcloud.intel.com/edge/get_started/devcloud/) or [Register here](https://inteliot.force.com/DevcloudForEdge/s/).
-The table below shows the plugin libraries and additional dependencies for Linux, Windows and macOS platforms.
-
-| Plugin | Library name for Linux | Dependency libraries for Linux | Library name for Windows | Dependency libraries for Windows | Library name for macOS | Dependency libraries for macOS |
-|--------|-----------------------------|-------------------------------------------------------------|--------------------------|--------------------------------------------------------------------------------------------------------|------------------------------|---------------------------------------------|
-| CPU | `libopenvino_intel_cpu_plugin.so` | | `openvino_intel_cpu_plugin.dll` | | `libopenvino_intel_cpu_plugin.so` | |
-| GPU | `libopenvino_intel_gpu_plugin.so` | `libOpenCL.so` | `openvino_intel_gpu_plugin.dll` | `OpenCL.dll` | Is not supported | - |
-| MYRIAD | `libopenvino_intel_myriad_plugin.so` | `libusb.so` | `openvino_intel_myriad_plugin.dll`| `usb.dll` | `libopenvino_intel_myriad_plugin.so` | `libusb.dylib` |
-| HDDL | `libintel_hddl_plugin.so` | `libbsl.so`, `libhddlapi.so`, `libmvnc-hddl.so` | `intel_hddl_plugin.dll` | `bsl.dll`, `hddlapi.dll`, `json-c.dll`, `libcrypto-1_1-x64.dll`, `libssl-1_1-x64.dll`, `mvnc-hddl.dll` | Is not supported | - |
-| GNA | `libopenvino_intel_gna_plugin.so` | `libgna.so`, | `openvino_intel_gna_plugin.dll` | `gna.dll` | Is not supported | - |
-| HETERO | `libopenvino_hetero_plugin.so` | Same as for selected plugins | `openvino_hetero_plugin.dll` | Same as for selected plugins | `libopenvino_hetero_plugin.so` | Same as for selected plugins |
-| MULTI | `libopenvino_auto_plugin.so` | Same as for selected plugins | `openvino_auto_plugin.dll` | Same as for selected plugins | `libopenvino_auto_plugin.so` | Same as for selected plugins |
-| AUTO | `libopenvino_auto_plugin.so` | Same as for selected plugins | `openvino_auto_plugin.dll` | Same as for selected plugins | `libopenvino_auto_plugin.so` | Same as for selected plugins |
-| BATCH | `libopenvino_auto_batch_plugin.so` | Same as for selected plugins | `openvino_auto_batch_plugin.dll` | Same as for selected plugins | `libopenvino_auto_batch_plugin.so` | Same as for selected plugins |
-
## Supported Configurations
The OpenVINO Runtime can inference models in different formats with various input and output formats.
diff --git a/docs/OV_Runtime_UG/supported_plugins/config_properties.md b/docs/OV_Runtime_UG/supported_plugins/config_properties.md
index 5b0fef66c20..465ebc1a05d 100644
--- a/docs/OV_Runtime_UG/supported_plugins/config_properties.md
+++ b/docs/OV_Runtime_UG/supported_plugins/config_properties.md
@@ -21,21 +21,22 @@ Refer to the [Hello Query Device С++ Sample](../../../samples/cpp/hello_query_d
Based on read-only property `ov::available_devices`, OpenVINO Core collects information about currently available devices enabled by OpenVINO plugins and returns information using the `ov::Core::get_available_devices` method:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_properties_api.cpp
- :language: cpp
- :fragment: [get_available_devices]
+@snippet docs/snippets/ov_properties_api.cpp get_available_devices
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_api.py
- :language: python
- :fragment: [get_available_devices]
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_properties_api.py get_available_devices
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
The function returns a list of available devices, for example:
@@ -73,27 +74,41 @@ For documentation about OpenVINO common device-independent properties, refer to
The code below demonstrates how to query `HETERO` device priority of devices which will be used to infer the model:
-@snippet snippets/ov_properties_api.cpp hetero_priorities
+@sphinxtabset
+
+@sphinxtab{C++}
+
+@snippet docs/snippets/ov_properties_api.cpp hetero_priorities
+
+@endsphinxtab
+
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_properties_api.py hetero_priorities
+
+@endsphinxtab
+
+@endsphinxtabset
> **NOTE**: All properties have a type, which is specified during property declaration. Based on this, actual type under `auto` is automatically deduced by C++ compiler.
To extract device properties such as available devices (`ov::available_devices`), device name (`ov::device::full_name`), supported properties (`ov::supported_properties`), and others, use the `ov::Core::get_property` method:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_properties_api.cpp
- :language: cpp
- :fragment: [cpu_device_name]
+@snippet docs/snippets/ov_properties_api.cpp cpu_device_name
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_api.py
- :language: python
- :fragment: [cpu_device_name]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_properties_api.py cpu_device_name
+
+@endsphinxtab
+
+@endsphinxtabset
A returned value appears as follows: `Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz`.
@@ -109,21 +124,21 @@ A returned value appears as follows: `Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz`.
accept variadic list of properties as last arguments. Each property in such parameters lists should be used as function call to pass property value with specified property type.
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_properties_api.cpp
- :language: cpp
- :fragment: [compile_model_with_property]
+@snippet docs/snippets/ov_properties_api.cpp compile_model_with_property
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_api.py
- :language: python
- :fragment: [compile_model_with_property]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_properties_api.py compile_model_with_property
+
+@endsphinxtab
+
+@endsphinxtabset
The example below specifies hints that a model should be compiled to be inferenced with multiple inference requests in parallel to achive best throughput while inference should be performed without accuracy loss with FP32 precision.
@@ -131,21 +146,21 @@ The example below specifies hints that a model should be compiled to be inferenc
`ov::Core::set_property` with a given device name should be used to set global configuration properties which are the same accross multiple `ov::Core::compile_model`, `ov::Core::query_model`, etc. calls, while setting property on the specific `ov::Core::compile_model` call applies properties only for current call:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_properties_api.cpp
- :language: cpp
- :fragment: [core_set_property_then_compile]
+@snippet docs/snippets/ov_properties_api.cpp core_set_property_then_compile
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_api.py
- :language: python
- :fragment: [core_set_property_then_compile]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_properties_api.py core_set_property_then_compile
+
+@endsphinxtab
+
+@endsphinxtabset
### Properties on CompiledModel level
@@ -153,74 +168,75 @@ The example below specifies hints that a model should be compiled to be inferenc
The `ov::CompiledModel::get_property` method is used to get property values the compiled model has been created with or a compiled model level property such as `ov::optimal_number_of_infer_requests`:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_properties_api.cpp
- :language: cpp
- :fragment: [optimal_number_of_infer_requests]
+@snippet docs/snippets/ov_properties_api.cpp optimal_number_of_infer_requests
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_api.py
- :language: python
- :fragment: [optimal_number_of_infer_requests]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_properties_api.py optimal_number_of_infer_requests
+
+@endsphinxtab
+
+@endsphinxtabset
Or the current temperature of the `MYRIAD` device:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_properties_api.cpp
- :language: cpp
- :fragment: [device_thermal]
+@snippet docs/snippets/ov_properties_api.cpp device_thermal
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_api.py
- :language: python
- :fragment: [device_thermal]
+@sphinxtab{Python}
+
+@snippet docs/snippets/ov_properties_api.py device_thermal
+
+@endsphinxtab
+
+@endsphinxtabset
-@endsphinxdirective
Or the number of threads that would be used for inference on `CPU` device:
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_properties_api.cpp
- :language: cpp
- :fragment: [inference_num_threads]
+@snippet docs/snippets/ov_properties_api.cpp inference_num_threads
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_api.py
- :language: python
- :fragment: [inference_num_threads]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_properties_api.py inference_num_threads
+
+@endsphinxtab
+
+@endsphinxtabset
#### Setting properties for compiled model
The only mode that supports this method is [Multi-Device execution](../multi_device.md):
-@sphinxdirective
+@sphinxtabset
-.. tab:: C++
+@sphinxtab{C++}
- .. doxygensnippet:: docs/snippets/ov_properties_api.cpp
- :language: cpp
- :fragment: [multi_device]
+@snippet docs/snippets/ov_properties_api.cpp multi_device
-.. tab:: Python
+@endsphinxtab
- .. doxygensnippet:: docs/snippets/ov_properties_api.py
- :language: python
- :fragment: [multi_device]
+@sphinxtab{Python}
-@endsphinxdirective
+@snippet docs/snippets/ov_properties_api.py multi_device
+
+@endsphinxtab
+
+@endsphinxtabset
diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css
index 763b9f7505b..fd48b99c149 100644
--- a/docs/_static/css/custom.css
+++ b/docs/_static/css/custom.css
@@ -78,6 +78,38 @@ div.highlight {
color: #fff;
}
+/* Transition banner */
+.transition-banner {
+ top: 60px;
+ background: #76CEFF;
+ position: fixed;
+ text-align: center;
+ color: white;
+ z-index: 1001;
+ display: block;
+ padding:0 2rem;
+ font-size: var(--pst-sidebar-font-size);
+ border: none;
+ border-radius: 0;
+ font-weight: bold;
+}
+
+.transition-banner > p {
+ margin-bottom: 0;
+}
+
+.transition-banner .close {
+ padding: 0 1.25rem;
+ color: #000;
+}
+
+
+@media (max-width: 720px) {
+ .transition-banner {
+ margin-top: 2rem;
+ }
+}
+
@media (min-width: 1200px) {
.container, .container-lg, .container-md, .container-sm, .container-xl {
max-width: 1800px;
diff --git a/docs/_static/images/inputs_defined.png b/docs/_static/images/inputs_defined.png
new file mode 100644
index 00000000000..2abeb53b706
--- /dev/null
+++ b/docs/_static/images/inputs_defined.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:50c191b2949e981811fbdd009b4138d88d2731432f308de010757058061cacbe
+size 37171
diff --git a/docs/_static/images/omz_banner.png b/docs/_static/images/omz_banner.png
deleted file mode 100644
index 32a9e7f899e..00000000000
--- a/docs/_static/images/omz_banner.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6a3d820b43de20a74d857cb720783c1b579624afde26a2bb4bb097ba8fd0bd79
-size 2052
diff --git a/docs/_static/images/original_model_banner.png b/docs/_static/images/original_model_banner.png
deleted file mode 100644
index 76d5e0dd808..00000000000
--- a/docs/_static/images/original_model_banner.png
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:04e954b5e1501f958ea2c03303760786ca7a57aaf6de335cb936750c675e6107
-size 1626
diff --git a/docs/_static/js/custom.js b/docs/_static/js/custom.js
index 23763b3f0ca..8e323f6fa6e 100644
--- a/docs/_static/js/custom.js
+++ b/docs/_static/js/custom.js
@@ -28,7 +28,7 @@ var wapSection = 'openvinotoolkit';
// legal notice for benchmarks
function addLegalNotice() {
if (window.location.href.indexOf('openvino_docs_performance_') !== -1) {
- var legalNotice = $('
-
-@endsphinxdirective
+# Model Accuracy for INT8 and FP32 Precision {#openvino_docs_performance_int8_vs_fp32}
The following table shows the absolute accuracy drop that is calculated as the difference in accuracy between the FP32 representation of a model and its INT8 representation.
@@ -228,45 +21,72 @@ The following table shows the absolute accuracy drop that is calculated as the d
Metric Name
Absolute Accuracy Drop, %
+
+
bert-base-cased
+
SST-2
+
accuracy
+
0.57
+
0.11
+
0.11
+
0.57
+
bert-large-uncased-whole-word-masking-squad-0001
-
SQuAD
+
SQUAD
F1
-
0.62
-
0.71
-
0.62
-
0.62
+
0.76
+
0.59
+
0.68
+
0.76
brain-tumor- segmentation- 0001-MXNET
BraTS
Dice-index@ Mean@ Overall Tumor
-
0.08
0.10
0.10
-
0.08
+
0.10
+
0.10
+
+
+
brain-tumor- segmentation- 0001-ONNX
+
BraTS
+
Dice-index@ Mean@ Overall Tumor
+
0.11
+
0.12
+
0.12
+
0.11
deeplabv3-TF
-
VOC 2012 Segmentation
+
VOC2012
mean_iou
-
0.09
-
0.41
-
0.41
-
0.09
+
0.03
+
0.42
+
0.42
+
0.03
densenet-121-TF
ImageNet
-
acc@top-1
-
0.49
+
accuracy@top1
+
0.50
0.56
0.56
-
0.49
+
0.50
+
+
+
efficientdet-d0-tf
+
COCO2017
+
coco_precision
+
0.55
+
0.81
+
0.81
+
0.55
facenet- 20180408- 102900-TF
-
LFW
+
LFW_MTCNN
pairwise_ accuracy _subsets
0.05
0.12
@@ -275,170 +95,365 @@ The following table shows the absolute accuracy drop that is calculated as the d
faster_rcnn_ resnet50_coco-TF
-
MS COCO
+
COCO2017
coco_ precision
-
0.09
-
0.09
-
0.09
-
0.09
+
0.16
+
0.16
+
0.16
+
0.16
-
inception-v3-TF
+
googlenet-v3-tf
ImageNet
-
acc@top-1
+
accuracy@top1
+
0.01
+
0.01
+
0.01
+
0.01
+
+
+
googlenet-v4-tf
+
ImageNet
+
accuracy@top1
+
0.09
+
0.06
+
0.06
+
0.09
+
+
+
mask_rcnn_resnet50_ atrous_coco-tf
+
COCO2017
+
coco_orig_precision
0.02
-
0.01
-
0.01
+
0.10
+
0.10
0.02
-
mobilenet- ssd-CF
+
mobilenet- ssd-caffe
VOC2012
mAP
-
0.06
-
0.04
-
0.04
-
0.06
+
0.51
+
0.54
+
0.54
+
0.51
mobilenet-v2-1.0- 224-TF
ImageNet
acc@top-1
-
0.40
-
0.76
-
0.76
-
0.40
+
0.35
+
0.79
+
0.79
+
0.35
-
+
mobilenet-v2- PYTORCH
ImageNet
acc@top-1
-
0.36
-
0.52
-
0.52
-
0.36
+
0.34
+
0.58
+
0.58
+
0.34
resnet-18- pytorch
ImageNet
acc@top-1
+
0.29
0.25
0.25
-
0.25
-
0.25
+
0.29
resnet-50- PYTORCH
ImageNet
acc@top-1
-
0.19
-
0.21
-
0.21
-
0.19
+
0.24
+
0.20
+
0.20
+
0.24
resnet-50- TF
ImageNet
acc@top-1
-
0.11
-
0.11
-
0.11
-
0.11
-
-
-
squeezenet1.1- CF
-
ImageNet
-
acc@top-1
-
0.64
-
0.66
-
0.66
-
0.64
+
0.10
+
0.09
+
0.09
+
0.10
ssd_mobilenet_ v1_coco-tf
-
VOC2012
-
COCO mAp
-
0.17
-
2.96
-
2.96
-
0.17
-
-
-
ssd300-CF
-
MS COCO
-
COCO mAp
-
0.18
+
COCO2017
+
coco_precision
+
0.23
3.06
3.06
-
0.18
+
0.17
ssdlite_ mobilenet_ v2-TF
-
MS COCO
-
COCO mAp
-
0.11
-
0.43
-
0.43
-
0.11
-
-
-
yolo_v4-TF
-
MS COCO
-
COCO mAp
-
0.06
-
0.03
-
0.03
-
0.06
-
-
-
unet-camvid- onnx-0001
-
MS COCO
-
COCO mAp
-
0.29
-
0.29
-
0.31
-
0.29
+
COCO2017
+
coco_precision
+
0.09
+
0.44
+
0.44
+
0.09
ssd-resnet34- 1200-onnx
-
MS COCO
-
COCO mAp
-
0.02
-
0.03
-
0.03
-
0.02
-
-
-
googlenet-v4-tf
-
ImageNet
+
COCO2017
COCO mAp
+
0.09
0.08
-
0.06
-
0.06
-
0.06
+
0.09
+
0.09
-
vgg19-caffe
-
ImageNet
-
COCO mAp
-
0.02
-
0.04
-
0.04
-
0.02
+
unet-camvid- onnx-0001
+
CamVid
+
mean_iou@mean
+
0.33
+
0.33
+
0.33
+
0.33
yolo-v3-tiny-tf
-
MS COCO
+
COCO2017
COCO mAp
-
0.02
-
0.6
-
0.6
-
0.02
+
0.05
+
0.08
+
0.08
+
0.05
+
+
+
yolo_v4-TF
+
COCO2017
+
COCO mAp
+
0.03
+
0.01
+
0.01
+
0.03
@endsphinxdirective
-
+The table below illustrates the speed-up factor for the performance gain by switching from an FP32 representation of an OpenVINO™ supported model to its INT8 representation.
-For more complete information about performance and benchmark results, visit: [www.intel.com/benchmarks](https://www.intel.com/benchmarks) and [Optimization Notice](https://software.intel.com/articles/optimization-notice). [Legal Information](../Legal_Information.md).
+@sphinxdirective
+.. raw:: html
+
+
+
+
+
+
Intel® Core™ i7-8700T
+
Intel® Core™ i7-1185G7
+
Intel® Xeon® W-1290P
+
Intel® Xeon® Platinum 8270
+
+
+
OpenVINO benchmark model name
+
Dataset
+
Throughput speed-up FP16-INT8 vs FP32
+
+
+
bert-base-cased
+
SST-2
+
1.5
+
3.0
+
1.4
+
2.4
+
+
+
bert-large-uncased-whole-word-masking-squad-0001
+
SQUAD
+
1.7
+
3.2
+
1.7
+
3.3
+
+
+
brain-tumor- segmentation- 0001-MXNET
+
BraTS
+
1.6
+
2.0
+
1.9
+
2.1
+
+
+
brain-tumor- segmentation- 0001-ONNX
+
BraTS
+
2.6
+
3.2
+
3.3
+
3.0
+
+
+
deeplabv3-TF
+
VOC2012
+
1.9
+
3.1
+
3.5
+
3.8
+
+
+
densenet-121-TF
+
ImageNet
+
1.7
+
3.3
+
1.9
+
3.7
+
+
+
efficientdet-d0-tf
+
COCO2017
+
1.6
+
1.9
+
2.5
+
2.3
+
+
+
facenet- 20180408- 102900-TF
+
LFW_MTCNN
+
2.1
+
3.5
+
2.4
+
3.4
+
+
+
faster_rcnn_ resnet50_coco-TF
+
COCO2017
+
1.9
+
3.7
+
1.9
+
3.3
+
+
+
googlenet-v3-tf
+
ImageNet
+
1.9
+
3.7
+
2.0
+
4.0
+
+
+
googlenet-v4-tf
+
ImageNet
+
1.9
+
3.7
+
2.0
+
4.2
+
+
+
mask_rcnn_resnet50_ atrous_coco-tf
+
COCO2017
+
1.6
+
3.6
+
1.6
+
2.3
+
+
+
mobilenet- ssd-caffe
+
VOC2012
+
1.6
+
3.1
+
2.2
+
3.8
+
+
+
mobilenet-v2-1.0- 224-TF
+
ImageNet
+
1.5
+
2.4
+
2.1
+
3.3
+
+
+
mobilenet-v2- PYTORCH
+
ImageNet
+
1.5
+
2.4
+
2.1
+
3.4
+
+
+
resnet-18- pytorch
+
ImageNet
+
2.0
+
4.1
+
2.2
+
4.1
+
+
+
resnet-50- PYTORCH
+
ImageNet
+
1.9
+
3.5
+
2.1
+
4.0
+
+
+
resnet-50- TF
+
ImageNet
+
1.9
+
3.5
+
2.0
+
4.0
+
+
+
ssd_mobilenet_ v1_coco-tf
+
COCO2017
+
1.7
+
3.1
+
2.2
+
3.6
+
+
+
ssdlite_ mobilenet_ v2-TF
+
COCO2017
+
1.6
+
2.4
+
2.7
+
3.2
+
+
+
ssd-resnet34- 1200-onnx
+
COCO2017
+
1.7
+
4.0
+
1.7
+
3.2
+
+
+
unet-camvid- onnx-0001
+
CamVid
+
1.6
+
4.6
+
1.6
+
6.2
+
+
+
yolo-v3-tiny-tf
+
COCO2017
+
1.8
+
3.4
+
2.0
+
3.5
+
+
+
yolo_v4-TF
+
COCO2017
+
2.3
+
3.4
+
2.4
+
3.1
+
+
+
+@endsphinxdirective
+
+
\ No newline at end of file
diff --git a/docs/benchmarks/performance_ov_vs_tf.md b/docs/benchmarks/performance_ov_vs_tf.md
new file mode 100644
index 00000000000..55ba34455c5
--- /dev/null
+++ b/docs/benchmarks/performance_ov_vs_tf.md
@@ -0,0 +1,102 @@
+# OpenVINO™ and TensorFlow Comparison on Select Networks and Platforms
+
+This page presents the results of comparing OpenVINO™ and TensorFlow executing benchmarking on the same hardware platforms, and using neural network models based on the same original source models. All models were converted using the processes and conversion tools native to each framework. The hardware platforms represent a broad performance range, covering Intel® Celeron®, Intel® Core™, and Intel® Xeon® Scalable based platforms. (Refer to [System Description](https://docs.openvino.ai/resources/benchmark_files/system_configurations_2022.1.html) for further details).
+
+## deeplabv3
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+## densenet-121
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+## facenet-20180408-102900
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+## faster_rcnn_resnet50_coco
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+## inception-v3
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+## inception-v4
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+## resnet-50
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+## ssd_mobilenet_v1_coco
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+## ssd_resnet34_1200x1200
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+## yolo-v3-tiny
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
+
+## YOLOv4
+
+@sphinxdirective
+.. raw:: html
+
+
+
+@endsphinxdirective
\ No newline at end of file
diff --git a/docs/documentation.md b/docs/documentation.md
index 776be27753e..36732f14532 100644
--- a/docs/documentation.md
+++ b/docs/documentation.md
@@ -17,7 +17,8 @@
:hidden:
openvino_docs_OV_Runtime_User_Guide
- openvino_docs_install_guides_deployment_manager_tool
+ openvino_2_0_transition_guide
+ openvino_deployment_guide
openvino_inference_engine_tools_compile_tool_README
@@ -42,8 +43,8 @@
workbench_docs_Workbench_DG_Introduction
workbench_docs_Workbench_DG_Install
workbench_docs_Workbench_DG_Work_with_Models_and_Sample_Datasets
- workbench_docs_Workbench_DG_User_Guide
- workbench_docs_security_Workbench
+ Tutorials
+ User Guide
workbench_docs_Workbench_DG_Troubleshooting
.. toctree::
@@ -92,7 +93,7 @@ This section provides reference documents that guide you through developing your
With the [Model Downloader](@ref omz_tools_downloader) and [Model Optimizer](MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) guides, you will learn to download pre-trained models and convert them for use with the OpenVINO™ toolkit. You can provide your own model or choose a public or Intel model from a broad selection provided in the [Open Model Zoo](model_zoo.md).
## Deploying Inference
-The [OpenVINO™ Runtime User Guide](OV_Runtime_UG/openvino_intro.md) explains the process of creating your own application that runs inference with the OpenVINO™ toolkit. The [API Reference](./api_references.html) defines the OpenVINO Runtime API for Python, C++, and C. The OpenVINO Runtime API is what you'll use to create an OpenVINO™ inference application, use enhanced operations sets and other features. After writing your application, you can use the [Deployment Manager](install_guides/deployment-manager-tool.md) for deploying to target devices.
+The [OpenVINO™ Runtime User Guide](./OV_Runtime_UG/openvino_intro.md) explains the process of creating your own application that runs inference with the OpenVINO™ toolkit. The [API Reference](./api_references.html) defines the OpenVINO Runtime API for Python, C++, and C. The OpenVINO Runtime API is what you'll use to create an OpenVINO™ inference application, use enhanced operations sets and other features. After writing your application, you can use the [Deployment with OpenVINO](./OV_Runtime_UG/deployment/deployment_intro.md) for deploying to target devices.
## Tuning for Performance
The toolkit provides a [Performance Optimization Guide](optimization_guide/dldt_optimization_guide.md) and utilities for squeezing the best performance out of your application, including [Accuracy Checker](@ref omz_tools_accuracy_checker), [Post-Training Optimization Tool](@ref pot_README), and other tools for measuring accuracy, benchmarking performance, and tuning your application.
diff --git a/docs/doxyrest/frame/common/doc.lua b/docs/doxyrest/frame/common/doc.lua
index 780cb1ac74a..2b60339fbda 100644
--- a/docs/doxyrest/frame/common/doc.lua
+++ b/docs/doxyrest/frame/common/doc.lua
@@ -464,6 +464,24 @@ function formatDocBlock_sphinxdirective(block, context)
return "\n\n" .. code .. "\n\n"
end
+function formatDocBlock_sphinxtabset(block, context)
+ return "\n\n" .. ".. raw:: html\n\n