[DOCS] Assets move - snippets for master (#24510)
Jira: 138084 Moving snippets assets closer to the source files.
This commit is contained in:
parent
9280cec95c
commit
2f313179d0
|
|
@ -96,14 +96,14 @@ Discontinued:
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/export_compiled_model.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/export_compiled_model.py
|
||||
:language: python
|
||||
:fragment: [export_compiled_model]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/export_compiled_model.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/export_compiled_model.cpp
|
||||
:language: cpp
|
||||
:fragment: [export_compiled_model]
|
||||
|
||||
|
|
|
|||
|
|
@ -94,14 +94,14 @@ Extensions can be loaded from a code with the ``ov::Core::add_extension`` metho
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.py
|
||||
:language: python
|
||||
:fragment: [add_extension]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [add_extension]
|
||||
|
||||
|
|
@ -113,14 +113,14 @@ The ``Identity`` is a custom operation class defined in :doc:`Custom Operation G
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.py
|
||||
:language: python
|
||||
:fragment: [add_frontend_extension]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [add_frontend_extension]
|
||||
|
||||
|
|
@ -176,14 +176,14 @@ This CMake script finds OpenVINO, using the ``find_package`` CMake command.
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.py
|
||||
:language: python
|
||||
:fragment: [add_extension_lib]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [add_extension_lib]
|
||||
|
||||
|
|
|
|||
|
|
@ -23,14 +23,14 @@ There are two options for using the custom operation configuration file:
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/gpu/custom_kernels_api.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/custom_kernels_api.py
|
||||
:language: python
|
||||
:fragment: [part0]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/gpu/custom_kernels_api.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/custom_kernels_api.cpp
|
||||
:language: cpp
|
||||
:fragment: [part0]
|
||||
|
||||
|
|
|
|||
|
|
@ -57,11 +57,11 @@ class that works well if all the following conditions are satisfied:
|
|||
The following example maps ONNX operation with the type of `Identity <https://github.com/onnx/onnx/blob/main/docs/Operators.md#Identity>`__
|
||||
to OpenVINO template extension ``Identity`` class.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_Identity_header]
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_Identity]
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ The mapping doesn’t involve any attributes, as operation Identity doesn’t ha
|
|||
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:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_read_model]
|
||||
|
||||
|
|
@ -99,14 +99,14 @@ In this case, you can directly say that 'MyRelu' -> ``Relu`` mapping should be u
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.py
|
||||
:language: python
|
||||
:fragment: [py_frontend_extension_MyRelu]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_MyRelu]
|
||||
|
||||
|
|
@ -136,14 +136,14 @@ based on ``visit_attributes`` method that should be defined for any OpenVINO ope
|
|||
|
||||
Imagine you have CustomOperation class implementation that has two attributes with names: ``attr1`` and ``attr2``.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_CustomOperation]
|
||||
|
||||
And original model in framework representation also has operation with name ``CustomOperation`` with the same
|
||||
``attr1`` and ``attr2`` attributes. Then with the following code:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_CustomOperation_as_is]
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ Both ``attr1`` and ``attr2`` are copied from framework representation to OpenVIN
|
|||
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:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_CustomOperation_rename]
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ If copying of an attribute is not what you need, ``OpExtension`` also can set at
|
|||
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:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_CustomOperation_rename_set]
|
||||
|
||||
|
|
@ -196,14 +196,14 @@ outputs map to OpenVINO ``CustomOperation`` first and second output respectively
|
|||
|
||||
Given that, such custom operation can be registered by the following:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_CustomOperation_as_is_paddle]
|
||||
|
||||
|
||||
Second example shows how to map the operation with named inputs and outputs, but when names of attributes are different:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_CustomOperation_rename_paddle]
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ Second example shows how to map the operation with named inputs and outputs, but
|
|||
and the last one shows how to map the operation with named inputs and outputs, but when (in order to correctly map framework
|
||||
operation to OpenVINO operation) one of the attributes has to be set to predefined value:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_CustomOperation_rename_set_paddle]
|
||||
|
||||
|
|
@ -234,7 +234,7 @@ with two attributes ``alpha`` and ``beta``:
|
|||
|
||||
Below is a snippet of ``CustomElu`` class showing how to define its attributes:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_framework_map_CustomElu]
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ Let's see an example of how you can map ``CustomElu`` to PyTorch `aten::elu <htt
|
|||
``aten::elu`` has ``alpha`` attribute second on the input list, but it doesn't have ``beta``.
|
||||
So in order to map it to ``CustomElu`` you can use the following:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_framework_map_CustomElu_mapping]
|
||||
|
||||
|
|
@ -261,11 +261,11 @@ Let's consider the following example. Imagine you have an ONNX model with ``Cust
|
|||
a TensorFlow model with ``CustomOpV3`` operation (this operation has ``axis`` attribute) and a PaddlePaddle model with ``CustomOp`` (with ``mode`` attribute)
|
||||
that has input named "X" and output named "Out" and all of them can be implemented with a single OpenVINO operation ``CustomOp`` like follows:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_framework_map_macro_headers]
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_framework_map_macro_CustomOp]
|
||||
|
||||
|
|
@ -303,7 +303,7 @@ This mapping also specifies the input name "X" and output name "Out".
|
|||
|
||||
The last step is to register this custom operation by following:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_framework_map_macro_add_extension]
|
||||
|
||||
|
|
@ -348,14 +348,14 @@ from ONNX according to the formula: ``ThresholdedRelu(x, alpha) -> Multiply(x, C
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.py
|
||||
:language: python
|
||||
:fragment: [py_frontend_extension_ThresholdedReLU_header]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_ThresholdedReLU_header]
|
||||
|
||||
|
|
@ -364,14 +364,14 @@ from ONNX according to the formula: ``ThresholdedRelu(x, alpha) -> Multiply(x, C
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.py
|
||||
:language: python
|
||||
:fragment: [py_frontend_extension_ThresholdedReLU]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_ThresholdedReLU]
|
||||
|
||||
|
|
@ -381,7 +381,7 @@ The next example shows how to use ``ConversionExtension`` to convert PyTorch
|
|||
to demonstrate how to use ``get_values_from_const_input`` function to fetch an attribute value from input:
|
||||
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.py
|
||||
:language: python
|
||||
:fragment: [py_frontend_extension_aten_hardtanh]
|
||||
|
||||
|
|
@ -402,7 +402,7 @@ For PaddlePaddle operations, it is generally necessary to provide names for all
|
|||
Usually those names can be found in source code of the individual operation in PaddlePaddle code.
|
||||
The following example shows such conversion for the ``top_k_v2`` operation.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_paddle_TopK]
|
||||
|
||||
|
|
@ -412,7 +412,7 @@ For a description of TensorFlow operations, including the names of their outputs
|
|||
`tf.raw_ops <https://www.tensorflow.org/api_docs/python/tf/raw_ops/>`__ documentation page.
|
||||
The next example shows such conversion for the ``TopKV2`` operation.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_extensions.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_extensions.cpp
|
||||
:language: cpp
|
||||
:fragment: [frontend_extension_tf_TopK]
|
||||
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ Step 1. Common optimizations
|
|||
|
||||
This step is optional for LPT but typically is presented in OpenVINO™ plugins. The step doesn't use any LPT transformation. Firstly, the step disables dequantization operations constant folding on constant subgraph on weights to prevent the lost of dequantization info on the next plugin transformations. After that, it optimizes the transformation function and converts operations to operation set 1. Typically, usage of this step is the simplest way to meet LPT requirements for the input quantized model. If plugin can guarantee that LPT input requirements are met, then this step can be skipped.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/lpt_intel_cpu_plugin.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/lpt_intel_cpu_plugin.cpp
|
||||
:language: cpp
|
||||
:fragment: [lpt_common]
|
||||
|
||||
|
|
@ -297,7 +297,7 @@ Step 2. Low precision transformations execution
|
|||
+++++++++++++++++++++++++++++++++++++++++++++++
|
||||
This step is mandatory. It configures and runs LPT transformations.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/lpt_intel_cpu_plugin.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/lpt_intel_cpu_plugin.cpp
|
||||
:language: cpp
|
||||
:fragment: [lpt_execution]
|
||||
|
||||
|
|
@ -306,7 +306,7 @@ Step 3. Plugin-specific transformations
|
|||
|
||||
This step is optional. It modifies the transformation function to a device-specific operation set.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/lpt_intel_cpu_plugin.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/lpt_intel_cpu_plugin.cpp
|
||||
:language: cpp
|
||||
:fragment: [lpt_device]
|
||||
|
||||
|
|
@ -440,7 +440,7 @@ Operation precision restrictions
|
|||
|
||||
This option defines precisions which allowed for the operation input ports. The option value is passed as input argument for ``LowPrecision`` constructor. For example:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/lpt_intel_cpu_plugin.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/lpt_intel_cpu_plugin.cpp
|
||||
:language: cpp
|
||||
:fragment: [lpt_supported_precisions]
|
||||
|
||||
|
|
@ -451,7 +451,7 @@ Operation per tensor quantization restrictions
|
|||
|
||||
This option defines if operation supports per-tensor quantization only. The option value is passed as input argument for ``LowPrecision`` constructor. For example:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/lpt_intel_cpu_plugin.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/lpt_intel_cpu_plugin.cpp
|
||||
:language: cpp
|
||||
:fragment: [per_tensor_quantization]
|
||||
|
||||
|
|
@ -467,7 +467,7 @@ Typical customization use cases
|
|||
|
||||
Plugin specific customization can be implemented via transformation callbacks. For example: asymmetric quantization support can be easily customizable via ``LayerTransformation::isAsymmetricQuantization`` and ``WeightableLayerTransformation::isAsymmetricOnWeights`` methods usage in callbacks. For example:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/lpt_intel_cpu_plugin.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/lpt_intel_cpu_plugin.cpp
|
||||
:language: cpp
|
||||
:fragment: [asymmetric_quantization]
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ The original model key features:
|
|||
|
||||
Transformations are run with the following parameters:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/lpt_intel_cpu_plugin.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/lpt_intel_cpu_plugin.cpp
|
||||
:language: cpp
|
||||
:fragment: [lpt_markup_pipeline]
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ With output port we can set inputs for newly created operations.
|
|||
|
||||
Lets look at the code example.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [ov:ports_example]
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ We will review real replacement case where Negative operation is replaced with M
|
|||
|
||||
.. image:: ./../../_static/images/ov_replace_node.png
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [ov:replace_node]
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ We will review real replacement case where Negative operation is replaced with M
|
|||
|
||||
The alternative way to do the same replacement is the following:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [ov:manual_replace]
|
||||
|
||||
|
|
@ -67,13 +67,13 @@ Another transformation example is insertion.
|
|||
|
||||
.. image:: ./../../_static/images/ov_insert_node.png
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [ov:insert_node]
|
||||
|
||||
The alternative way to the insert operation is to make a node copy and use ``ov::replace_node()``:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [ov:insert_node_with_copy]
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ Another type of node replacement is its elimination.
|
|||
|
||||
To eliminate operation, OpenVINO™ has special method that considers all limitations related to OpenVINO™ Runtime.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [ov:eliminate_node]
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ When developing a transformation, you need to follow these transformation rules:
|
|||
Each ``ov::Node`` has an unique name and a friendly name. In transformations we care only about friendly name because it represents the name from the model.
|
||||
To avoid losing friendly name when replacing node with other node or subgraph, set the original friendly name to the latest node in replacing subgraph. See the example below.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [ov:replace_friendly_name]
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ In most cases, transformations have the following types: 1:1 (replace node with
|
|||
Currently, there is no mechanism that automatically detects transformation types, so we need to propagate this runtime information manually. See the examples below.
|
||||
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [ov:copy_runtime_info]
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ When transformation has multiple fusions or decompositions, ``ov::copy_runtime_i
|
|||
If your transformation inserts constant sub-graphs that need to be folded, do not forget to use ``ov::pass::ConstantFolding()`` after your transformation or call constant folding directly for operation.
|
||||
The example below shows how constant subgraph can be constructed.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [ov:constant_subgraph]
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ Manual constant folding is more preferable than ``ov::pass::ConstantFolding()``
|
|||
|
||||
Below you can find an example of manual constant folding:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_pattern_transformation.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_pattern_transformation.cpp
|
||||
:language: cpp
|
||||
:fragment: [manual_constant_folding]
|
||||
|
||||
|
|
@ -190,13 +190,13 @@ In addition, ``ov::pass::Manager`` has extended debug capabilities (find more in
|
|||
|
||||
The example below shows basic usage of ``ov::pass::Manager``
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_pattern_transformation.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_pattern_transformation.cpp
|
||||
:language: cpp
|
||||
:fragment: [matcher_pass:manager3]
|
||||
|
||||
Another example shows how multiple matcher passes can be united into single GraphRewrite.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_pattern_transformation.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_pattern_transformation.cpp
|
||||
:language: cpp
|
||||
:fragment: [matcher_pass:manager2]
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ OpenVINO Graph Rewrite Pass
|
|||
``ov::pass::GraphRewrite`` serves for running multiple matcher passes on ``ov::Model`` in a single graph traversal.
|
||||
Example:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_pattern_transformation.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_pattern_transformation.cpp
|
||||
:language: cpp
|
||||
:fragment: [matcher_pass:graph_rewrite]
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ OpenVINO Matcher Pass
|
|||
|
||||
Template for MatcherPass transformation class
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_pattern_transformation.hpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_pattern_transformation.hpp
|
||||
:language: cpp
|
||||
:fragment: [graph_rewrite:template_transformation_hpp]
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_pattern_transformation.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_pattern_transformation.cpp
|
||||
:language: cpp
|
||||
:fragment: [graph_rewrite:template_transformation_cpp]
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ Then you need to take the last created operation and put it as a root of the pat
|
|||
.. note::
|
||||
Any nodes in a pattern that have no consumers and are not registered as root will not be used in pattern matching.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [pattern:simple_example]
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ Implement callback
|
|||
|
||||
Callback is an action applied to every pattern entrance. In general, callback is the lambda function that takes Matcher object with detected subgraph.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [pattern:callback_example]
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ That means that matcher passes registered in ``ov::pass::GraphRewrite`` will be
|
|||
|
||||
The example below shows how single MatcherPass can fuse sequence of operations using the ``register_new_node`` method.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_pattern_transformation.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_pattern_transformation.cpp
|
||||
:language: cpp
|
||||
:fragment: [matcher_pass:relu_fusion]
|
||||
|
||||
|
|
@ -99,19 +99,19 @@ MatcherPass has multiple ways to be executed:
|
|||
|
||||
* Run on a single node - it can be useful if you want to run MatcherPass inside another transformation.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_pattern_transformation.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_pattern_transformation.cpp
|
||||
:language: cpp
|
||||
:fragment: [matcher_pass:run_on_node]
|
||||
|
||||
* Run on ``ov::Model`` using GraphRewrite - this approach gives ability to run MatcherPass on whole ``ov::Model``. Moreover, multiple MatcherPass transformation can be registered in a single GraphRewite to be executed in a single graph traversal.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_pattern_transformation.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_pattern_transformation.cpp
|
||||
:language: cpp
|
||||
:fragment: [matcher_pass:graph_rewrite]
|
||||
|
||||
* Run on ``ov::Model`` using ``ov::pass::Manager`` - this approach helps you to register MatcherPass for execution on ``ov::Model`` as another transformation types.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_pattern_transformation.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_pattern_transformation.cpp
|
||||
:language: cpp
|
||||
:fragment: [matcher_pass:manager]
|
||||
|
||||
|
|
@ -137,19 +137,19 @@ The example below shows basic usage of ``ov::passpattern::any_input``.
|
|||
Here we construct Multiply pattern with arbitrary first input and Constant as a second input.
|
||||
Also as Multiply is commutative operation, it does not matter in which order we set inputs (any_input/Constant or Constant/any_input) because both cases will be matched.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [pattern:label_example]
|
||||
|
||||
This example shows how we can construct a pattern when operation has arbitrary number of inputs.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [pattern:concat_example]
|
||||
|
||||
This example shows how to use predicate to construct a pattern. Also it shows how to match pattern manually on given node.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_model_snippets.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp
|
||||
:language: cpp
|
||||
:fragment: [pattern:predicate_example]
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ OpenVINO Model Pass
|
|||
|
||||
Template for ModelPass transformation class
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_model_transformation.hpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_model_transformation.hpp
|
||||
:language: cpp
|
||||
:fragment: [model_pass:template_transformation_hpp]
|
||||
|
||||
.. doxygensnippet:: docs/snippets/template_model_transformation.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/template_model_transformation.cpp
|
||||
:language: cpp
|
||||
:fragment: [model_pass:template_transformation_cpp]
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ Using Encrypted Models with OpenVINO
|
|||
|
||||
|
||||
.. meta::
|
||||
:description: Learn how to encrypt and optimize a model before its deployment
|
||||
to the edge device to ensure inference integrity and
|
||||
:description: Learn how to encrypt and optimize a model before its deployment
|
||||
to the edge device to ensure inference integrity and
|
||||
provide copyright protection.
|
||||
|
||||
Deploying deep-learning capabilities to edge devices can present security challenges like ensuring inference integrity, or providing copyright protection of your deep-learning models.
|
||||
|
|
@ -29,7 +29,7 @@ Loading Encrypted Models
|
|||
|
||||
The OpenVINO Runtime requires model decryption before loading. Allocate a temporary memory block for model decryption and use the ``ov::Core::read_model`` method to load the model from a memory buffer. For more information, see the ``ov::Core`` Class Reference Documentation.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/protecting_model_guide.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/protecting_model_guide.cpp
|
||||
:language: cpp
|
||||
:fragment: part0
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ Use the ``ov::Core::read_model`` to set model representations and weights respec
|
|||
|
||||
Currently there is no way to read external weights from memory for ONNX models. The ``ov::Core::read_model(const std::string& model, const Tensor& weights)`` method should be called with ``weights`` passed as an empty ``ov::Tensor``.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/protecting_model_guide.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/protecting_model_guide.cpp
|
||||
:language: cpp
|
||||
:fragment: part1
|
||||
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ to set a new batch size with the ``reshape`` method:
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.py
|
||||
:language: Python
|
||||
:fragment: picture_snippet
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.cpp
|
||||
:language: cpp
|
||||
:fragment: picture_snippet
|
||||
|
||||
|
|
@ -62,14 +62,14 @@ When using the ``reshape`` method, you may take one of the approaches:
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.py
|
||||
:language: python
|
||||
:fragment: simple_spatials_change
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.cpp
|
||||
:language: cpp
|
||||
:fragment: spatial_reshape
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ When using the ``reshape`` method, you may take one of the approaches:
|
|||
``openvino.runtime.Output`` dictionary key specifies input by passing actual input object.
|
||||
Dictionary values representing new shapes could be ``PartialShape``:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.py
|
||||
:language: python
|
||||
:fragment: [obj_to_shape]
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ When using the ``reshape`` method, you may take one of the approaches:
|
|||
|
||||
``map<ov::Output<ov::Node>, ov::PartialShape`` specifies input by passing actual input port:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.cpp
|
||||
:language: cpp
|
||||
:fragment: [obj_to_shape]
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ When using the ``reshape`` method, you may take one of the approaches:
|
|||
``int`` dictionary key specifies input by its index.
|
||||
Dictionary values representing new shapes could be ``tuple``:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.py
|
||||
:language: python
|
||||
:fragment: [idx_to_shape]
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ When using the ``reshape`` method, you may take one of the approaches:
|
|||
|
||||
``map<size_t, ov::PartialShape>`` specifies input by its index:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.cpp
|
||||
:language: cpp
|
||||
:fragment: [idx_to_shape]
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ When using the ``reshape`` method, you may take one of the approaches:
|
|||
``str`` dictionary key specifies input by its name.
|
||||
Dictionary values representing new shapes could be ``str``:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.py
|
||||
:language: python
|
||||
:fragment: [name_to_shape]
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ When using the ``reshape`` method, you may take one of the approaches:
|
|||
|
||||
``map<string, ov::PartialShape>`` specifies input by its name:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.cpp
|
||||
:language: cpp
|
||||
:fragment: [name_to_shape]
|
||||
|
||||
|
|
@ -172,14 +172,14 @@ To change the batch dimension of the model, :ref:`set the layout <declare_model_
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.py
|
||||
:language: Python
|
||||
:fragment: set_batch
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ShapeInference.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ShapeInference.cpp
|
||||
:language: cpp
|
||||
:fragment: set_batch
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ The examples below show how to set dynamic dimensions with a model that has a st
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.py
|
||||
:language: cpp
|
||||
:fragment: [reshape_undefined]
|
||||
|
||||
|
|
@ -80,14 +80,14 @@ The examples below show how to set dynamic dimensions with a model that has a st
|
|||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.cpp
|
||||
:language: cpp
|
||||
:fragment: [ov_dynamic_shapes:reshape_undefined]
|
||||
|
||||
.. tab-item:: C
|
||||
:sync: c
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.c
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.c
|
||||
:language: cpp
|
||||
:fragment: [ov_dynamic_shapes:reshape_undefined]
|
||||
|
||||
|
|
@ -101,14 +101,14 @@ The examples above assume that the model has a single input layer. To change mod
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.py
|
||||
:language: python
|
||||
:fragment: reshape_multiple_inputs
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.cpp
|
||||
:language: cpp
|
||||
:fragment: ov_dynamic_shapes:reshape_multiple_inputs
|
||||
|
||||
|
|
@ -127,14 +127,14 @@ To check if a model already has dynamic dimensions, first load it with the ``rea
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.py
|
||||
:language: python
|
||||
:fragment: check_inputs
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.cpp
|
||||
:language: cpp
|
||||
:fragment: ov_dynamic_shapes:check_inputs
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ The lower and/or upper bounds of a dynamic dimension can also be specified. They
|
|||
|
||||
The examples below show how to set dynamic dimension bounds for a mobilenet-v2 model with a default static shape of ``[1,3,224,224]``.
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.py
|
||||
:language: python
|
||||
:fragment: reshape_bounds
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ The lower and/or upper bounds of a dynamic dimension can also be specified. They
|
|||
|
||||
The dimension bounds can be coded as arguments for ``ov::Dimension``, as shown in these examples:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.cpp
|
||||
:language: cpp
|
||||
:fragment: ov_dynamic_shapes:reshape_bounds
|
||||
|
||||
|
|
@ -179,7 +179,7 @@ The lower and/or upper bounds of a dynamic dimension can also be specified. They
|
|||
|
||||
The dimension bounds can be coded as arguments for `ov_dimension <https://docs.openvino.ai/2024/api/c_cpp_api/structov__dimension.html>`__, as shown in these examples:
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.c
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.c
|
||||
:language: cpp
|
||||
:fragment: ov_dynamic_shapes:reshape_bounds
|
||||
|
||||
|
|
@ -208,21 +208,21 @@ The sample below shows how a model can accept different input shapes. In the fir
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.py
|
||||
:language: python
|
||||
:fragment: set_input_tensor
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.cpp
|
||||
:language: cpp
|
||||
:fragment: ov_dynamic_shapes:set_input_tensor
|
||||
|
||||
.. tab-item:: C
|
||||
:sync: c
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.c
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.c
|
||||
:language: cpp
|
||||
:fragment: ov_dynamic_shapes:set_input_tensor
|
||||
|
||||
|
|
@ -243,21 +243,21 @@ To determine if the output has dynamic dimensions, the ``partial_shape`` propert
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.py
|
||||
:language: python
|
||||
:fragment: print_dynamic
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.cpp
|
||||
:language: cpp
|
||||
:fragment: ov_dynamic_shapes:print_dynamic
|
||||
|
||||
.. tab-item:: C
|
||||
:sync: c
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.c
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.c
|
||||
:language: cpp
|
||||
:fragment: ov_dynamic_shapes:print_dynamic
|
||||
|
||||
|
|
@ -272,21 +272,21 @@ Output layers can also be checked for dynamic dimensions using the ``partial_sha
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.py
|
||||
:language: python
|
||||
:fragment: detect_dynamic
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.cpp
|
||||
:language: cpp
|
||||
:fragment: ov_dynamic_shapes:detect_dynamic
|
||||
|
||||
.. tab-item:: C
|
||||
:sync: c
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_dynamic_shapes.c
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_dynamic_shapes.c
|
||||
:language: cpp
|
||||
:fragment: ov_dynamic_shapes:detect_dynamic
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ multi-device mode:
|
|||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/MULTI2.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/MULTI2.cpp
|
||||
:language: cpp
|
||||
:fragment: [part2]
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ Accordingly, the code that loops over all available devices of the "GPU" type on
|
|||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/MULTI3.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/MULTI3.cpp
|
||||
:language: cpp
|
||||
:fragment: [part3]
|
||||
|
||||
|
|
|
|||
|
|
@ -202,14 +202,14 @@ The code samples on this page assume following import(Python)/using (C++) are in
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto.py
|
||||
:language: python
|
||||
:fragment: [py_ov_property_import_header]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/AUTO0.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/AUTO0.cpp
|
||||
:language: cpp
|
||||
:fragment: [py_ov_property_import_header]
|
||||
|
||||
|
|
@ -232,14 +232,14 @@ See the following code for using AUTO and specifying devices:
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto.py
|
||||
:language: python
|
||||
:fragment: [part0]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/AUTO0.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/AUTO0.cpp
|
||||
:language: cpp
|
||||
:fragment: [part0]
|
||||
|
||||
|
|
@ -392,14 +392,14 @@ To enable performance hints for your application, use the following code:
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto.py
|
||||
:language: python
|
||||
:fragment: [part3]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/AUTO3.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/AUTO3.cpp
|
||||
:language: cpp
|
||||
:fragment: [part3]
|
||||
|
||||
|
|
@ -420,14 +420,14 @@ The ``ov::hint::model_priority`` property enables you to control the priorities
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto.py
|
||||
:language: python
|
||||
:fragment: [part4]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/AUTO4.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/AUTO4.cpp
|
||||
:language: cpp
|
||||
:fragment: [part4]
|
||||
|
||||
|
|
@ -443,14 +443,14 @@ To query the runtime target devices on which the inferences are being executed u
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto.py
|
||||
:language: python
|
||||
:fragment: [part7]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/AUTO7.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/AUTO7.cpp
|
||||
:language: cpp
|
||||
:fragment: [part7]
|
||||
|
||||
|
|
@ -465,14 +465,14 @@ Although the methods described above are currently the preferred way to execute
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto.py
|
||||
:language: python
|
||||
:fragment: [part5]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/AUTO5.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/AUTO5.cpp
|
||||
:language: cpp
|
||||
:fragment: [part5]
|
||||
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ There are six levels of logs, which can be called explicitly or set via the ``OP
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto.py
|
||||
:language: python
|
||||
:fragment: [part6]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/AUTO6.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/AUTO6.cpp
|
||||
:language: cpp
|
||||
:fragment: [part6]
|
||||
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@ How Automatic Batching Works
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto_batching.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto_batching.py
|
||||
:language: Python
|
||||
:fragment: [compile_model]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto_batching.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto_batching.cpp
|
||||
:language: cpp
|
||||
:fragment: [compile_model]
|
||||
|
||||
|
|
@ -58,14 +58,14 @@ How Automatic Batching Works
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto_batching.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto_batching.py
|
||||
:language: Python
|
||||
:fragment: [compile_model_no_auto_batching]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto_batching.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto_batching.cpp
|
||||
:language: cpp
|
||||
:fragment: [compile_model_no_auto_batching]
|
||||
|
||||
|
|
@ -96,14 +96,14 @@ This "automatic batch size selection" works on the presumption that the applicat
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto_batching.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto_batching.py
|
||||
:language: Python
|
||||
:fragment: [query_optimal_num_requests]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto_batching.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto_batching.cpp
|
||||
:language: cpp
|
||||
:fragment: [query_optimal_num_requests]
|
||||
|
||||
|
|
@ -124,14 +124,14 @@ For example, when the application processes only 4 video streams, there is no ne
|
|||
.. tab-item:: Python
|
||||
:sync: py
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto_batching.py
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto_batching.py
|
||||
:language: Python
|
||||
:fragment: [hint_num_requests]
|
||||
|
||||
.. tab-item:: C++
|
||||
:sync: cpp
|
||||
|
||||
.. doxygensnippet:: docs/snippets/ov_auto_batching.cpp
|
||||
.. doxygensnippet:: docs/articles_en/assets/snippets/ov_auto_batching.cpp
|
||||
:language: cpp
|
||||
:fragment: [hint_num_requests]
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue