OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[DOCS] Redesigning Running Inference section in docs (#29298)
Karol Blaszczakbc5ca11b1337
diff --git a/docs/articles_en/about-openvino/performance-benchmarks/getting-performance-numbers.rst b/docs/articles_en/about-openvino/performance-benchmarks/getting-performance-numbers.rstindex 484e8a042d9..f6f2aa33e89 100644--- a/docs/articles_en/about-openvino/performance-benchmarks/getting-performance-numbers.rst+++ b/docs/articles_en/about-openvino/performance-benchmarks/getting-performance-numbers.rst@@ -132,7 +132,7 @@ General considerations* Do not include model loading time.* Ensure that the inputs are identical for OpenVINO Runtime and the framework. For example, watch out for random values that can be used to populate the inputs.* In situations when any user-side pre-processing should be tracked separately, consider :doc:`image pre-processing and conversion <../../openvino-workflow/running-inference/optimize-inference/optimize-preprocessing>`.- * When applicable, leverage the :doc:`Dynamic Shapes support <../../openvino-workflow/running-inference/dynamic-shapes>`.+ * When applicable, leverage the :doc:`Dynamic Shapes support <../../openvino-workflow/running-inference/model-input-output/dynamic-shapes>`.* If possible, demand the same accuracy. For example, TensorFlow allows ``FP16`` execution, so when comparing to that, make sure to test the OpenVINO Runtime with the ``FP16`` as well... dropdown:: Make sure the benchmarking setup is proper for the selected scenario@@ -244,7 +244,7 @@ request, while the actual latency can be quite different.Lastly, the performance statistics with both performance counters and execution graphs areaveraged, so such data for the-:doc:`inputs of dynamic shapes <../../openvino-workflow/running-inference/dynamic-shapes>`+:doc:`inputs of dynamic shapes <../../openvino-workflow/running-inference/model-input-output/dynamic-shapes>`should be measured carefully, preferably by isolating the specific shape and executing multipletimes in a loop, to gather reliable data.diff --git a/docs/articles_en/documentation/compatibility-and-support/supported-devices.rst b/docs/articles_en/documentation/compatibility-and-support/supported-devices.rstindex b249b418634..7131b11745b 100644--- a/docs/articles_en/documentation/compatibility-and-support/supported-devices.rst+++ b/docs/articles_en/documentation/compatibility-and-support/supported-devices.rst@@ -42,9 +42,9 @@ Feature Support and API Coverage:doc:`Automatic batching <../../openvino-workflow/running-inference/inference-devices-and-modes/automatic-batching>` No Yes No:doc:`Multi-stream execution <../../openvino-workflow/running-inference/optimize-inference/optimizing-throughput>` Yes Yes No:doc:`Model caching <../../openvino-workflow/running-inference/optimize-inference/optimizing-latency/model-caching-overview>` Yes Partial Yes- :doc:`Dynamic shapes <../../openvino-workflow/running-inference/dynamic-shapes>` Yes Partial No+ :doc:`Dynamic shapes <../../openvino-workflow/running-inference/model-input-output/dynamic-shapes>` Yes Partial No:doc:`Preprocessing acceleration <../../openvino-workflow/running-inference/optimize-inference/optimize-preprocessing>` Yes Yes No- :doc:`Stateful models <../../openvino-workflow/running-inference/stateful-models>` Yes Yes Yes+ :doc:`Stateful models <../../openvino-workflow/running-inference/inference-request/stateful-models>` Yes Yes Yes:doc:`Extensibility <../../documentation/openvino-extensibility>` Yes Yes No======================================================================================================================================== ======= ========== ===========@@ -73,7 +73,7 @@ Feature Support and API Coverage+-------------------------+-----------+------------------+-------------------+For setting up a relevant configuration, refer to the-:doc:`Integrate with Customer Application <../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+:doc:`Integrate with Customer Application <../../openvino-workflow/running-inference>`topic (step 3 "Configure input and output")... dropdown:: Device support across OpenVINO 2024.6 distributionsdiff --git a/docs/articles_en/documentation/openvino-extensibility/transformation-api.rst b/docs/articles_en/documentation/openvino-extensibility/transformation-api.rstindex 334c6a3a487..349efaea514 100644--- a/docs/articles_en/documentation/openvino-extensibility/transformation-api.rst+++ b/docs/articles_en/documentation/openvino-extensibility/transformation-api.rst@@ -25,7 +25,7 @@ Working with Model##################Before moving to the transformation part, it is important to say a few words about the functions which allow modifying ``ov::Model``.-This section extends the :doc:`model representation guide <../../openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation>`+This section extends the :doc:`model representation guide <../../openvino-workflow/running-inference/model-representation>`and introduces an API for ``ov::Model`` manipulation.Working with node input and output ports@@ -244,6 +244,6 @@ additional debug capabilities by using the following environment variables:See Also########-* :doc:`OpenVINO™ Model Representation <../../openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation>`+* :doc:`OpenVINO™ Model Representation <../../openvino-workflow/running-inference/model-representation>`* :doc:`OpenVINO™ Extensions <../openvino-extensibility>`diff --git a/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/assign-6.rst b/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/assign-6.rstindex b66a8603f2d..04e9f62811a 100644--- a/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/assign-6.rst+++ b/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/assign-6.rst@@ -16,7 +16,7 @@ AssignReadValue, Assign, and Variable define a coherent mechanism for reading, writing andstoring a memory buffer between inference calls. More details can be found on the-:doc:`State API <../../../../../../openvino-workflow/running-inference/stateful-models>` documentation page.+:doc:`State API <../../../../../../openvino-workflow/running-inference/inference-request/stateful-models>` documentation page.*Assign* sets an input value to the ``variable_id`` variable. This value will be readby the *ReadValue* operation on the next inference call if it has not been reset.diff --git a/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/read-value-6.rst b/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/read-value-6.rstindex 0d524413d54..39ab5cd1fd3 100644--- a/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/read-value-6.rst+++ b/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/read-value-6.rst@@ -17,7 +17,7 @@ ReadValue*ReadValue*, *Assign*, and *Variable* define a coherent mechanism for reading, writing,and storing some memory buffer between inference calls. More details can be found on the-:doc:`StateAPI <../../../../../../openvino-workflow/running-inference/stateful-models>` documentation page.+:doc:`StateAPI <../../../../../../openvino-workflow/running-inference/inference-request/stateful-models>` documentation page.If the 1st input is provided and this is the first inference or reset has been called,*ReadValue* returns the value from the 1st input.diff --git a/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/movement/unique-10.rst b/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/movement/unique-10.rstindex ecd6a154f0e..10ee548205c 100644--- a/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/movement/unique-10.rst+++ b/docs/articles_en/documentation/openvino-ir-format/operation-sets/operation-specs/movement/unique-10.rst@@ -52,7 +52,7 @@ The operator can either work in elementwise mode searching for unique values in**Outputs**-* **1**: The output tensor containing unique elements (individual values or subtensors). This tensor's type matches the type of the first input tensor: *T*. The values in this tensor are either sorted ascendingly or maintain the same order as in the input tensor. The shape of this output depends on the values of the input tensor and will very often be dynamic. Please refer to the article describing how :doc:`Dynamic Shapes <../../../../../openvino-workflow/running-inference/dynamic-shapes>` are handled in OpenVINO.+* **1**: The output tensor containing unique elements (individual values or subtensors). This tensor's type matches the type of the first input tensor: *T*. The values in this tensor are either sorted ascendingly or maintain the same order as in the input tensor. The shape of this output depends on the values of the input tensor and will very often be dynamic. Please refer to the article describing how :doc:`Dynamic Shapes <../../../../../openvino-workflow/running-inference/model-input-output/dynamic-shapes>` are handled in OpenVINO.* **2**: The output tensor containing indices of the locations of unique elements. The indices map the elements in the first output tensor to their locations in the input tensor. The index always points to the first occurrence of a given unique output element in the input tensor. This is a 1D tensor with type controlled by the ``index_element_type`` attribute.* **3**: The output tensor containing indices of the locations of elements of the input tensor in the first output tensor. This means that for each element of the input tensor this output will point to the unique value in the first output tensor of this operator. This is a 1D tensor with type controlled by the ``index_element_type`` attribute.* **4**: The output tensor containing the number of occurrences of each unique value produced by this operator in the first output tensor. This is a 1D tensor with type controlled by the ``count_element_type`` attribute.diff --git a/docs/articles_en/get-started.rst b/docs/articles_en/get-started.rstindex 097091c5b32..db28d6aa697 100644--- a/docs/articles_en/get-started.rst+++ b/docs/articles_en/get-started.rst@@ -90,7 +90,7 @@ View :doc:`sample code <get-started/learn-openvino/openvino-samples>` for variouIntegrate OpenVINO With Your Application-----------------------------------------Learn how to :doc:`use the OpenVINO API to implement an inference pipeline <openvino-workflow/running-inference/integrate-openvino-with-your-application>` in your application.+Learn how to :doc:`use the OpenVINO API to implement an inference pipeline <openvino-workflow/running-inference>` in your application... _openvino-advanced-features:@@ -123,7 +123,7 @@ Pipeline and model configuration features in OpenVINO Runtime allow you to easil* :doc:`Automatic Batching <openvino-workflow/running-inference/inference-devices-and-modes/automatic-batching>` performs on-the-fly grouping of inference requests to maximize utilization of the target hardware’s memory and processing cores.* :doc:`Performance Hints <openvino-workflow/running-inference/optimize-inference/high-level-performance-hints>` automatically adjust runtime parameters to prioritize for low latency or high throughput-* :doc:`Dynamic Shapes <openvino-workflow/running-inference/dynamic-shapes>` reshapes models to accept arbitrarily-sized inputs, increasing flexibility for applications that encounter different data shapes+* :doc:`Dynamic Shapes <openvino-workflow/running-inference/model-input-output/dynamic-shapes>` reshapes models to accept arbitrarily-sized inputs, increasing flexibility for applications that encounter different data shapes* :doc:`Benchmark Tool <get-started/learn-openvino/openvino-samples/benchmark-tool>` characterizes model performance in various hardware and pipeline configurations.. _additional-about-openvino/additional-resources:diff --git a/docs/articles_en/get-started/install-openvino/install-openvino-archive-macos.rst b/docs/articles_en/get-started/install-openvino/install-openvino-archive-macos.rstindex 1c8d669ad02..5e1f320c3eb 100644--- a/docs/articles_en/get-started/install-openvino/install-openvino-archive-macos.rst+++ b/docs/articles_en/get-started/install-openvino/install-openvino-archive-macos.rst@@ -188,6 +188,6 @@ Additional Resources* :doc:`Troubleshooting Guide for OpenVINO Installation & Configuration <../install-openvino>`* :doc:`Convert models for use with OpenVINO™ <../../../openvino-workflow/model-preparation/convert-model-to-ir>`-* :doc:`Write your own OpenVINO™ applications <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+* :doc:`Write your own OpenVINO™ applications <../../../openvino-workflow/running-inference>`* Sample applications: :doc:`OpenVINO™ Toolkit Samples Overview <../../../get-started/learn-openvino/openvino-samples>`* Pre-trained deep learning models on `Hugging Face <https://huggingface.co/OpenVINO>`__diff --git a/docs/articles_en/get-started/install-openvino/install-openvino-archive-windows.rst b/docs/articles_en/get-started/install-openvino/install-openvino-archive-windows.rstindex e23247290a0..c41833e5d8b 100644--- a/docs/articles_en/get-started/install-openvino/install-openvino-archive-windows.rst+++ b/docs/articles_en/get-started/install-openvino/install-openvino-archive-windows.rst@@ -211,6 +211,6 @@ Additional Resources* :doc:`Troubleshooting Guide for OpenVINO Installation & Configuration <../install-openvino>`* :doc:`Convert models for use with OpenVINO™ <../../../openvino-workflow/model-preparation/convert-model-to-ir>`-* :doc:`Write your own OpenVINO™ applications <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+* :doc:`Write your own OpenVINO™ applications <../../../openvino-workflow/running-inference>`* Sample applications: :doc:`OpenVINO™ Toolkit Samples Overview <../../../get-started/learn-openvino/openvino-samples>`* Pre-trained deep learning models on `Hugging Face <https://huggingface.co/OpenVINO>`__.diff --git a/docs/articles_en/get-started/learn-openvino/openvino-samples/bert-benchmark.rst b/docs/articles_en/get-started/learn-openvino/openvino-samples/bert-benchmark.rstindex 459dbcdd581..8e7303956ba 100644--- a/docs/articles_en/get-started/learn-openvino/openvino-samples/bert-benchmark.rst+++ b/docs/articles_en/get-started/learn-openvino/openvino-samples/bert-benchmark.rst@@ -26,7 +26,7 @@ resulting model, downloads a dataset and runs a benchmark on the dataset.You can see the explicit description of each sample step at-:doc:`Integration Steps <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+:doc:`Integration Steps <../../../openvino-workflow/running-inference>`section of "Integrate OpenVINO™ Runtime with Your Application" guide.Running@@ -60,7 +60,7 @@ The sample outputs how long it takes to process a dataset.Additional Resources####################-- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference>`- :doc:`Get Started with Samples <get-started-demos>`- :doc:`Using OpenVINO Samples <../openvino-samples>`- :doc:`Convert a Model <../../../openvino-workflow/model-preparation/convert-model-to-ir>`diff --git a/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-classification.rst b/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-classification.rstindex 482ec739b40..85df253a549 100644--- a/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-classification.rst+++ b/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-classification.rst@@ -50,7 +50,7 @@ inference, and processes output data, logging each step in a standard output strYou can see the explicit description of each sample step at-:doc:`Integration Steps <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+:doc:`Integration Steps <../../../openvino-workflow/running-inference>`section of "Integrate OpenVINO™ Runtime with Your Application" guide.Running@@ -254,7 +254,7 @@ Sample OutputAdditional Resources####################-- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference>`- :doc:`Get Started with Samples <get-started-demos>`- :doc:`Using OpenVINO Samples <../openvino-samples>`- :doc:`Convert a Model <../../../openvino-workflow/model-preparation/convert-model-to-ir>`diff --git a/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-nv12-input-classification.rst b/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-nv12-input-classification.rstindex 3aa8b0a10fb..30c16edee51 100644--- a/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-nv12-input-classification.rst+++ b/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-nv12-input-classification.rst@@ -45,7 +45,7 @@ You can place labels in ``.labels`` file near the model to get pretty output.You can see the explicit description of each sample step at-:doc:`Integration Steps <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+:doc:`Integration Steps <../../../openvino-workflow/running-inference>`section of "Integrate OpenVINO™ Runtime with Your Application" guide.Running@@ -205,7 +205,7 @@ Sample OutputAdditional Resources####################-- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference>`- :doc:`Get Started with Samples <get-started-demos>`- :doc:`Using OpenVINO Samples <../openvino-samples>`- :doc:`Convert a Model <../../../openvino-workflow/model-preparation/convert-model-to-ir>`diff --git a/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-query-device.rst b/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-query-device.rstindex c14012526ea..ce3718fe133 100644--- a/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-query-device.rst+++ b/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-query-device.rst@@ -130,7 +130,7 @@ For example:Additional Resources####################-- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference>`- :doc:`Get Started with Samples <get-started-demos>`- :doc:`Using OpenVINO™ Toolkit Samples <../openvino-samples>`- `Hello Query Device Python Sample on Github <https://github.com/openvinotoolkit/openvino/blob/master/samples/python/hello_query_device/README.md>`__diff --git a/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-reshape-ssd.rst b/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-reshape-ssd.rstindex 5f33b6b6b32..2616fcf039c 100644--- a/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-reshape-ssd.rst+++ b/docs/articles_en/get-started/learn-openvino/openvino-samples/hello-reshape-ssd.rst@@ -9,7 +9,7 @@ Hello Reshape SSD SampleThis sample demonstrates how to do synchronous inference of object detection models-using :doc:`Shape Inference feature <../../../openvino-workflow/running-inference/changing-input-shape>`. Before+using :doc:`Shape Inference feature <../../../openvino-workflow/running-inference/model-input-output/changing-input-shape>`. Beforeusing the sample, refer to the following requirements:- Models with only one input and output are supported.@@ -46,7 +46,7 @@ As a result, the program creates an output image, logging each step in a standarYou can see the explicit description of-each sample step at :doc:`Integration Steps <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>` section of "Integrate OpenVINO™ Runtime with Your Application" guide.+each sample step at :doc:`Integration Steps <../../../openvino-workflow/running-inference>` section of "Integrate OpenVINO™ Runtime with Your Application" guide.Running####################@@ -201,7 +201,7 @@ Sample OutputAdditional Resources####################-- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference>`- :doc:`Get Started with Samples <get-started-demos>`- :doc:`Using OpenVINO Samples <../openvino-samples>`- :doc:`Convert a Model <../../../openvino-workflow/model-preparation/convert-model-to-ir>`diff --git a/docs/articles_en/get-started/learn-openvino/openvino-samples/image-classification-async.rst b/docs/articles_en/get-started/learn-openvino/openvino-samples/image-classification-async.rstindex 96fc49c2f08..b2b2033fc20 100644--- a/docs/articles_en/get-started/learn-openvino/openvino-samples/image-classification-async.rst+++ b/docs/articles_en/get-started/learn-openvino/openvino-samples/image-classification-async.rst@@ -56,7 +56,7 @@ You can place labels in ``.labels`` file near the model to get pretty output.You can see the explicit description of each sample step at-:doc:`Integration Steps <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+:doc:`Integration Steps <../../../openvino-workflow/running-inference>`section of "Integrate OpenVINO™ Runtime with Your Application" guide.@@ -323,7 +323,7 @@ Sample OutputAdditional Resources####################-- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference>`- :doc:`Get Started with Samples <get-started-demos>`- :doc:`Using OpenVINO™ Toolkit Samples <../openvino-samples>`- :doc:`Convert a Model <../../../openvino-workflow/model-preparation/convert-model-to-ir>`diff --git a/docs/articles_en/get-started/learn-openvino/openvino-samples/model-creation.rst b/docs/articles_en/get-started/learn-openvino/openvino-samples/model-creation.rstindex 87853f5bbf1..ffb8a859374 100644--- a/docs/articles_en/get-started/learn-openvino/openvino-samples/model-creation.rst+++ b/docs/articles_en/get-started/learn-openvino/openvino-samples/model-creation.rst@@ -8,7 +8,7 @@ Model Creation SampleInference Request API (Python, C++).-This sample demonstrates how to run inference using a :doc:`model <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation>`+This sample demonstrates how to run inference using a :doc:`model <../../../openvino-workflow/running-inference/model-representation>`built on the fly that uses weights from the LeNet classification model, which isknown to work well on digit classification tasks. You do not need an XML file,the model is created from the source code on the fly. Before using the sample,@@ -23,7 +23,7 @@ refer to the following requirements:How It Works####################-At startup, the sample application reads command-line parameters, :doc:`builds a model <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation>`+At startup, the sample application reads command-line parameters, :doc:`builds a model <../../../openvino-workflow/running-inference/model-representation>`and passes the weights file. Then, it loads the model and input data to the OpenVINO™Runtime plugin. Finally, it performs synchronous inference and processes outputdata, logging each step in a standard output stream.@@ -47,7 +47,7 @@ data, logging each step in a standard output stream.:language: cpp-You can see the explicit description of each sample step at :doc:`Integration Steps <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>` section of "Integrate OpenVINO™ Runtime with Your Application" guide.+You can see the explicit description of each sample step at :doc:`Integration Steps <../../../openvino-workflow/running-inference>` section of "Integrate OpenVINO™ Runtime with Your Application" guide.Running####################@@ -289,7 +289,7 @@ Sample OutputAdditional Resources####################-- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference>`- :doc:`Get Started with Samples <get-started-demos>`- :doc:`Using OpenVINO Samples <../openvino-samples>`- :doc:`Convert a Model <../../../openvino-workflow/model-preparation/convert-model-to-ir>`diff --git a/docs/articles_en/get-started/learn-openvino/openvino-samples/sync-benchmark.rst b/docs/articles_en/get-started/learn-openvino/openvino-samples/sync-benchmark.rstindex f9643855dfd..daa08333b2a 100644--- a/docs/articles_en/get-started/learn-openvino/openvino-samples/sync-benchmark.rst+++ b/docs/articles_en/get-started/learn-openvino/openvino-samples/sync-benchmark.rst@@ -45,7 +45,7 @@ Then, it processes and reports performance results.You can see the explicit description of-each sample step at :doc:`Integration Steps <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+each sample step at :doc:`Integration Steps <../../../openvino-workflow/running-inference>`section of "Integrate OpenVINO™ Runtime with Your Application" guide.Running@@ -162,7 +162,7 @@ Sample OutputAdditional Resources####################-- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference>`- :doc:`Get Started with Samples <get-started-demos>`- :doc:`Using OpenVINO Samples <../openvino-samples>`- :doc:`Convert a Model <../../../openvino-workflow/model-preparation/convert-model-to-ir>`diff --git a/docs/articles_en/get-started/learn-openvino/openvino-samples/throughput-benchmark.rst b/docs/articles_en/get-started/learn-openvino/openvino-samples/throughput-benchmark.rstindex 8baabc49998..892dd309bfd 100644--- a/docs/articles_en/get-started/learn-openvino/openvino-samples/throughput-benchmark.rst+++ b/docs/articles_en/get-started/learn-openvino/openvino-samples/throughput-benchmark.rst@@ -49,7 +49,7 @@ Then, it processes and reports performance results.You can see the explicit description of each sample step at-:doc:`Integration Steps <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+:doc:`Integration Steps <../../../openvino-workflow/running-inference>`section of "Integrate OpenVINO™ Runtime with Your Application" guide.Running@@ -167,7 +167,7 @@ Sample OutputAdditional Resources####################-- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference/integrate-openvino-with-your-application>`+- :doc:`Integrate the OpenVINO™ Runtime with Your Application <../../../openvino-workflow/running-inference>`- :doc:`Get Started with Samples <get-started-demos>`- :doc:`Using OpenVINO Samples <../openvino-samples>`- :doc:`Convert a Model <../../../openvino-workflow/model-preparation/convert-model-to-ir>`diff --git a/docs/articles_en/openvino-workflow-generative.rst b/docs/articles_en/openvino-workflow-generative.rstindex d22e65cb4e1..aa4c3578aa2 100644--- a/docs/articles_en/openvino-workflow-generative.rst+++ b/docs/articles_en/openvino-workflow-generative.rst@@ -95,7 +95,7 @@ The advantages of using OpenVINO for generative model deployment:inference performance and memory usage in long-running text generation tasks by managing pastKV-cache tensors more efficiently internally. This feature is automatically activated formany supported models, while unsupported ones remain stateless. Learn more about the- :doc:`Stateful models and State API <../openvino-workflow/running-inference/stateful-models>`.+ :doc:`Stateful models and State API <../openvino-workflow/running-inference/inference-request/stateful-models>`.| **Optimized LLM inference**| Includes a Python API for rapid development and C++ for further optimization, offeringdiff --git a/docs/articles_en/openvino-workflow/deployment-locally.rst b/docs/articles_en/openvino-workflow/deployment-locally.rstindex 6f7029ee487..d5a5553636b 100644--- a/docs/articles_en/openvino-workflow/deployment-locally.rst+++ b/docs/articles_en/openvino-workflow/deployment-locally.rst@@ -18,7 +18,7 @@ Deploy Locally.. note::- Note that :doc:`running inference in OpenVINO Runtime <running-inference>` is the most basic form of deployment. Before moving forward, make sure you know how to create a proper Inference configuration and :doc:`develop your application properly <running-inference/integrate-openvino-with-your-application>`.+ Note that :doc:`running inference in OpenVINO Runtime <running-inference>` is the most basic form of deployment. Before moving forward, make sure you know how to create a proper Inference configuration and :doc:`develop your application properly <running-inference>`.Local Deployment Options########################diff --git a/docs/articles_en/openvino-workflow/deployment-locally/local-distribution-libraries.rst b/docs/articles_en/openvino-workflow/deployment-locally/local-distribution-libraries.rstindex 5e85d157c59..3b8638cca0b 100644--- a/docs/articles_en/openvino-workflow/deployment-locally/local-distribution-libraries.rst+++ b/docs/articles_en/openvino-workflow/deployment-locally/local-distribution-libraries.rst@@ -184,7 +184,7 @@ ExamplesIn this example, the application is written in C++, performs inferencewith the :doc:`Automatic Device Selection <../running-inference/inference-devices-and-modes/auto-device-selection>`mode, limiting device list to GPU and CPU, and reads models- :doc:`created using C++ code <../running-inference/integrate-openvino-with-your-application/model-representation>`.+ :doc:`created using C++ code <../running-inference/model-representation>`.The following libraries are used: ``openvino``, ``openvino_auto_plugin``, ``openvino_intel_gpu_plugin``, and ``openvino_intel_cpu_plugin``.diff --git a/docs/articles_en/openvino-workflow/model-preparation.rst b/docs/articles_en/openvino-workflow/model-preparation.rstindex bed3648c48d..54e3706fe4b 100644--- a/docs/articles_en/openvino-workflow/model-preparation.rst+++ b/docs/articles_en/openvino-workflow/model-preparation.rst@@ -29,7 +29,7 @@ The easiest way to obtain a model is to download it from an online database, suc`Kaggle <https://www.kaggle.com/models>`__, `Hugging Face <https://huggingface.co/>`__, and`Torchvision models <https://pytorch.org/hub/>`__. Now you have two options:-* Skip model conversion and :doc:`run inference <running-inference/integrate-openvino-with-your-application>`+* Skip model conversion and :doc:`run inference <running-inference>`directly from the **TensorFlow, TensorFlow Lite, ONNX, or PaddlePaddle** source format.Conversion will still be performed but it will happen automatically and "under the hood".This option, while convenient, offers lower performance and stability, as well as fewer@@ -51,7 +51,7 @@ The easiest way to obtain a model is to download it from an online database, sucOnce saved as :doc:`OpenVINO IR <model-preparation/convert-model-to-ir>`(a set of ``.xml`` and ``.bin`` files), the model may be deployed with maximum performance.Because it is already optimized for- :doc:`OpenVINO inference <running-inference/integrate-openvino-with-your-application>`,+ :doc:`OpenVINO inference <running-inference>`,it can be read, compiled, and inferred with no additional delay... note::diff --git a/docs/articles_en/openvino-workflow/model-preparation/convert-model-onnx.rst b/docs/articles_en/openvino-workflow/model-preparation/convert-model-onnx.rstindex 0570514bfe4..17b1dd9ba20 100644--- a/docs/articles_en/openvino-workflow/model-preparation/convert-model-onnx.rst+++ b/docs/articles_en/openvino-workflow/model-preparation/convert-model-onnx.rst@@ -17,7 +17,7 @@ that enables AI developers to easily transfer models between different frameworkAn ONNX model file can be loaded by ``openvino.Core.read_model`` or``openvino.Core.compile_model`` methods by OpenVINO runtime API without the need toprepare an OpenVINO IR first. Refer to the- :doc:`inference example <../running-inference/integrate-openvino-with-your-application>`+ :doc:`inference example <../running-inference>`for more details. Using ``openvino.convert_model`` is still recommended if the modelload latency is important for the inference application.diff --git a/docs/articles_en/openvino-workflow/model-preparation/convert-model-paddle.rst b/docs/articles_en/openvino-workflow/model-preparation/convert-model-paddle.rstindex 2b9b77f49c1..022131f5727 100644--- a/docs/articles_en/openvino-workflow/model-preparation/convert-model-paddle.rst+++ b/docs/articles_en/openvino-workflow/model-preparation/convert-model-paddle.rst@@ -15,7 +15,7 @@ are different depending on the PaddlePaddle model format.PaddlePaddle model serialized in a file can be loaded by ``openvino.Core.read_model``or ``openvino.Core.compile_model`` methods by OpenVINO runtime API without preparingOpenVINO IR first. Refer to the- :doc:`inference example <../running-inference/integrate-openvino-with-your-application>`+ :doc:`inference example <../running-inference>`for more details. Using ``openvino.convert_model`` is still recommended if model loadlatency matters for the inference application.diff --git a/docs/articles_en/openvino-workflow/model-preparation/convert-model-tensorflow-lite.rst b/docs/articles_en/openvino-workflow/model-preparation/convert-model-tensorflow-lite.rstindex 3be33bae812..24f802fa5e6 100644--- a/docs/articles_en/openvino-workflow/model-preparation/convert-model-tensorflow-lite.rst+++ b/docs/articles_en/openvino-workflow/model-preparation/convert-model-tensorflow-lite.rst@@ -34,7 +34,7 @@ To convert the model, run model conversion with the path to the ``.tflite`` modeTensorFlow Lite model file can be loaded by ``openvino.Core.read_model`` or``openvino.Core.compile_model`` methods by OpenVINO runtime API without preparingOpenVINO IR first. Refer to the- :doc:`inference example <../running-inference/integrate-openvino-with-your-application>`+ :doc:`inference example <../running-inference>`for more details. Using ``openvino.convert_model`` is still recommended if modelload latency matters for the inference application.diff --git a/docs/articles_en/openvino-workflow/model-preparation/convert-model-tensorflow.rst b/docs/articles_en/openvino-workflow/model-preparation/convert-model-tensorflow.rstindex 1b12cb95616..0bb99b8b172 100644--- a/docs/articles_en/openvino-workflow/model-preparation/convert-model-tensorflow.rst+++ b/docs/articles_en/openvino-workflow/model-preparation/convert-model-tensorflow.rst@@ -19,7 +19,7 @@ or `Hugging Face <https://huggingface.co/models>`__.TensorFlow models can be loaded by ``openvino.Core.read_model`` or``openvino.Core.compile_model`` methods by OpenVINO runtime API without preparingOpenVINO IR first. Refer to the- :doc:`inference example <../running-inference/integrate-openvino-with-your-application>`+ :doc:`inference example <../running-inference>`for more details. Using ``openvino.convert_model`` is still recommended if model loadlatency matters for the inference application.diff --git a/docs/articles_en/openvino-workflow/model-preparation/convert-model-to-ir.rst b/docs/articles_en/openvino-workflow/model-preparation/convert-model-to-ir.rstindex f36a235cf79..53d1c20bb62 100644--- a/docs/articles_en/openvino-workflow/model-preparation/convert-model-to-ir.rst+++ b/docs/articles_en/openvino-workflow/model-preparation/convert-model-to-ir.rst@@ -127,7 +127,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkcompiled_model = ov.compile_model(ov_model, "AUTO")For a guide on how to run inference, see how to- :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: C++:sync: cpp@@ -147,7 +147,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkov::CompiledModel compiled_model = core.compile_model("saved_model.pb", "AUTO");For a guide on how to run inference, see how to- :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: C:sync: c@@ -168,7 +168,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkov_core_compile_model_from_file(core, "saved_model.pb", "AUTO", 0, &compiled_model);For a guide on how to run inference, see how to- :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: CLI:sync: cli@@ -252,7 +252,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkcompiled_model = ov.compile_model("<INPUT_MODEL>.tflite", "AUTO")For a guide on how to run inference, see how to- :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: C++@@ -271,7 +271,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkov::CompiledModel compiled_model = core.compile_model("<INPUT_MODEL>.tflite", "AUTO");For a guide on how to run inference, see how to- :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: C:sync: c@@ -290,7 +290,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkov_core_compile_model_from_file(core, "<INPUT_MODEL>.tflite", "AUTO", 0, &compiled_model);For a guide on how to run inference, see how to- :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: CLI:sync: cli@@ -381,7 +381,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkcompiled_model = ov.compile_model("<INPUT_MODEL>.onnx", "AUTO")- For a guide on how to run inference, see how to :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ For a guide on how to run inference, see how to :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: C++@@ -399,7 +399,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkov::CompiledModel compiled_model = core.compile_model("<INPUT_MODEL>.onnx", "AUTO");- For a guide on how to run inference, see how to :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ For a guide on how to run inference, see how to :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: C:sync: c@@ -514,7 +514,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkcompiled_model = ov.compile_model("<INPUT_MODEL>.pdmodel", "AUTO")For a guide on how to run inference, see how to- :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: C++:sync: cpp@@ -532,7 +532,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkov::CompiledModel compiled_model = core.compile_model("<INPUT_MODEL>.pdmodel", "AUTO");For a guide on how to run inference, see how to- :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: C:sync: c@@ -551,7 +551,7 @@ used by OpenVINO, typically obtained by converting models of supported frameworkov_core_compile_model_from_file(core, "<INPUT_MODEL>.pdmodel", "AUTO", 0, &compiled_model);For a guide on how to run inference, see how to- :doc:`Integrate OpenVINO™ with Your Application <../running-inference/integrate-openvino-with-your-application>`.+ :doc:`Integrate OpenVINO™ with Your Application <../running-inference>`... tab-item:: CLI:sync: clidiff --git a/docs/articles_en/openvino-workflow/model-preparation/setting-input-shapes.rst b/docs/articles_en/openvino-workflow/model-preparation/setting-input-shapes.rstindex 3899e2a945c..d03aef3be4a 100644--- a/docs/articles_en/openvino-workflow/model-preparation/setting-input-shapes.rst+++ b/docs/articles_en/openvino-workflow/model-preparation/setting-input-shapes.rst@@ -16,15 +16,15 @@ Doing so at the model preparation stage, not at runtime, can be beneficial in teperformance and memory consumption.For more information on changing input shapes in runtime, refer to the-:doc:`Changing input shapes <../running-inference/changing-input-shape>` guide.+:doc:`Changing input shapes <../running-inference/model-input-output/changing-input-shape>` guide.To learn more about dynamic shapes in runtime, refer to the-:doc:`Dynamic Shapes <../running-inference/dynamic-shapes>` guide. To download models,+:doc:`Dynamic Shapes <../running-inference/model-input-output/dynamic-shapes>` guide. To download models,you can visit `Hugging Face <https://huggingface.co/models>`__.The OpenVINO Runtime API may present certain limitations in inferring models with undefineddimensions on some hardware. See the :doc:`Feature support matrix <../../documentation/compatibility-and-support/supported-devices>`for reference. In this case, the ``input`` parameter and the-:doc:`reshape method <../running-inference/changing-input-shape>` can help to resolve undefined+:doc:`reshape method <../running-inference/model-input-output/changing-input-shape>` can help to resolve undefineddimensions.For example, run model conversion for the TensorFlow MobileNet model with the single inputdiff --git a/docs/articles_en/openvino-workflow/running-inference.rst b/docs/articles_en/openvino-workflow/running-inference.rstindex 7c362a231a9..d9c932a9c28 100644--- a/docs/articles_en/openvino-workflow/running-inference.rst+++ b/docs/articles_en/openvino-workflow/running-inference.rst@@ -1,52 +1,495 @@-Running Inference with OpenVINO™-==================================+Running and Integrating Inference Pipeline+===============================================================================================++.. meta::+ :description: Learn how to implement a typical inference pipeline of OpenVINO™+ Runtime in an application.⠀.. toctree:::maxdepth: 1:hidden:- running-inference/integrate-openvino-with-your-application- running-inference/inference-devices-and-modes- running-inference/changing-input-shape- running-inference/dynamic-shapes+ running-inference/model-representation+ running-inference/model-input-output+ running-inference/inference-requestrunning-inference/stateful-models- running-inference/string-tensors+ running-inference/python-api-advanced-inference+ running-inference/python-api-exclusives+ running-inference/inference-devices-and-modesOptimize Inference <running-inference/optimize-inference>-.. meta::- :description: Learn how to run inference using OpenVINO.+OpenVINO Runtime is a set of C++ libraries with C and Python bindings, providing a common+API to run inference on various devices. Each device (integrated with OpenVINO’s plugin+architecture) offers the common, as well as hardware-specific APIs for more configuration+options. Note that OpenVINO Runtime may also be integrated with other frameworks and work+as their backend, for example, using torch.compile.+The scheme below illustrates the typical workflow for deploying a trained deep learning+model in an application:++.. image:: ../assets/images/IMPLEMENT_PIPELINE_with_API_C.svg++This guide will show you how to implement a typical OpenVINO™ Runtime inference pipeline+in your application. Before proceeding, check how+:doc:`model conversion <model-preparation/convert-model-to-ir>`+works in OpenVINO and how it may affect your applications’ performance. Make sure you have+installed OpenVINO Runtime and set environment variables (otherwise, the ``find_package``+calls will not find OpenVINO_DIR):++.. tab-set::++ .. tab-item:: Linux+ :sync: lin++ .. code-block:: console++ <INSTALL_DIR>/setupvars.sh+++ .. tab-item:: Windows+ :sync: win+++ PowerShell:++ .. code-block:: console++ <INSTALL_DIR>/setupvars.sh++ Command Prompt++ .. code-block:: console++ cd <INSTALL_DIR>+ setupvars.bat+++++Step 1. Create OpenVINO Runtime Core+###############################################################################################++Initiate working with OpenVINO in your application by including the OpenVINO™ Runtime+components:++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [import]++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part1]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [include]++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part1]++ .. tab-item:: C+ :sync: c++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [include]++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part1]++++Step 2. Compile the Model+###############################################################################################++Compile the model with ``ov::Core::compile_model()``, defining the device or mode to use+for inference. The following example uses the+:doc:`AUTO mode <running-inference/inference-devices-and-modes/auto-device-selection>`,+which selects the device for you. To learn more about supported devices and inference modes,+see the :doc:`Inference Devices and Modes <running-inference/inference-devices-and-modes>`+section.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. tab-set::++ .. tab-item:: IR+ :sync: ir++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part2_1]++ .. tab-item:: ONNX+ :sync: onnx++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part2_2]++ .. tab-item:: PaddlePaddle+ :sync: paddlepaddle++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part2_3]++ .. tab-item:: TensorFlow+ :sync: tensorflow++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part2_4]++ .. tab-item:: TensorFlow Lite+ :sync: tensorflow_lite++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part2_5]++ .. tab-item:: ov::Model+ :sync: openvinomodel++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part2_6]++ .. tab-item:: C+++ :sync: cpp++ .. tab-set::++ .. tab-item:: IR+ :sync: ir++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part2_1]++ .. tab-item:: ONNX+ :sync: onnx++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part2_2]++ .. tab-item:: PaddlePaddle+ :sync: paddlepaddle++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part2_3]++ .. tab-item:: TensorFlow+ :sync: tensorflow++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part2_4]++ .. tab-item:: TensorFlow Lite+ :sync: tensorflow_lite++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part2_5]++ .. tab-item:: ov::Model+ :sync: openvinomodel++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part2_6]++ .. tab-item:: C+ :sync: c++ .. tab-set::++ .. tab-item:: IR+ :sync: ir++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part2_1]++ .. tab-item:: ONNX+ :sync: onnx++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part2_2]++ .. tab-item:: PaddlePaddle+ :sync: paddlepaddle++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part2_3]++ .. tab-item:: TensorFlow+ :sync: tensorflow++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part2_4]++ .. tab-item:: TensorFlow Lite+ :sync: tensorflow_lite++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part2_5]++ .. tab-item:: ov::Model+ :sync: openvinomodel++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part2_6]+++The ``ov::CompiledModel`` class represents a compiled model and enables you to get+information inputs or output ports by a tensor name or index. This approach is aligned with+most frameworks. The ``ov::Model`` object represents any models inside the OpenVINO™ Runtime.+For more details, refer to+:doc:`OpenVINO™ Model representation <running-inference/model-representation>`.++Step 3. Create an Inference Request+###############################################################################################++Use the ``ov::InferRequest`` class methods to create an infer request. For more details,+see the article on+:doc:`InferRequest <running-inference/inference-request>`.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part3]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part3]++ .. tab-item:: C+ :sync: c++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part3]+++Step 4. Set Inputs+###############################################################################################++Create ``ov::Tensor``, you can use external memory for that , and use the+``ov::InferRequest::set_input_tensor`` method to send this tensor to the device.+For more info on textual data as input, see the+:doc:`String Tensors <running-inference/model-input-output/string-tensors>` article.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part4]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part4]++ .. tab-item:: C+ :sync: c++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part4]+++Step 5. Start Inference+###############################################################################################++Use either ``ov::InferRequest::start_async`` or ``ov::infer_request.infer()`` to start model+inference. To learn how they work, see the+:doc:`OpenVINO Inference Request <running-inference/inference-request>`+article. The following example uses the asynchronous option and calls+``ov::InferRequest::wait`` to wait for the inference results.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part5]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part5]++ .. tab-item:: C+ :sync: c++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part5]+++Step 6. Process the Inference Results+#################################################################################################++Get output tensors and process the inference results.+For more info on textual data as input, see the+:doc:`String Tensors <running-inference/model-input-output/string-tensors>` article.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/snippets/src/main.py+ :language: python+ :fragment: [part6]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part6]++ .. tab-item:: C+ :sync: c++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part6]+++Step 7. [only for C] Release the allocated objects+###############################################################################################++To avoid memory leak, applications developed with the C API need to release the allocated+objects in the following order.++.. tab-set::++ .. tab-item:: C+ :sync: c++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part8]+++Build Your Application+###############################################################################################++If you have integrated OpenVINO with your application, you will need to adjust your+application build process as well. Of course, there are multiple ways this stage may be+done, so you will need to choose the one best for your project. To learn about the basics of+OpenVINO build process, refer to the+`documentation on GitHub <https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md>`__.++The following example uses a C++ & C application together with CMake,+for project configuration.++1. Create Structure for project:++ .. tab-set::++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/snippets/src/main.cpp+ :language: cpp+ :fragment: [part7]+ :force:++ .. tab-item:: C+ :sync: c++ .. doxygensnippet:: docs/snippets/src/main.c+ :language: cpp+ :fragment: [part7]+ :force:+++2. Configure the CMake build++ For details on additional CMake build options, refer to the+ `CMake page <https://cmake.org/cmake/help/latest/manual/cmake.1.html#manual:cmake(1)>`__.++ .. tab-set::++ .. tab-item:: C+++ :sync: cpp-OpenVINO Runtime is a set of C++ libraries with C and Python bindings providing a common API-to deploy inference on the platform of your choice. You can run any of the-:doc:`supported model formats <model-preparation>` directly or convert the model-and save it to the :doc:`OpenVINO IR <../documentation/openvino-ir-format>` format, for maximum performance.+ .. doxygensnippet:: docs/snippets/CMakeLists.txt+ :language: cpp+ :fragment: [cmake:integration_example_cpp]-Why is OpenVINO IR inference faster? Even if you run a supported model directly, it is-converted before inference. It may happen automatically, under the hood, for maximum convenience,-but it is not suited for the most performance-oriented use cases. For example, converting PyTorch-usually requires Python and the ``torch`` module, which take extra time and memory, on top the-conversion process itself. If OpenVINO IR is used instead, it does not require any conversion,-nor the additional dependencies, as the inference application can be written in C or C++.-OpenVINO IR provides by far the best first-inference latency scores.+ .. tab-item:: C+ :sync: c+ .. doxygensnippet:: docs/snippets/CMakeLists.txt+ :language: cpp+ :fragment: [cmake:integration_example_c]-.. note::+ .. tab-item:: C++ (PyPI)+ :sync: cpp- For more detailed information on how to convert, read, and compile supported model formats- see the :doc:`Model Preparation article <model-preparation>`.+ .. doxygensnippet:: docs/snippets/CMakeLists.txt+ :language: cpp+ :fragment: [cmake:integration_example_cpp_py]- Note that PyTorch models can be run using the- :doc:`torch.compile feature <torch-compile>`, as well as the standard ways of- :doc:`converting Pytorch <model-preparation/convert-model-pytorch>`- or running its inference.+3. Build Project-OpenVINO Runtime uses a plugin architecture. Its plugins are software components that contain complete implementation for inference on a particular Intel® hardware device: CPU, GPU, etc. Each plugin implements the unified API and provides additional hardware-specific APIs for configuring devices or API interoperability between OpenVINO Runtime and underlying plugin backend.+ Use CMake to build the project on your system:-The scheme below illustrates the typical workflow for deploying a trained deep learning model:+ .. code-block:: sh+ cd build/+ cmake ../project+ cmake --build .-.. image:: ../assets/images/BASIC_FLOW_IE_C.svg+Additional Resources+####################+* To see working implementation of the steps, check out the+ :doc:`Learn OpenVINO <../get-started/learn-openvino>` section, including+ `OpenVINO™ Runtime API Tutorial <./../../notebooks/openvino-api-with-output.html>`__.+* Models in the OpenVINO IR format on `Hugging Face <https://huggingface.co/models>`__.+* :ref:`Using Encrypted Models with OpenVINO <encrypted-models>`diff --git a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/auto-device-selection.rst b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/auto-device-selection.rstindex 3a5df5faa2c..8c54b9b6fe2 100644--- a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/auto-device-selection.rst+++ b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/auto-device-selection.rst@@ -66,7 +66,8 @@ For example, if you use a CPU and a GPU, the first-inference latency of AUTO wilNote that if you choose to exclude CPU from the priority list or disable the initialCPU acceleration feature via ``ov::intel_auto::enable_startup_fallback``, it will be-unable to support the initial model compilation stage. The models with :doc:`stateful operations <../stateful-models>`+unable to support the initial model compilation stage. The models with+:doc:`stateful operations <../inference-request/stateful-models>`will be loaded to the CPU if it is in the candidate list. Otherwise,these models will follow the normal flow and be loaded to the device based on priority.@@ -311,7 +312,7 @@ The ``ov::hint::performance_mode`` property enables you to specify a performanceThe THROUGHPUT and CUMULATIVE_THROUGHPUT hints below only improve performance in anasynchronous inference pipeline. For information on asynchronous inference, see the-:doc:`Async API documentation <../integrate-openvino-with-your-application/inference-request>` .+:doc:`Async API documentation <../inference-request>` .The following notebooks provide examples of how to set up an asynchronous pipeline:* :doc:`Image Classification Async Sample <../../../get-started/learn-openvino/openvino-samples/image-classification-async>`diff --git a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/cpu-device.rst b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/cpu-device.rstindex 0b0c610da17..3dc6e16bf8a 100644--- a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/cpu-device.rst+++ b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/cpu-device.rst@@ -284,7 +284,7 @@ with the static input shape to get the best performance.:fragment: [static_shape]-For more details, see the :doc:`dynamic shapes guide <../dynamic-shapes>`.+For more details, see the :doc:`dynamic shapes guide <../model-input-output/dynamic-shapes>`.Preprocessing Acceleration+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++@@ -336,7 +336,7 @@ Stateful ModelsThe CPU plugin supports stateful models without any limitations.-For details, see :doc:`stateful models guide <../stateful-models>`.+For details, see :doc:`stateful models guide <../inference-request/stateful-models>`.Supported Properties###########################################################diff --git a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/gpu-device.rst b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/gpu-device.rstindex 921868d4f04..076236c22b2 100644--- a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/gpu-device.rst+++ b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/gpu-device.rst@@ -244,7 +244,7 @@ Dynamic Shapes- Dynamic rank is not supported.The general description of what dynamic shapes are and how they are used can be found in-:doc:`dynamic shapes guide <../dynamic-shapes>`.+:doc:`dynamic shapes guide <../model-input-output/dynamic-shapes>`.To support dynamic shape execution, the following basic infrastructures are implemented:- Runtime shape inference: infers output shapes of each primitive for a new input shape at runtime.diff --git a/docs/articles_en/openvino-workflow/running-inference/inference-request.rst b/docs/articles_en/openvino-workflow/running-inference/inference-request.rstnew file mode 100644index 00000000000..5ba6e359562--- /dev/null+++ b/docs/articles_en/openvino-workflow/running-inference/inference-request.rst@@ -0,0 +1,359 @@+OpenVINO™ Inference Request+=============================+++.. meta::+ :description: Infer Request mechanism in OpenVINO™ Runtime allows inferring+ models on different devices in asynchronous or synchronous+ modes of inference.+++.. toctree::+ :maxdepth: 1+ :hidden:++ inference-request/stateful-models+ inference-request/python-api-exclusives+ inference-request/python-api-advanced-inference+++To set up and run inference, use the ``ov::InferRequest`` class. It enables you to run+inference on different devices either synchronously or asynchronously. It also includes+methods to retrieve data or adjust data from model inputs and outputs.++The ``ov::InferRequest`` can be created from the ``ov::CompiledModel``.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: create_infer_request++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: create_infer_request++++Synchronous / asynchronous inference+###############################################################################################++The synchronous mode is the basic mode of inference and means that inference stages block+the application execution, as one waits for the other to finish. Use ``ov::InferRequest::infer``+to execute in this mode.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: sync_infer++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: sync_infer+++The asynchronous mode may improve application performance, as it enables the app to operate+before inference finishes, with the accelerator still running inference. Use+``ov::InferRequest::start_async`` to execute in this mode.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: async_infer++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: async_infer+++The asynchronous mode supports two ways the application waits for inference results.+Both are thread-safe.++* ``ov::InferRequest::wait_for`` - the method is blocked until the specified time has passed+ or the result becomes available, whichever comes first.++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: wait_for++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: wait_for+++* ``ov::InferRequest::wait`` - waits until inference results become available.++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: wait++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: wait+++ Keep in mind that the completion order cannot be guaranteed when processing inference+ requests simultaneously, possibly complicating the application logic. Therefore, for+ multi-request scenarios, consider also the ``ov::InferRequest::set_callback`` method, to+ trigger a callback when the request is complete. Note that to avoid cyclic references+ in the callback, weak reference of infer_request should be used (``ov::InferRequest*``,+ ``ov::InferRequest&, std::weal_ptr<ov::InferRequest>``, etc.).++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: set_callback++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: set_callback+++ If you want to abort a running inference request, use the ``ov::InferRequest::cancel``+ method.++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: cancel++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: cancel+++For more information, see the+:doc:`Classification Async Sample <../../get-started/learn-openvino/openvino-samples/image-classification-async>`,+as well as the articles on+:doc:`synchronous <../../documentation/openvino-extensibility/openvino-plugin-library/synch-inference-request>`+and+:doc:`asynchronous <../../documentation/openvino-extensibility/openvino-plugin-library/asynch-inference-request>`+inference requests.+++.. _in_out_tensors:+++Working with Input and Output tensors+###############################################################################################+++``ov::InferRequest`` enables you to get input/output tensors by tensor name, index, and port.+Note that a similar logic is applied to retrieving data using the ``ov::Model`` methods.+++``get_input_tensor``, ``set_input_tensor``, ``get_output_tensor``, ``set_output_tensor``++.. rst-class:: m-4++ * for a model with only one input/output, no arguments are required++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: get_set_one_tensor++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: get_set_one_tensor+++ * to select a specific input/output tensor provide its index number as a parameter+++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: get_set_index_tensor++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: get_set_index_tensor+++``ov::InferRequest::get_tensor``, ``ov::InferRequest::set_tensor``++.. rst-class:: m-4++ * to select an input/output tensor by tensor name, provide it as a parameter++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: get_set_tensor++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: get_set_tensor+++ * to select an input/output tensor by port+++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: get_set_tensor_by_port++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: get_set_tensor_by_port+++Infer Request Use Scenarios+###############################################################################################++Cascade of Models++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++``ov::InferRequest`` can be used to organize a cascade of models. Infer Requests are required+for each model. In this case, you can get the 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``. Keep in mind that tensors shared 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.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: cascade_models++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: cascade_models+++Re-use shared input in several models (e.g. ROI Tensors)++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++If a model processes data created by a different model in the same pipeline, you may be+able to reuse the input, instead of allocating two separate input tensors. Just allocate+memory for the first model input, and then reuse it for the second model, adjusting it+if necessary. A good example is, when the first model detects objects in a video frame+(stored as an input tensor), and the second model uses the generated Region of Interest+(ROI) to perform additional operations. In this case, the second model may take the+pre-allocated input and crop the frame to the size of the generated bounding boxes.+In this case, use ``ov::Tensor`` with ``ov::Tensor`` and ``ov::Coordinate`` as parameters.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: roi_tensor+++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: roi_tensor++Using Remote Tensors++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++By using ``ov::RemoteContext`` you can create a remote tensor to work with remote device memory.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py+ :language: python+ :fragment: remote_tensor++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp+ :language: cpp+ :fragment: remote_tensordiff --git a/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application/python-api-advanced-inference.rst b/docs/articles_en/openvino-workflow/running-inference/inference-request/python-api-advanced-inference.rstsimilarity index 100%rename from docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application/python-api-advanced-inference.rstrename to docs/articles_en/openvino-workflow/running-inference/inference-request/python-api-advanced-inference.rstdiff --git a/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application/python-api-exclusives.rst b/docs/articles_en/openvino-workflow/running-inference/inference-request/python-api-exclusives.rstsimilarity index 100%rename from docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application/python-api-exclusives.rstrename to docs/articles_en/openvino-workflow/running-inference/inference-request/python-api-exclusives.rstdiff --git a/docs/articles_en/openvino-workflow/running-inference/stateful-models.rst b/docs/articles_en/openvino-workflow/running-inference/inference-request/stateful-models.rstsimilarity index 92%rename from docs/articles_en/openvino-workflow/running-inference/stateful-models.rstrename to docs/articles_en/openvino-workflow/running-inference/inference-request/stateful-models.rstindex edbd94126c2..67c56272fc0 100644--- a/docs/articles_en/openvino-workflow/running-inference/stateful-models.rst+++ b/docs/articles_en/openvino-workflow/running-inference/inference-request/stateful-models.rst@@ -14,7 +14,7 @@ output. In contrast, for a "stateless" model to pass data between runs, all prodreturned as output and needs to be handled by the application itself for reuse at the nextexecution.-.. image:: ../../assets/images/stateful_model_example.svg+.. image:: ../../../assets/images/stateful_model_example.svg:alt: example comparison between stateless and stateful model implementations:align: center:scale: 90 %@@ -55,9 +55,9 @@ OpenVINO Stateful Model RepresentationTo make a model stateful, OpenVINO replaces looped pairs of `Parameter` and `Result` with itsown two operations:-* ``ReadValue`` (:doc:`see specs <../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/read-value-6>`)+* ``ReadValue`` (:doc:`see specs <../../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/read-value-6>`)reads the data from the state and returns it as output.-* ``Assign`` (:doc:`see specs <../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/assign-6>`)+* ``Assign`` (:doc:`see specs <../../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/assign-6>`)accepts the data as input and saves it in the state for the next inference call.Each pair of these operations works with **state**, which is automatically saved between@@ -66,7 +66,7 @@ from the application code to OpenVINO and all related internal work is hidden frThere are three methods of turning an OpenVINO model into a stateful one:-* :doc:`Optimum-Intel <../../openvino-workflow-generative/inference-with-optimum-intel>` - the most user-friendly option. All necessary optimizations+* :doc:`Optimum-Intel <../../../openvino-workflow-generative/inference-with-optimum-intel>` - the most user-friendly option. All necessary optimizationsare recognized and applied automatically. The drawback is, the tool does not work with allmodels.@@ -111,7 +111,7 @@ states.each run performed in a different infer request than the previous one would require the stateto be set "manually", using the ``ov::VariableState::set_state`` method.-.. image:: ../../assets/images/stateful_model_init_subgraph.svg+.. image:: ../../../assets/images/stateful_model_init_subgraph.svg:alt: diagram of how initial state value is set or reset:align: center:scale: 100 %diff --git a/docs/articles_en/openvino-workflow/running-inference/stateful-models/obtaining-stateful-openvino-model.rst b/docs/articles_en/openvino-workflow/running-inference/inference-request/stateful-models/obtaining-stateful-openvino-model.rstsimilarity index 88%rename from docs/articles_en/openvino-workflow/running-inference/stateful-models/obtaining-stateful-openvino-model.rstrename to docs/articles_en/openvino-workflow/running-inference/inference-request/stateful-models/obtaining-stateful-openvino-model.rstindex 00628af4f18..eab4568387c 100644--- a/docs/articles_en/openvino-workflow/running-inference/stateful-models/obtaining-stateful-openvino-model.rst+++ b/docs/articles_en/openvino-workflow/running-inference/inference-request/stateful-models/obtaining-stateful-openvino-model.rst@@ -3,14 +3,14 @@ Obtaining a Stateful OpenVINO ModelIf the original framework does not offer a dedicated API for working with states, theresulting OpenVINO IR model will not be stateful by default. This means it will not contain-either a state or the :doc:`Assign <../../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/assign-6>` and-:doc:`ReadValue <../../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/read-value-6>` operations. You can still+either a state or the :doc:`Assign <../../../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/assign-6>` and+:doc:`ReadValue <../../../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/read-value-6>` operations. You can stillmake such models stateful (:doc:`see benefits <../stateful-models>`),and you have three ways to do it:* `Optimum-Intel <https://github.com/huggingface/optimum-intel>`__ - an automated solutionapplicable to a selection of models (not covered by this article, for a usage guide- refer to the :doc:`LLM Inference with Hugging Face and Optimum Intel <../../../openvino-workflow-generative>` article).+ refer to the :doc:`LLM Inference with Hugging Face and Optimum Intel <../../../../openvino-workflow-generative>` article).* :ref:`MakeStateful transformation <ov_ug_make_stateful>` - to choose which pairs ofParameter and Result to replace.* :ref:`LowLatency2 transformation <ov_ug_low_latency>` - to detect and replace Parameter@@ -26,7 +26,7 @@ MakeStateful TransformationThe MakeStateful transformation changes the structure of the model by replacing theuser-defined pairs of Parameter and Results with the Assign and ReadValue operations:-.. image:: ../../../assets/images/make_stateful_simple.svg+.. image:: ../../../../assets/images/make_stateful_simple.svg:alt: diagram of MakeStateful Transformation:scale: 90 %:align: center@@ -37,12 +37,12 @@ without spaces 'tensor_name_1'.**State naming rule**: in most cases, the name of a state is a concatenation of theParameter/Result tensor names. If there are no tensor names,-:doc:`friendly names <../../../documentation/openvino-extensibility/transformation-api>` are used.+:doc:`friendly names <../../../../documentation/openvino-extensibility/transformation-api>` are used.**Examples:**-.. image:: ../../../assets/images/make_stateful_detailed.png+.. image:: ../../../../assets/images/make_stateful_detailed.png:alt: detailed diagram of MakeStateful Transformation:align: center@@ -106,12 +106,12 @@ LowLatency2 Transformation###############################The LowLatency2 transformation changes the structure of a model containing-:doc:`TensorIterator <../../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/tensor-iterator-1>`-and :doc:`Loop <../../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/loop-5>` by automatically detecting+:doc:`TensorIterator <../../../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/tensor-iterator-1>`+and :doc:`Loop <../../../../documentation/openvino-ir-format/operation-sets/operation-specs/infrastructure/loop-5>` by automatically detectingand replacing pairs of Parameter and Results with the Assign and ReadValue operations,as illustrated by the following example:-.. image:: ../../../assets/images/applying_low_latency_2.svg+.. image:: ../../../../assets/images/applying_low_latency_2.svg:alt: diagram of LowLatency Transformation:align: center@@ -124,7 +124,7 @@ for the ReadValue operations are set to zeros unless the user specifies otherwisTo apply LowLatency2 Transformation, follow the instruction below:-1. Get :doc:`ov::Model <../integrate-openvino-with-your-application/model-representation>`,+1. Get :doc:`ov::Model <../../model-representation>`,for example:.. tab-set::@@ -145,7 +145,7 @@ To apply LowLatency2 Transformation, follow the instruction below:2. Change the number of iterations inside TensorIterator/Loop nodes in the model using the- :doc:`Reshape <../changing-input-shape>` feature.+ :doc:`Reshape <../../model-input-output/changing-input-shape>` feature.For example, the *sequence_lengths* dimension of the model input > 1, it means theTensorIterator layer has the number_of_iterations > 1. You can reshape the model@@ -215,7 +215,7 @@ To apply LowLatency2 Transformation, follow the instruction below::fragment: [ov:low_latency_2_use_parameters]- .. image:: ../../../assets/images/llt2_use_const_initializer.svg+ .. image:: ../../../../assets/images/llt2_use_const_initializer.svg:alt: diagram of constant subgraph initialization:align: center@@ -245,18 +245,18 @@ To apply LowLatency2 Transformation, follow the instruction below:4. Use state API. See sections :doc:`OpenVINO State API <../stateful-models>`,:ref:`Stateful Model Inference <ov_ug_stateful_model_inference>`.- .. image:: ../../../assets/images/low_latency_limitation_2.svg+ .. image:: ../../../../assets/images/low_latency_limitation_2.svg:alt: diagram showing low latency limitation:scale: 70 %:align: centerThe only way to change the number iterations of TensorIterator/Loop layer is to use the- :doc:`Reshape <../changing-input-shape>` feature. However, some models may be+ :doc:`Reshape <../../model-input-output/changing-input-shape>` feature. However, some models may benon-reshapable, typically because the value of shapes is hardcoded in a constantsomewhere in the model.In such a case, trim non-reshapable layers via- :doc:`Conversion Parameters <../../model-preparation/conversion-parameters>`:+ :doc:`Conversion Parameters <../../../model-preparation/conversion-parameters>`:``--input`` and ``--output``. For example, check the `OpenVINO Model Conversion Tutorial <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/convert-to-openvino>`__.As for the parameter and the problematic constant in the picture above, it can be@@ -285,7 +285,7 @@ Stateful Model from ScratchThe main approach to obtaining stateful OpenVINO IR models is converting from otherframeworks. Nonetheless, it is possible to create a model from scratch. Check how to-do so in the :doc:`Build OpenVINO Model section <../integrate-openvino-with-your-application/model-representation>`.+do so in the :doc:`Build OpenVINO Model section <../../model-representation>`.Here is also an example of how ``ov::SinkVector`` is used to create ``ov::Model``. For amodel with states, except inputs and outputs, ``Assign`` nodes should also point to ``Model``diff --git a/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application.rst b/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application.rstdeleted file mode 100644index d43f81187f1..00000000000--- a/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application.rst+++ /dev/null@@ -1,447 +0,0 @@-Integrate OpenVINO™ with Your Application-===========================================---.. toctree::- :maxdepth: 1- :hidden:-- integrate-openvino-with-your-application/model-representation- integrate-openvino-with-your-application/inference-request- integrate-openvino-with-your-application/python-api-advanced-inference- integrate-openvino-with-your-application/python-api-exclusives---.. meta::- :description: Learn how to implement a typical inference pipeline of OpenVINO™- Runtime in an application.---Following these steps, you can implement a typical OpenVINO™ Runtime inference pipeline in your-application. Before proceeding, make sure you have :doc:`installed OpenVINO Runtime <../../get-started/install-openvino>`-and set environment variables (run ``<INSTALL_DIR>/setupvars.sh`` for Linux, ``setupvars.ps1``-for Windows PowerShell, or ``setupvars.bat`` for Windows CMD). Otherwise, the ``OpenVINO_DIR``-variable won't be configured properly to pass ``find_package`` calls.---.. image:: ../../assets/images/IMPLEMENT_PIPELINE_with_API_C.svg---Step 1. Create OpenVINO Runtime Core-####################################--Include the necessary files to work with OpenVINO™ Runtime and create OpenVINO™ Core to manage-available devices and read model objects:--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [import]-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part1]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [include]-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part1]-- .. tab-item:: C- :sync: c-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [include]-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part1]----Step 2. Compile the Model-#########################--``ov::CompiledModel`` class represents a device specific compiled model. ``ov::CompiledModel`` allows you to get information inputs or output ports by a tensor name or index. This approach is aligned with the majority of frameworks.-:doc:`AUTO mode <./inference-devices-and-modes/auto-device-selection>` automatically selects the most suitable hardware for running inference.--Compile the model for a specific device using ``ov::Core::compile_model()``:--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. tab-set::-- .. tab-item:: IR- :sync: ir-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part2_1]-- .. tab-item:: ONNX- :sync: onnx-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part2_2]-- .. tab-item:: PaddlePaddle- :sync: paddlepaddle-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part2_3]-- .. tab-item:: TensorFlow- :sync: tensorflow-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part2_4]-- .. tab-item:: TensorFlow Lite- :sync: tensorflow_lite-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part2_5]-- .. tab-item:: ov::Model- :sync: openvinomodel-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part2_6]-- .. tab-item:: C++- :sync: cpp-- .. tab-set::-- .. tab-item:: IR- :sync: ir-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part2_1]-- .. tab-item:: ONNX- :sync: onnx-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part2_2]-- .. tab-item:: PaddlePaddle- :sync: paddlepaddle-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part2_3]-- .. tab-item:: TensorFlow- :sync: tensorflow-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part2_4]-- .. tab-item:: TensorFlow Lite- :sync: tensorflow_lite-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part2_5]-- .. tab-item:: ov::Model- :sync: openvinomodel-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part2_6]-- .. tab-item:: C- :sync: c-- .. tab-set::-- .. tab-item:: IR- :sync: ir-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part2_1]-- .. tab-item:: ONNX- :sync: onnx-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part2_2]-- .. tab-item:: PaddlePaddle- :sync: paddlepaddle-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part2_3]-- .. tab-item:: TensorFlow- :sync: tensorflow-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part2_4]-- .. tab-item:: TensorFlow Lite- :sync: tensorflow_lite-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part2_5]-- .. tab-item:: ov::Model- :sync: openvinomodel-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part2_6]---The ``ov::Model`` object represents any models inside the OpenVINO™ Runtime.-For more details please read article about :doc:`OpenVINO™ Model representation <integrate-openvino-with-your-application/model-representation>`.--The code above creates a compiled model associated with a single hardware device from the model object.-It is possible to create as many compiled models as needed and use them simultaneously (up to the limitation of the hardware).-To learn more about supported devices and inference modes, read the :doc:`Inference Devices and Modes <./inference-devices-and-modes>` article.---Step 3. Create an Inference Request-###################################--``ov::InferRequest`` class provides methods for model inference in OpenVINO™ Runtime.-Create an infer request using the following code (see-:doc:`InferRequest documentation <integrate-openvino-with-your-application/inference-request>` for more details):--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part3]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part3]-- .. tab-item:: C- :sync: c-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part3]---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:--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part4]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part4]-- .. tab-item:: C- :sync: c-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part4]--See :doc:`additional materials <string-tensors>` to learn how to handle textual data as a model input.--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: instead of waiting 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:--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part5]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part5]-- .. tab-item:: C- :sync: c-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part5]---This section demonstrates a simple pipeline. To get more information about other ways to perform inference, read the dedicated-:doc:`"Run inference" section <integrate-openvino-with-your-application/inference-request>`.--Step 6. Process the Inference Results-#####################################--Go over the output tensors and process the inference results.--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/snippets/src/main.py- :language: python- :fragment: [part6]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part6]-- .. tab-item:: C- :sync: c-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part6]--See :doc:`additional materials <string-tensors>` to learn how to handle textual data as a model output.--Step 7. Release the allocated objects (only for C)-##################################################--To avoid memory leak, applications developed with C API need to release the allocated objects in order.--.. tab-set::-- .. tab-item:: C- :sync: c-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part8]---Step 8. Link and Build Your Application with OpenVINO™ Runtime (example)-########################################################################--This step may differ for different projects. In this example, a C++ & C application is used, together with CMake for project configuration.--Create Structure for project:-+++++++++++++++++++++++++++++--.. tab-set::-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/snippets/src/main.cpp- :language: cpp- :fragment: [part7]- :force:-- .. tab-item:: C- :sync: c-- .. doxygensnippet:: docs/snippets/src/main.c- :language: cpp- :fragment: [part7]- :force:---Create Cmake Script-++++++++++++++++++++--For details on additional CMake build options, refer to the `CMake page <https://cmake.org/cmake/help/latest/manual/cmake.1.html#manual:cmake(1)>`__.--.. tab-set::-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/snippets/CMakeLists.txt- :language: cpp- :fragment: [cmake:integration_example_cpp]-- .. tab-item:: C- :sync: c-- .. doxygensnippet:: docs/snippets/CMakeLists.txt- :language: cpp- :fragment: [cmake:integration_example_c]-- .. tab-item:: C++ (PyPI)- :sync: cpp-- .. doxygensnippet:: docs/snippets/CMakeLists.txt- :language: cpp- :fragment: [cmake:integration_example_cpp_py]--Build Project-++++++++++++++++++++--To build your project using CMake with the default build tools currently available on your machine, execute the following commands:--.. code-block:: sh-- cd build/- cmake ../project- cmake --build .---Additional Resources-####################--* `OpenVINO™ Runtime API Tutorial <https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/openvino-api>`__-* See the :doc:`OpenVINO Samples <../../get-started/learn-openvino/openvino-samples>` page for specific examples of how OpenVINO pipelines are implemented for applications like image classification, text prediction, and many others.-* Models in the OpenVINO IR format on `Hugging Face <https://huggingface.co/models>`__.-* :doc:`OpenVINO™ Runtime Preprocessing <optimize-inference/optimize-preprocessing>`-* :doc:`String Tensors <string-tensors>`-* :ref:`Using Encrypted Models with OpenVINO <encrypted-models>`-diff --git a/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application/inference-request.rst b/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application/inference-request.rstdeleted file mode 100644index 93baeff1e13..00000000000--- a/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application/inference-request.rst+++ /dev/null@@ -1,340 +0,0 @@-OpenVINO™ Inference Request-=============================---.. meta::- :description: Infer Request mechanism in OpenVINO™ Runtime allows inferring- models on different devices in asynchronous or synchronous- modes of inference.---OpenVINO™ Runtime uses Infer Request mechanism which allows running models on different devices in asynchronous or synchronous manners.-The ``ov::InferRequest`` class is used for this purpose inside the OpenVINO™ Runtime.-This class allows you to set and get data for model inputs, outputs and run inference for the model.--Creating Infer Request-######################--The ``ov::InferRequest`` can be created from the ``ov::CompiledModel``:---.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: create_infer_request-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: create_infer_request---Run Inference-####################--The ``ov::InferRequest`` supports synchronous and asynchronous modes for inference.--Synchronous Mode-++++++++++++++++++++--You can use ``ov::InferRequest::infer``, which blocks the application execution, to infer a model in the synchronous mode:---.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: sync_infer-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: sync_infer---Asynchronous Mode-++++++++++++++++++++--The asynchronous mode can improve application's overall frame-rate, by making it work on the host while the accelerator is busy, instead of waiting for inference to complete. To infer a model in the asynchronous mode, use ``ov::InferRequest::start_async``:---.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: async_infer-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: async_infer---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.-- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: wait_for-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: wait_for---* ``ov::InferRequest::wait`` - waits until inference result becomes available-- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: wait-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: wait----Both methods are thread-safe.--When you are running several inference requests in parallel, a device can process them simultaneously, with no guarantees 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:---.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: set_callback-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: set_callback---.. note::-- Use weak reference of infer_request (``ov::InferRequest*``, ``ov::InferRequest&``, ``std::weal_ptr<ov::InferRequest>``, etc.) in the callback. It is necessary to avoid cyclic references.---For more details, see the :doc:`Classification Async Sample <../../../get-started/learn-openvino/openvino-samples/image-classification-async>`.--You can use the ``ov::InferRequest::cancel`` method if you want to abort execution of the current inference request:---.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: cancel-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: cancel---.. _in_out_tensors:---Working with Input and Output tensors-#####################################--``ov::InferRequest`` allows you to get input/output tensors by tensor name, index, port, and without any arguments, if a 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 a model with only one input/output:-- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: get_set_one_tensor-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: get_set_one_tensor---* ``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:--- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: get_set_index_tensor-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: get_set_index_tensor---* ``ov::InferRequest::get_tensor``, ``ov::InferRequest::set_tensor`` methods can be used to get or set input/output tensor by tensor name:--- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: get_set_tensor-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: get_set_tensor---* ``ov::InferRequest::get_tensor``, ``ov::InferRequest::set_tensor`` methods can be used to get or set input/output tensor by port:--- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: get_set_tensor_by_port-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: get_set_tensor_by_port---Examples of Infer Request Usages-################################--Presented below are examples of what the Infer Request can be used for.--Cascade of Models-++++++++++++++++++++--``ov::InferRequest`` can be used to organize a cascade of models. Infer Requests are required for each model.-In this case, you can get the 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``. Keep in mind that tensors shared 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.---.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: cascade_models-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: cascade_models---Using of ROI Tensors-++++++++++++++++++++--It is possible to re-use shared input in several models. You do not need to allocate a separate input tensor for a model if it processes a ROI object located inside of an already allocated input of a previous model. For instance, when the first model detects objects in a video frame (stored as an 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 a 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 ``ov::Tensor`` and ``ov::Coordinate`` as parameters.---.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: roi_tensor--- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: roi_tensor--Using Remote Tensors-++++++++++++++++++++--By using ``ov::RemoteContext`` you can create a remote tensor to work with remote device memory.---.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.py- :language: python- :fragment: remote_tensor-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_infer_request.cpp- :language: cpp- :fragment: remote_tensor--diff --git a/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.rst b/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.rstdeleted file mode 100644index 259f605d46c..00000000000--- a/docs/articles_en/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.rst+++ /dev/null@@ -1,301 +0,0 @@-Model Representation in OpenVINO™ Runtime-===========================================---.. meta::- :description: In OpenVINO™ Runtime a model is represented by special classes to work with model data types and shapes.---In OpenVINO™ Runtime, a model is represented by the ``ov::Model`` class.--The ``ov::Model`` object stores shared pointers to ``ov::op::v0::Parameter``, ``ov::op::v0::Result``, and ``ov::op::Sink`` operations,-which are inputs, outputs, and sinks of the graph. Sinks of the graph have no consumers and are not included in the results vector.-All other operations hold each other via shared pointers, in which a child operation holds its parent via a hard link. If an operation-has no consumers and is neither the ``Result`` nor the ``Sink`` operation whose shared pointer counter is zero, the operation will be-destructed and not be accessible anymore.--Each operation in ``ov::Model`` has the ``std::shared_ptr<ov::Node>`` type.--How OpenVINO Runtime Works with Models-#########################################--OpenVINO™ Runtime enables you to use different approaches to work with model inputs/outputs:--* The ``ov::Model::inputs()`` / ``ov::Model::outputs()`` methods are used to get vectors of all input/output ports.-- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py- :language: cpp- :fragment: [all_inputs_ouputs]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp- :language: cpp- :fragment: [all_inputs_ouputs]--* For a model that has only one input or output, you can use the ``ov::Model::input()`` or ``ov::Model::output()`` methods without- any arguments to get input or output port respectively.--* The ``ov::Model::input()`` and ``ov::Model::output()`` methods can be used with the index of inputs or outputs from the framework- model to get specific ports by index.-- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. code-block:: python-- ov_model_input = model.input(index)- ov_model_output = model.output(index)-- .. tab-item:: C++- :sync: cpp-- .. code-block:: cpp-- auto ov_model_input = ov_model->input(index);- auto ov_model_output = ov_model->output(index);--* You can use the tensor name of input or output from the original framework model together with the- ``ov::Model::input()`` or ``ov::Model::output()`` methods to get specific ports. It means that you do not need to have any- additional mapping of names from framework to OpenVINO as it was before. OpenVINO Runtime allows the usage of native framework- tensor names, for example:--.. warning::-- All inputs/outputs of ``ov::Model`` are numbered, so the preferred way to retrieve them is to use indices.-- Using tensor names can potentially be a less reliable approach, since the mandatory- presence of tensor names for inputs and outputs is not guaranteed in the original frameworks.- Therefore ``ov::Model`` may contain empty list of ``tensor_names`` for inputs/outputs.-- To get all tensor names which are associated with the corresponding input/output, OpenVINO- Runtime has ``get_names`` method. To get some name from all names associated with a given input/output,- the ``get_any_name`` method was introduced. These methods may return empty names list/empty name- if the names are not present.-- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. code-block:: python-- ov_model_input = model.input(original_fw_in_tensor_name)- ov_model_output = model.output(original_fw_out_tensor_name)-- .. tab-item:: C++- :sync: cpp-- .. code-block:: cpp-- auto ov_model_input = ov_model->input(original_fw_in_tensor_name);- auto ov_model_output = ov_model->output(original_fw_out_tensor_name);--For details on how to build a model in OpenVINO™ Runtime, see the :ref:`Build a Model in OpenVINO Runtime <ov_ug_build_model>` section.--OpenVINO™ Runtime model representation uses special classes to work with model data types and shapes. The ``ov::element::Type``-is used for data types.--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. code-block:: python-- ov_input.get_element_type()-- .. tab-item:: C++- :sync: cpp-- .. code-block:: cpp-- ov_input->get_element_type();--Representation of Shapes-###########################--OpenVINO™ Runtime provides two types for shape representation:--* ``ov::Shape`` - Represents static (fully defined) shapes.--* ``ov::PartialShape`` - Represents dynamic shapes. This means that the rank or some of dimensions are dynamic- (dimension defines an interval or undefined).--``ov::PartialShape`` can be converted to ``ov::Shape`` by using the ``get_shape()`` method if all dimensions are static; otherwise,-the conversion will throw an exception. For example:--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py- :language: python- :fragment: [ov:partial_shape]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp- :language: cpp- :fragment: [ov:partial_shape]---However, in most cases, before getting static shape using the ``get_shape()`` method, you need to check if that shape is static.--Representation of Operations-################################--The ``ov::Op`` class represents any abstract operation in the model representation. Use this class to create-:doc:`custom operations <../../../documentation/openvino-extensibility/custom-openvino-operations>`.--Representation of Operation Sets-######################################--An operation set (opset) is a collection of operations that can be used to construct a model. The ``ov::OpSet`` class provides-the functionality to work with operation sets.-For each operation set, OpenVINO™ Runtime provides a separate namespace, for example ``opset8``.--Each OpenVINO™ Release introduces new operations and adds them to new operation sets, within which the new operations would change-the behavior of previous operations. Using operation sets helps you avoid changing your application when new operations are introduced.-For a complete list of operation sets supported in OpenVINO™ toolkit, see the :doc:`Available Operations Sets <../../../documentation/openvino-ir-format/operation-sets/available-opsets>`.-To add the support for custom operations, see :doc:`OpenVINO Extensibility Mechanism <../../../documentation/openvino-extensibility>`.--.. _ov_ug_build_model:--Building a Model in OpenVINO™ Runtime-###########################################--You can create a model from source. This section illustrates how to construct a model composed of operations from an available operation set.--Operation set ``opsetX`` integrates a list of pre-compiled operations that work for this purpose. In other words, ``opsetX``-defines a set of operations for building a graph.--To build an ``ov::Model`` instance from ``opset8`` operations, include the following files:--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py- :language: cpp- :fragment: [import]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp- :language: cpp- :fragment: [ov:include]---The following code demonstrates how to create a simple model:--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py- :language: cpp- :fragment: [ov:create_simple_model]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp- :language: cpp- :fragment: [ov:create_simple_model]---The following code creates a model with several outputs:--.. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py- :language: cpp- :fragment: [ov:create_advanced_model]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp- :language: cpp- :fragment: [ov:create_advanced_model]---Model Debugging 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:-- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py- :language: python- :fragment: [ov:visualize]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp- :language: cpp- :fragment: [ov:visualize]--- ``ov::pass::VisualizeTree`` can be parametrized via environment variables:-- * ``OV_VISUALIZE_TREE_OUTPUT_SHAPES=1`` - visualize shapes- * ``OV_VISUALIZE_TREE_OUTPUT_TYPES=1`` - visualize types- * ``OV_VISUALIZE_TREE_MIN_MAX_DENORMAL=1`` - pretty denormal values- * ``OV_VISUALIZE_TREE_RUNTIME_INFO=1`` - print runtime information- * ``OV_VISUALIZE_TREE_IO=1`` - print I/O ports- * ``OV_VISUALIZE_TREE_MEMBERS_NAME=1`` - print member names---* Also model can be serialized to IR:-- .. tab-set::-- .. tab-item:: Python- :sync: py-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py- :language: python- :fragment: [ov:serialize]-- .. tab-item:: C++- :sync: cpp-- .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp- :language: cpp- :fragment: [ov:serialize]---Additional Resources-########################--* :doc:`Available Operation Sets <../../../documentation/openvino-ir-format/operation-sets/available-opsets>`.-* :doc:`OpenVINO™ Runtime Extensibility Developer Guide <../../../documentation/openvino-extensibility>`.-* :doc:`Transformations Developer Guide <../../../documentation/openvino-extensibility/transformation-api>`.diff --git a/docs/articles_en/openvino-workflow/running-inference/model-input-output.rst b/docs/articles_en/openvino-workflow/running-inference/model-input-output.rstnew file mode 100644index 00000000000..118d77576f0--- /dev/null+++ b/docs/articles_en/openvino-workflow/running-inference/model-input-output.rst@@ -0,0 +1,100 @@+Model Input/Output+===============================================================================================++.. meta::+ :description: OpenVINO™ Runtime includes several methods for handling model inputs and+ outputs.+++.. toctree::+ :maxdepth: 1+ :hidden:++ model-input-output/changing-input-shape+ model-input-output/dynamic-shapes+ model-input-output/string-tensors+++``ov::Model::inputs()`` and ``ov::Model::outputs()`` methods retrieve vectors of all+input/output ports.++Note that a similar logic is applied to retrieving data using the ``ov::InferRequest`` methods.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py+ :language: cpp+ :fragment: [all_inputs_ouputs]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp+ :language: cpp+ :fragment: [all_inputs_ouputs]+++``ov::Model::input()`` and ``ov::Model::output()`` methods retrieve vectors of specific+input/output ports. To select the ports, you may use:++* no arguments, if the model has only one input or output,+* the index of inputs or outputs from the original model framework,++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. code-block:: python++ ov_model_input = model.input(index)+ ov_model_output = model.output(index)++ .. tab-item:: C+++ :sync: cpp++ .. code-block:: cpp++ auto ov_model_input = ov_model->input(index);+ auto ov_model_output = ov_model->output(index);+++* tensor names of inputs or outputs from the original model framework.++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. code-block:: python++ ov_model_input = model.input(original_fw_in_tensor_name)+ ov_model_output = model.output(original_fw_out_tensor_name)++ .. tab-item:: C+++ :sync: cpp++ .. code-block:: cpp++ auto ov_model_input = ov_model->input(original_fw_in_tensor_name);+ auto ov_model_output = ov_model->output(original_fw_out_tensor_name);+++Since all ``ov::Model`` inputs and outputs are always numbered, using the index is the+recommended way. That is because the original frameworks do not necessarily require tensor+names, and so, ``ov::Model`` may contain an empty list of tensor_names for inputs/outputs.+The ``get_any_name`` and ``get_names`` methods enable you to retrieve one or all tensor names+associated with an input/output. If the names are not present, the methods will+return empty names.++For information on how ``ov::InferRequest`` methods retrieve vectors of input output ports,+see the :doc:`Inference Request <inference-request>` article.++For more details on how to work with model inputs and outputs, see other articles in this category:++- :doc:`Changing Input Shapes <model-input-output/changing-input-shape>`+- :doc:`Dynamic Shape Models <model-input-output/dynamic-shapes>`+- :doc:`String Tensors <model-input-output/string-tensors>`diff --git a/docs/articles_en/openvino-workflow/running-inference/changing-input-shape.rst b/docs/articles_en/openvino-workflow/running-inference/model-input-output/changing-input-shape.rstsimilarity index 88%rename from docs/articles_en/openvino-workflow/running-inference/changing-input-shape.rstrename to docs/articles_en/openvino-workflow/running-inference/model-input-output/changing-input-shape.rstindex 423f9c01dc0..530baa94710 100644--- a/docs/articles_en/openvino-workflow/running-inference/changing-input-shape.rst+++ b/docs/articles_en/openvino-workflow/running-inference/model-input-output/changing-input-shape.rst@@ -13,8 +13,8 @@ The following instructions are for cases where you need to change the model inpu.. note::If you need to do this only once, prepare a model with updated shapes via- :doc:`Model Conversion API <../model-preparation>`.- For more information, refer to the :doc:`Setting Input Shapes <../model-preparation/setting-input-shapes>` article.+ :doc:`Model Conversion API <../../model-preparation>`.+ For more information, refer to the :doc:`Setting Input Shapes <../../model-preparation/setting-input-shapes>` article.The reshape method@@ -45,7 +45,7 @@ to set a new batch size with the ``reshape`` method:The diagram below presents the results of using the method, where the size ofmodel input is changed with an image input:-.. image:: ../../assets/images/original_vs_reshaped_model.svg+.. image:: ../../../assets/images/original_vs_reshaped_model.svgWhen using the ``reshape`` method, you may take one of the approaches:@@ -73,7 +73,7 @@ When using the ``reshape`` method, you may take one of the approaches:To do the opposite - to resize input image to match the input shapes of the model,- use the :doc:`pre-processing API <optimize-inference/optimize-preprocessing>`.+ use the :doc:`pre-processing API <../optimize-inference/optimize-preprocessing>`.2. You can express a reshape plan, specifying the input by the port, the index, and the tensor name:@@ -151,12 +151,12 @@ When using the ``reshape`` method, you may take one of the approaches:You can find the usage scenarios of the ``reshape`` method in-:doc:`Hello Reshape SSD Samples <../../get-started/learn-openvino/openvino-samples/hello-reshape-ssd>`.+:doc:`Hello Reshape SSD Samples <../../../get-started/learn-openvino/openvino-samples/hello-reshape-ssd>`... note::In some cases, models may not be ready to be reshaped. Therefore, a new input- shape cannot be set neither with :doc:`Model Conversion API <../model-preparation>`+ shape cannot be set neither with :doc:`Model Conversion API <../../model-preparation>`nor the ``reshape`` method.The set_batch method@@ -189,7 +189,7 @@ Once you set the input shape of the model, call the ``compile_model`` method toget a ``CompiledModel`` object for inference with updated shapes.There are other approaches to change model input shapes during the stage of-:doc:`IR generation <../model-preparation/setting-input-shapes>` or :doc:`model representation <./integrate-openvino-with-your-application/model-representation>` in OpenVINO Runtime.+:doc:`IR generation <../../model-preparation/setting-input-shapes>` or :doc:`model representation <../model-representation>` in OpenVINO Runtime... important::@@ -205,10 +205,10 @@ There are other approaches to change model input shapes during the stage ofAdditional Resources####################-* :doc:`Extensibility documentation <../../documentation/openvino-extensibility>` - describes a special mechanism in OpenVINO that allows adding support of shape inference for custom operations.+* :doc:`Extensibility documentation <../../../documentation/openvino-extensibility>` - describes a special mechanism in OpenVINO that allows adding support of shape inference for custom operations.* `ov::Model::reshape <https://docs.openvino.ai/2025/api/c_cpp_api/group__ov__model__c__api.html#_CPPv416ov_model_reshapePK10ov_model_tPPKcPK18ov_partial_shape_t6size_t>`__ - in OpenVINO Runtime C++ API* `Model.reshape <https://docs.openvino.ai/2025/api/ie_python_api/_autosummary/openvino.runtime.Model.html#openvino.runtime.Model.reshape>`__ - in OpenVINO Runtime Python API.* :doc:`Dynamic Shapes <dynamic-shapes>`-* :doc:`OpenVINO samples <../../get-started/learn-openvino/openvino-samples>`-* :doc:`Preprocessing API <optimize-inference/optimize-preprocessing>`+* :doc:`OpenVINO samples <../../../get-started/learn-openvino/openvino-samples>`+* :doc:`Preprocessing API <../optimize-inference/optimize-preprocessing>`diff --git a/docs/articles_en/openvino-workflow/running-inference/dynamic-shapes.rst b/docs/articles_en/openvino-workflow/running-inference/model-input-output/dynamic-shapes.rstsimilarity index 97%rename from docs/articles_en/openvino-workflow/running-inference/dynamic-shapes.rstrename to docs/articles_en/openvino-workflow/running-inference/model-input-output/dynamic-shapes.rstindex a6492a4fcf0..cceeadcf34c 100644--- a/docs/articles_en/openvino-workflow/running-inference/dynamic-shapes.rst+++ b/docs/articles_en/openvino-workflow/running-inference/model-input-output/dynamic-shapes.rst@@ -190,14 +190,14 @@ For the same reason, it is not recommended to leave dimensions as undefined, witWhen specifying bounds, the lower bound is not as important as the upper one. The upper bound allows inference devices to allocate memory for intermediate tensors more precisely. It also allows using a fewer number of tuned kernels for different sizes.More precisely, benefits of specifying the lower or upper bound is device dependent.-Depending on the plugin, specifying the upper bounds can be required. For information about dynamic shapes support on different devices, refer to the :doc:`feature support table <../../documentation/compatibility-and-support/supported-devices>`.+Depending on the plugin, specifying the upper bounds can be required. For information about dynamic shapes support on different devices, refer to the :doc:`feature support table <../../../documentation/compatibility-and-support/supported-devices>`.If the lower and upper bounds for a dimension are known, it is recommended to specify them, even if a plugin can execute a model without the bounds.Preparing and Inferencing Dynamic Data++++++++++++++++++++++++++++++++++++++-After configuring a model with the ``reshape`` method, the next steps are to create tensors with the appropriate data shape and pass them to the model as an inference request. This is similar to the regular steps described in :doc:`Integrate OpenVINO™ with Your Application <integrate-openvino-with-your-application>`. However, tensors can now be passed into the model with different shapes.+After configuring a model with the ``reshape`` method, the next steps are to create tensors with the appropriate data shape and pass them to the model as an inference request. This is similar to the regular steps described in :doc:`Integrate OpenVINO™ with Your Application <../../running-inference>`. However, tensors can now be passed into the model with different shapes.The sample below shows how a model can accept different input shapes. In the first case, the model runs inference on a 1x128 input shape and returns a result. In the second case, a 1x200 input shape is used, which the model can still handle because it is dynamically shaped.@@ -225,7 +225,7 @@ The sample below shows how a model can accept different input shapes. In the fir:fragment: ov_dynamic_shapes:set_input_tensor-For more information on how to apply input data to a model and run inference, see :doc:`OpenVINO™ Inference Request <integrate-openvino-with-your-application/inference-request>`.+For more information on how to apply input data to a model and run inference, see :doc:`OpenVINO™ Inference Request <../inference-request>`.Dynamic Shapes in Outputsdiff --git a/docs/articles_en/openvino-workflow/running-inference/dynamic-shapes/openvino-without-dynamic-shapes-api.rst b/docs/articles_en/openvino-workflow/running-inference/model-input-output/dynamic-shapes/openvino-without-dynamic-shapes-api.rstsimilarity index 100%rename from docs/articles_en/openvino-workflow/running-inference/dynamic-shapes/openvino-without-dynamic-shapes-api.rstrename to docs/articles_en/openvino-workflow/running-inference/model-input-output/dynamic-shapes/openvino-without-dynamic-shapes-api.rstdiff --git a/docs/articles_en/openvino-workflow/running-inference/string-tensors.rst b/docs/articles_en/openvino-workflow/running-inference/model-input-output/string-tensors.rstsimilarity index 99%rename from docs/articles_en/openvino-workflow/running-inference/string-tensors.rstrename to docs/articles_en/openvino-workflow/running-inference/model-input-output/string-tensors.rstindex 2a155e03dcf..a765448a75f 100644--- a/docs/articles_en/openvino-workflow/running-inference/string-tensors.rst+++ b/docs/articles_en/openvino-workflow/running-inference/model-input-output/string-tensors.rst@@ -199,8 +199,6 @@ the � replacement symbol is used to signal errors in such invalid Unicode streAdditional Resources####################-* Learn about the :doc:`basic steps to integrate inference in your application <integrate-openvino-with-your-application>`.-+* Learn about the :doc:`basic steps to integrate inference in your application <../../running-inference>`.* Use `OpenVINO tokenizers <https://github.com/openvinotoolkit/openvino_contrib/tree/releases/2024/0/modules/custom_operations/user_ie_extensions/tokenizer/python>`__ to produce models that use string tensors to work with textual information as pre- and post-processing for the large language models.-* Check out `GenAI Samples <https://github.com/openvinotoolkit/openvino.genai/tree/master/samples/cpp/text_generation>`__ to see how string tensors are used in real-life applications.diff --git a/docs/articles_en/openvino-workflow/running-inference/model-representation.rst b/docs/articles_en/openvino-workflow/running-inference/model-representation.rstnew file mode 100644index 00000000000..bace34c01da--- /dev/null+++ b/docs/articles_en/openvino-workflow/running-inference/model-representation.rst@@ -0,0 +1,230 @@+Model Representation in OpenVINO™ Runtime+===============================================================================================+++.. meta::+ :description: In OpenVINO™ Runtime a model is represented by special classes to work with+ model data types and shapes.+++The model is represented by the ``ov::Model class``.+The ``ov::Model`` object stores shared pointers to the following operations:++* ``ov::op::v0::Parameter`` - inputs+* ``ov::op::v0::Result`` - outputs+* ``ov::op::Sink`` - sinks (have no consumers and are not included in the results vector)++Other operations hold each other via shared pointers, where a child operation points to its+parent via a hard link. If an operation has no consumers and is neither a ``Result`` nor a+``Sink`` operation whose shared pointer counter is zero, the operation will be removed.+Each operation in ``ov::Model`` has the ``std::shared_ptr<ov::Node>`` type.++Classes and methods use to work with models+###############################################################################################++Data types++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++The ``ov::element::Type`` is used as data type representation.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. code-block:: python++ ov_input.get_element_type()++ .. tab-item:: C+++ :sync: cpp++ .. code-block:: cpp++ ov_input->get_element_type();+++Shapes++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++The OpenVINO runtime provides two types of shape representation:++* ``ov::Shape`` (read more) - represents static (fully defined) shapes,+* ``ov::PartialShape`` (read more) - represents shapes that may be partially or fully+ dynamic (with a given or an undefined rank).++``ov::PartialShape`` can be converted to ``ov::Shape``, but only if all dimensions are static.+Do this with the ``get_shape()`` method.++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py+ :language: python+ :fragment: [ov:partial_shape]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp+ :language: cpp+ :fragment: [ov:partial_shape]+++Keep in mind that OpenVINO enables you to change the model input shape during the application+runtime. It also supports models accepting dynamic shapes. For more details, see+:doc:`Model Input/Output Handling <model-input-output>`.+++Operations and Operation Sets+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Each abstract operation in a model is represented by the ``ov::Op class``.+A collection of operations used to construct a model is represented by the ``ov::OpSet``+class. It refers to an operation set defined by an individual **opsetX** namespace,+for example **opset15**. These opsets are added with new OpenVINO releases to change the+behavior of previously used operations and help you avoid changing your application when new+operations are introduced. For more information, check the documentation on+:doc:`OpenVINO model <../../documentation/openvino-ir-format>` and+:doc:`opsets <../../documentation/openvino-ir-format/operation-sets>`, as well as+:doc:`custom operations <../../documentation/openvino-extensibility>`.+++Build a Model in OpenVINO™ Runtime+###############################################################################################++You can create a model from source by constructing it with operations from an available+**opsetX** operation set. Each operation set integrates a list of pre-compiled operations+that work for this purpose. In other words, **opsetX** defines a set of operations for+building a model. To create an ``ov::Model`` instance from ``opset15`` operations, include+the following libraries:++.. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py+ :language: cpp+ :fragment: [import]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp+ :language: cpp+ :fragment: [ov:include]+++Then, you can create a model, as shown in these two examples:++.. tab-set::++ .. tab-item:: Simple (single output)++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py+ :language: cpp+ :fragment: [ov:create_simple_model]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp+ :language: cpp+ :fragment: [ov:create_simple_model]++ .. tab-item:: More advanced (multiple outputs)++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py+ :language: cpp+ :fragment: [ov:create_advanced_model]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp+ :language: cpp+ :fragment: [ov:create_advanced_model]+++Debug a Model+###############################################################################################++Here is a list of features that can help you debug models in OpenVINO:++* ``DENABLE_OPENVINO_DEBUG=ON`` - used to rebuild the OpenVINO Runtime library, to receive+ additional messages about applied model modifications+* ``ov::pass::VisualizeTree`` - used to save ``ov::Model`` to xDot format. It can be+ parametrized via environment variables:++ * ``OV_VISUALIZE_TREE_OUTPUT_SHAPES=1`` - visualize shapes+ * ``OV_VISUALIZE_TREE_OUTPUT_TYPES=1`` - visualize types+ * ``OV_VISUALIZE_TREE_MIN_MAX_DENORMAL=1`` - pretty denormal values+ * ``OV_VISUALIZE_TREE_RUNTIME_INFO=1`` - print runtime information+ * ``OV_VISUALIZE_TREE_IO=1`` - print I/O ports+ * ``OV_VISUALIZE_TREE_MEMBERS_NAME=1`` - print member names++* ``ov::serialize`` - used to save a model to IR:++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py+ :language: python+ :fragment: [ov:serialize]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp+ :language: cpp+ :fragment: [ov:serialize]+++ .. note::++ While ``save_model`` is the preferred method for saving a model to IR, it is+ recommended to use ``serialize`` for debugging purposes. It requires less time and+ computational resources, as it does not apply weight compression.+++* **xDot format to image conversion** - used to visualize model graphs:++ .. tab-set::++ .. tab-item:: Python+ :sync: py++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.py+ :language: python+ :fragment: [ov:visualize]++ .. tab-item:: C+++ :sync: cpp++ .. doxygensnippet:: docs/articles_en/assets/snippets/ov_model_snippets.cpp+ :language: cpp+ :fragment: [ov:visualize]+++Additional Resources+########################++* :doc:`Available Operation Sets <../../../documentation/openvino-ir-format/operation-sets/available-opsets>`.+* :doc:`OpenVINO™ Runtime Extensibility Developer Guide <../../../documentation/openvino-extensibility>`.+* :doc:`Transformations Developer Guide <../../../documentation/openvino-extensibility/transformation-api>`.diff --git a/docs/articles_en/openvino-workflow/running-inference/optimize-inference.rst b/docs/articles_en/openvino-workflow/running-inference/optimize-inference.rstindex 6306834f0e9..1ce8af89506 100644--- a/docs/articles_en/openvino-workflow/running-inference/optimize-inference.rst+++ b/docs/articles_en/openvino-workflow/running-inference/optimize-inference.rst@@ -37,7 +37,7 @@ to achieve the best results for your product.* :ref:`Inputs Pre-processing with the OpenVINO <inputs_pre_processing>`* :ref:`Async API <async_api>`* :ref:`The 'get_tensor' Idiom <tensor_idiom>`- * For variably-sized inputs, consider :doc:`dynamic shapes <dynamic-shapes>`+ * For variably-sized inputs, consider :doc:`dynamic shapes <model-input-output/dynamic-shapes>`Performance-Portable Inference################################diff --git a/docs/articles_en/openvino-workflow/running-inference/optimize-inference/general-optimizations.rst b/docs/articles_en/openvino-workflow/running-inference/optimize-inference/general-optimizations.rstindex af6ea2814a0..9556557eeeb 100644--- a/docs/articles_en/openvino-workflow/running-inference/optimize-inference/general-optimizations.rst+++ b/docs/articles_en/openvino-workflow/running-inference/optimize-inference/general-optimizations.rst@@ -27,7 +27,7 @@ In many cases, a network expects a pre-processed image. It is advised not to perPrefer OpenVINO Async API#########################-The API of the inference requests offers Sync and Async execution. While the ``ov::InferRequest::infer()`` is inherently synchronous and executes immediately (effectively serializing the execution flow in the current application thread), the Async "splits" the ``infer()`` into ``ov::InferRequest::start_async()`` and ``ov::InferRequest::wait()``. For more information, see the :doc:`API examples <../integrate-openvino-with-your-application/inference-request>`.+The API of the inference requests offers Sync and Async execution. While the ``ov::InferRequest::infer()`` is inherently synchronous and executes immediately (effectively serializing the execution flow in the current application thread), the Async "splits" the ``infer()`` into ``ov::InferRequest::start_async()`` and ``ov::InferRequest::wait()``. For more information, see the :doc:`API examples <../inference-request>`.A typical use case for the ``ov::InferRequest::infer()`` is running a dedicated application thread per source of inputs (e.g. a camera), so that every step (frame capture, processing, parsing the results, and associated logic) is kept serial within the thread.In contrast, the ``ov::InferRequest::start_async()`` and ``ov::InferRequest::wait()`` allow the application to continue its activities and poll or wait for the inference completion when really needed. Therefore, one reason for using an asynchronous code is "efficiency".diff --git a/docs/articles_en/openvino-workflow/running-inference/optimize-inference/high-level-performance-hints.rst b/docs/articles_en/openvino-workflow/running-inference/optimize-inference/high-level-performance-hints.rstindex e9af8da9731..403709919a5 100644--- a/docs/articles_en/openvino-workflow/running-inference/optimize-inference/high-level-performance-hints.rst+++ b/docs/articles_en/openvino-workflow/running-inference/optimize-inference/high-level-performance-hints.rst@@ -124,7 +124,7 @@ While an application is free to create more requests if needed (for example to sPrefer Async API################-The API of the inference requests offers Sync and Async execution. The ``ov::InferRequest::infer()`` is inherently synchronous and simple to operate (as it serializes the execution flow in the current application thread). The Async "splits" the ``infer()`` into ``ov::InferRequest::start_async()`` and ``ov::InferRequest::wait()`` (or callbacks). For more information on synchronous and asynchronous modes, refer to the :doc:`OpenVINO Inference Request <../integrate-openvino-with-your-application/inference-request>`.+The API of the inference requests offers Sync and Async execution. The ``ov::InferRequest::infer()`` is inherently synchronous and simple to operate (as it serializes the execution flow in the current application thread). The Async "splits" the ``infer()`` into ``ov::InferRequest::start_async()`` and ``ov::InferRequest::wait()`` (or callbacks). For more information on synchronous and asynchronous modes, refer to the :doc:`OpenVINO Inference Request <../inference-request>`.Although the synchronous API can be easier to start with, it is recommended to use the asynchronous (callbacks-based) API in production code. It is the most general and scalable way to implement the flow control for any possible number of requests. The ``THROUGHPUT`` and ``LATENCY`` performance hints automatically configure the Asynchronous pipeline to use the optimal number of processing streams and inference requests.diff --git a/docs/articles_en/openvino-workflow/running-inference/optimize-inference/optimizing-latency/model-caching-overview.rst b/docs/articles_en/openvino-workflow/running-inference/optimize-inference/optimizing-latency/model-caching-overview.rstindex c6a4d1ada90..452a9f6f246 100644--- a/docs/articles_en/openvino-workflow/running-inference/optimize-inference/optimizing-latency/model-caching-overview.rst+++ b/docs/articles_en/openvino-workflow/running-inference/optimize-inference/optimizing-latency/model-caching-overview.rst@@ -8,7 +8,7 @@ Model Caching Overviewreduce duration of model compilation on application startup.-As described in :doc:`Integrate OpenVINO™ with Your Application <../../integrate-openvino-with-your-application>`,+As described in :doc:`Integrate OpenVINO™ with Your Application <../../../running-inference>`,a common workflow consists of the following steps:1. | **Create a Core object**:diff --git a/docs/articles_en/openvino-workflow/running-inference/optimize-inference/optimizing-throughput/advanced_throughput_options.rst b/docs/articles_en/openvino-workflow/running-inference/optimize-inference/optimizing-throughput/advanced_throughput_options.rstindex cad5633e11f..2d779e0992b 100644--- a/docs/articles_en/openvino-workflow/running-inference/optimize-inference/optimizing-throughput/advanced_throughput_options.rst+++ b/docs/articles_en/openvino-workflow/running-inference/optimize-inference/optimizing-throughput/advanced_throughput_options.rst@@ -18,7 +18,7 @@ This configurable method of this device-side parallelism is commonly referred as.. note::- Be aware that streams are **really executing the requests in parallel, but not in the lock step** (as the batching does), which makes the streams fully compatible with :doc:`dynamically-shaped inputs <../../dynamic-shapes>`, while individual requests can have different shapes.+ Be aware that streams are **really executing the requests in parallel, but not in the lock step** (as the batching does), which makes the streams fully compatible with :doc:`dynamically-shaped inputs <../../model-input-output/dynamic-shapes>`, while individual requests can have different shapes... note::@@ -74,7 +74,7 @@ One possible throughput optimization strategy is to **set an upper bound for lat.. note::- When playing with :doc:`dynamically-shaped inputs <../../dynamic-shapes>`, use only the streams (no batching), as they tolerate individual requests having different shapes.+ When playing with :doc:`dynamically-shaped inputs <../../model-input-output/dynamic-shapes>`, use only the streams (no batching), as they tolerate individual requests having different shapes... note::diff --git a/docs/dev/cmake_options_for_custom_compilation.md b/docs/dev/cmake_options_for_custom_compilation.mdindex bf4a78975a7..ff7fa69e273 100644--- a/docs/dev/cmake_options_for_custom_compilation.md+++ b/docs/dev/cmake_options_for_custom_compilation.md@@ -186,7 +186,7 @@ In this case OpenVINO CMake scripts take `TBBROOT` environment variable into acc[pugixml]:https://pugixml.org/[ONNX]:https://onnx.ai/[protobuf]:https://github.com/protocolbuffers/protobuf-[OpenVINO Runtime Introduction]:https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application.html+[OpenVINO Runtime Introduction]:https://docs.openvino.ai/2025/openvino-workflow/running-inference.html[PDPD]:https://github.com/PaddlePaddle/Paddle[TensorFlow]:https://www.tensorflow.org/[TensorFlow Lite]:https://www.tensorflow.org/litediff --git a/docs/dev/debug_capabilities.md b/docs/dev/debug_capabilities.mdindex 13c63dfb2f4..b12e8eefee2 100644--- a/docs/dev/debug_capabilities.md+++ b/docs/dev/debug_capabilities.md@@ -2,7 +2,7 @@OpenVINO components provides different debug capabilities, to get more information please read:-* [OpenVINO Model Debug Capabilities](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.html#model-debugging-capabilities)+* [OpenVINO Model Debug Capabilities](https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-representation.html#model-debugging-capabilities)* [OpenVINO Pass Manager Debug Capabilities](#todo)## See alsodiff --git a/docs/snippets/src/main.cpp b/docs/snippets/src/main.cppindex 815222a32fe..dc9ac0b8cf5 100644--- a/docs/snippets/src/main.cpp+++ b/docs/snippets/src/main.cpp@@ -42,7 +42,7 @@ ov::CompiledModel compiled_model = core.compile_model("model.tflite", "AUTO");auto create_model = []() {std::shared_ptr<ov::Model> model;// To construct a model, please follow- // https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.html+ // https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-representation.htmlreturn model;};std::shared_ptr<ov::Model> model = create_model();diff --git a/docs/snippets/src/main.py b/docs/snippets/src/main.pyindex d17f9350f99..4d0641c9d5f 100644--- a/docs/snippets/src/main.py+++ b/docs/snippets/src/main.py@@ -30,7 +30,7 @@ def create_model():# This example shows how to create ov::Function## To construct a model, please follow- # https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.html+ # https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-representation.htmldata = ov.opset8.parameter([3, 1, 2], ov.Type.f32)res = ov.opset8.result(data)return ov.Model([res], [data], "model")diff --git a/docs/sphinx_setup/index.rst b/docs/sphinx_setup/index.rstindex a667b55c099..b1f347f845e 100644--- a/docs/sphinx_setup/index.rst+++ b/docs/sphinx_setup/index.rst@@ -128,7 +128,7 @@ Where to BeginGet started in just a few lines of code.- .. button-link:: openvino-workflow/running-inference/integrate-openvino-with-your-application.html+ .. button-link:: openvino-workflow/running-inference.html:color: primary:outline:diff --git a/samples/cpp/hello_reshape_ssd/README.md b/samples/cpp/hello_reshape_ssd/README.mdindex f3c8ad75cec..bddac6d50fa 100644--- a/samples/cpp/hello_reshape_ssd/README.md+++ b/samples/cpp/hello_reshape_ssd/README.md@@ -1,6 +1,6 @@# Hello Reshape SSD C++ Sample-This sample demonstrates how to do synchronous inference of object detection models using [input reshape feature](https://docs.openvino.ai/2025/openvino-workflow/running-inference/changing-input-shape.html).+This sample demonstrates how to do synchronous inference of object detection models using [input reshape feature](https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-input-output/changing-input-shape.html).Models with only one input and output are supported.For more detailed information on how this sample works, check the dedicated [article](https://docs.openvino.ai/2025/get-started/learn-openvino/openvino-samples/hello-reshape-ssd.html)diff --git a/samples/cpp/model_creation_sample/README.md b/samples/cpp/model_creation_sample/README.mdindex e1c1cbea7c5..b2496686fe3 100644--- a/samples/cpp/model_creation_sample/README.md+++ b/samples/cpp/model_creation_sample/README.md@@ -1,6 +1,6 @@# Model Creation C++ Sample-This sample demonstrates how to execute an synchronous inference using [model](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.html) built on the fly which uses weights from LeNet classification model, which is known to work well on digit classification tasks.+This sample demonstrates how to execute an synchronous inference using [model](https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-representation.html) built on the fly which uses weights from LeNet classification model, which is known to work well on digit classification tasks.You do not need an XML file to create a model. The API of ov::Model allows creating a model on the fly from the source code.diff --git a/samples/python/hello_reshape_ssd/README.md b/samples/python/hello_reshape_ssd/README.mdindex ef3d5ec50fa..6148531312e 100644--- a/samples/python/hello_reshape_ssd/README.md+++ b/samples/python/hello_reshape_ssd/README.md@@ -1,6 +1,6 @@# Hello Reshape SSD Python Sample-This sample demonstrates how to do synchronous inference of object detection models using [Shape Inference feature](https://docs.openvino.ai/2025/openvino-workflow/running-inference/changing-input-shape.html).+This sample demonstrates how to do synchronous inference of object detection models using [Shape Inference feature](https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-input-output/changing-input-shape.html).Models with only 1 input and output are supported.diff --git a/samples/python/model_creation_sample/README.md b/samples/python/model_creation_sample/README.mdindex dbeffc20ab2..9d0ff68b5a0 100644--- a/samples/python/model_creation_sample/README.md+++ b/samples/python/model_creation_sample/README.md@@ -1,6 +1,6 @@# Model Creation Python Sample-This sample demonstrates how to run inference using a [model](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.html) built on the fly that uses weights from the LeNet classification model, which is known to work well on digit classification tasks. You do not need an XML file, the model is created from the source code on the fly.+This sample demonstrates how to run inference using a [model](https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-representation.html) built on the fly that uses weights from the LeNet classification model, which is known to work well on digit classification tasks. You do not need an XML file, the model is created from the source code on the fly.For more detailed information on how this sample works, check the dedicated [article](https://docs.openvino.ai/2025/get-started/learn-openvino/openvino-samples/model-creation.html)diff --git a/src/bindings/c/README.md b/src/bindings/c/README.mdindex ad0c1562cdb..4d6ac003acc 100644--- a/src/bindings/c/README.md+++ b/src/bindings/c/README.md@@ -32,7 +32,7 @@ OpenVINO C API has the following structure:## Tutorials-* [How to integrate OpenVINO C API with Your Application](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application.html)+* [How to integrate OpenVINO C API with Your Application](https://docs.openvino.ai/2025/openvino-workflow/running-inference.html)* [How to wrap OpenVINO objects with C](./docs/how_to_wrap_openvino_objects_with_c.md)* [How to wrap OpenVINO interfaces with C](./docs/how_to_wrap_openvino_interfaces_with_c.md)* [Samples implemented by OpenVINO C API](../../../samples/c/)@@ -46,5 +46,5 @@ See [CONTRIBUTING](../../../CONTRIBUTING.md) for details.## See also* [OpenVINO™ README](../../../README.md)- * [OpenVINO Runtime C API User Guide](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application.html)+ * [OpenVINO Runtime C API User Guide](https://docs.openvino.ai/2025/openvino-workflow/running-inference.html)diff --git a/src/bindings/python/README.md b/src/bindings/python/README.mdindex 0e920c2b809..22dfa2415a6 100644--- a/src/bindings/python/README.md+++ b/src/bindings/python/README.md@@ -42,7 +42,7 @@ If you want to contribute to OpenVINO Python API, here is the list of learning m* [OpenVINO™ README](../../../README.md)* [OpenVINO™ Core Components](../../README.md)* [OpenVINO™ Python API Reference](https://docs.openvino.ai/2025/api/ie_python_api/api.html)-* [OpenVINO™ Python API Advanced Inference](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/python-api-advanced-inference.html)-* [OpenVINO™ Python API Exclusives](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/python-api-exclusives.html)+* [OpenVINO™ Python API Advanced Inference](https://docs.openvino.ai/2025/openvino-workflow/running-inference/python-api-advanced-inference.html)+* [OpenVINO™ Python API Exclusives](https://docs.openvino.ai/2025/openvino-workflow/running-inference/python-api-exclusives.html)* [pybind11 repository](https://github.com/pybind/pybind11)* [pybind11 documentation](https://pybind11.readthedocs.io/en/stable/)diff --git a/src/bindings/python/src/openvino/preprocess/README.md b/src/bindings/python/src/openvino/preprocess/README.mdindex eba70927aa7..f993632eff4 100644--- a/src/bindings/python/src/openvino/preprocess/README.md+++ b/src/bindings/python/src/openvino/preprocess/README.md@@ -56,5 +56,5 @@ If you have any questions, feature requests or want us to review your PRs, send* [OpenVINO™ README](../../../README.md)* [OpenVINO™ Core Components](../../README.md)* [OpenVINO™ Python API Reference](https://docs.openvino.ai/2025/api/ie_python_api/api.html)-* [OpenVINO™ Python API Advanced Inference](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/python-api-advanced-inference.html)-* [OpenVINO™ Python API Exclusives](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/python-api-exclusives.html)+* [OpenVINO™ Python API Advanced Inference](https://docs.openvino.ai/2025/openvino-workflow/running-inference/python-api-advanced-inference.html)+* [OpenVINO™ Python API Exclusives](https://docs.openvino.ai/2025/openvino-workflow/running-inference/python-api-exclusives.html)diff --git a/src/core/README.md b/src/core/README.mdindex f67e8ac7ae2..3c6dbcd1bf9 100644--- a/src/core/README.md+++ b/src/core/README.md@@ -2,7 +2,7 @@OpenVINO Core is a part of OpenVINO Runtime library.The component is responsible for:- * Model representation - component provides classes for manipulation with models inside the OpenVINO Runtime. For more information please read [Model representation in OpenVINO Runtime User Guide](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.html)+ * Model representation - component provides classes for manipulation with models inside the OpenVINO Runtime. For more information please read [Model representation in OpenVINO Runtime User Guide](https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-representation.html)* Operation representation - contains all from the box supported OpenVINO operations and opsets. For more information read [Operations enabling flow guide](./docs/operation_enabling_flow.md).* Model modification - component provides base classes which allow to develop transformation passes for model modification. For more information read [Transformation enabling flow guide](#todo).diff --git a/src/core/docs/api_details.md b/src/core/docs/api_details.mdindex e3557efb3e8..f273e6d935b 100644--- a/src/core/docs/api_details.md+++ b/src/core/docs/api_details.md@@ -17,7 +17,7 @@ OpenVINO Core API contains two folders:## Main structures for model representation-* `ov::Model` is located in [openvino/core/model.hpp](../include/openvino/core/model.hpp) and provides API for model representation. For more details, read [OpenVINO Model Representation Guide](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.html).+* `ov::Model` is located in [openvino/core/model.hpp](../include/openvino/core/model.hpp) and provides API for model representation. For more details, read [OpenVINO Model Representation Guide](https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-representation.html).* `ov::Node` is a base class for all OpenVINO operations, the class is located in the [openvino/core/node.hpp](../include/openvino/core/node.hpp).* `ov::Shape` and `ov::PartialShape` classes represent shapes in OpenVINO, these classes are located in the [openvino/core/shape.hpp](../include/openvino/core/shape.hpp) and [openvino/core/partial_shape.hpp](../include/openvino/core/partial_shape.hpp) respectively. For more information, read [OpenVINO Shapes representation](./shape_propagation.md#openvino-shapes-representation).* `ov::element::Type` class represents element type for OpenVINO Tensors and Operations. The class is located in the [openvino/core/type/element_type.hpp](../include/openvino/core/type/element_type.hpp).diff --git a/src/core/docs/debug_capabilities.md b/src/core/docs/debug_capabilities.mdindex fb7914cfd4a..c2267912fcf 100644--- a/src/core/docs/debug_capabilities.md+++ b/src/core/docs/debug_capabilities.md@@ -2,7 +2,7 @@OpenVINO Core contains a set of different debug capabilities that make developer life easier by collecting information about object statuses during OpenVINO Runtime execution and reporting this information to the developer.-* OpenVINO Model debug capabilities are described in the [OpenVINO Model User Guide](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.html#model-debug-capabilities).+* OpenVINO Model debug capabilities are described in the [OpenVINO Model User Guide](https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-representation.html#model-debug-capabilities).## See also* [OpenVINO™ Core README](../README.md)diff --git a/src/frontends/paddle/README.md b/src/frontends/paddle/README.mdindex ef2eb2b68d8..2fe7be35e28 100644--- a/src/frontends/paddle/README.md+++ b/src/frontends/paddle/README.md@@ -21,7 +21,7 @@ OpenVINO Paddle Frontend has the following structure:## Debug capabilities-Developers can use OpenVINO Model debug capabilities that are described in the [OpenVINO Model User Guide](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application/model-representation.html#model-debug-capabilities).+Developers can use OpenVINO Model debug capabilities that are described in the [OpenVINO Model User Guide](https://docs.openvino.ai/2025/openvino-workflow/running-inference/model-representation.html#model-debug-capabilities).## Tutorialsdiff --git a/src/inference/docs/api_details.md b/src/inference/docs/api_details.mdindex c3ccf1874bb..2f8779cb08e 100644--- a/src/inference/docs/api_details.md+++ b/src/inference/docs/api_details.md@@ -8,7 +8,7 @@ OpenVINO Inference API contains two folders:Public OpenVINO Inference API defines global header [openvino/openvino.hpp](../include/openvino/openvino.hpp) which includes all common OpenVINO headers.All Inference components are placed inside the [openvino/runtime](../include/openvino/runtime) folder.-To learn more about the Inference API usage, read [How to integrate OpenVINO with your application](https://docs.openvino.ai/2025/openvino-workflow/running-inference/integrate-openvino-with-your-application.html).+To learn more about the Inference API usage, read [How to integrate OpenVINO with your application](https://docs.openvino.ai/2025/openvino-workflow/running-inference.html).The diagram with dependencies is presented on the [OpenVINO Architecture page](../../docs/architecture.md#openvino-inference-pipeline).## Components of OpenVINO Developer API