Skip to content

Commit

Permalink
Merge branch 'master' into tj/inference/coverity/issues_1
Browse files Browse the repository at this point in the history
  • Loading branch information
t-jankowski authored Jul 4, 2024
2 parents de131d5 + a30f0a5 commit 2b2e8bf
Show file tree
Hide file tree
Showing 386 changed files with 14,826 additions and 11,460 deletions.
2 changes: 1 addition & 1 deletion .github/dockerfiles/docker_tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pr-25130
pr-25303
23 changes: 23 additions & 0 deletions .github/dockerfiles/ov_build/fedora_33/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM openvinogithubactions.azurecr.io/dockerio/library/fedora:33

USER root

RUN yum update -y && yum install -y git

# Install build dependencies
ADD install_build_dependencies.sh /install_build_dependencies.sh
RUN chmod +x /install_build_dependencies.sh && \
/install_build_dependencies.sh && \
rm -rf /var/lib/apt/lists/*

# Install sscache
ARG SCCACHE_VERSION="v0.7.5"
ENV SCCACHE_HOME="/opt/sccache" \
SCCACHE_PATH="/opt/sccache/sccache"

RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
SCCACHE_ARCHIVE="sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" && \
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}

ENV PATH="$SCCACHE_HOME:$PATH"
33 changes: 33 additions & 0 deletions .github/dockerfiles/ov_build/webassembly/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM openvinogithubactions.azurecr.io/dockerio/emscripten/emsdk:3.1.61

USER root

# APT configuration
RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \
echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \
echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \
echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf

ENV DEBIAN_FRONTEND="noninteractive" \
TZ="Europe/London"

RUN apt-get update && \
apt-get install software-properties-common && \
add-apt-repository --yes --no-update ppa:git-core/ppa && \
apt-get update && \
apt-get install \
git \
ca-certificates && \
rm -rf /var/lib/apt/lists/*

# Install sscache
ARG SCCACHE_VERSION="v0.7.5"
ENV SCCACHE_HOME="/opt/sccache" \
SCCACHE_PATH="/opt/sccache/sccache"

RUN mkdir ${SCCACHE_HOME} && cd ${SCCACHE_HOME} && \
SCCACHE_ARCHIVE="sccache-${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz" && \
curl -SLO https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/${SCCACHE_ARCHIVE} && \
tar -xzf ${SCCACHE_ARCHIVE} --strip-components=1 && rm ${SCCACHE_ARCHIVE}

ENV PATH="$SCCACHE_HOME:$PATH"
49 changes: 33 additions & 16 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
changed_components: "${{ steps.smart_ci.outputs.changed_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
steps:
- name: checkout action
Expand All @@ -40,15 +41,42 @@ jobs:
skip_when_only_listed_labels_set: 'docs'
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*'

Build:
- name: Show affected components
run: |
echo "${{ toJSON(steps.smart_ci.outputs.affected_components) }}"
shell: bash

Docker:
needs: Smart_CI
runs-on: aks-linux-4-cores-16gb-docker-build
container:
image: openvinogithubactions.azurecr.io/docker_build:0.2
volumes:
- /mount:/mount
outputs:
images: "${{ steps.handle_docker.outputs.images }}"
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: ./.github/actions/handle_docker
id: handle_docker
with:
images: |
ov_build/fedora_33
registry: 'openvinogithubactions.azurecr.io'
dockerfiles_root_dir: '.github/dockerfiles'
changed_components: ${{ needs.smart_ci.outputs.changed_components }}

Build:
needs: [Docker, Smart_CI]
timeout-minutes: 150
defaults:
run:
shell: bash
runs-on: aks-linux-16-cores-32gb
container:
image: fedora:33
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.fedora_33 }}
volumes:
- /mount:/mount
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
Expand All @@ -69,9 +97,6 @@ jobs:
SCCACHE_AZURE_KEY_PREFIX: fedora33_x86_64_Release
if: "!needs.smart_ci.outputs.skip_workflow"
steps:
- name: Install git
run: yum update -y && yum install -y git

- name: Clone OpenVINO
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
Expand All @@ -89,14 +114,6 @@ jobs:
# Dependencies
#

- name: Install build dependencies
run: bash ${OPENVINO_REPO}/install_build_dependencies.sh

- name: Install sccache
uses: mozilla-actions/sccache-action@89e9040de88b577a072e3760aaf59f585da083af # v0.0.5
with:
version: "v0.7.5"

- name: Install python dependencies
run: |
python3 -m pip install -U pip
Expand Down Expand Up @@ -204,14 +221,14 @@ jobs:
if-no-files-found: 'error'

RPM_Packages:
needs: Build
needs: [Docker, Build]
timeout-minutes: 10
defaults:
run:
shell: bash
runs-on: ubuntu-20.04
runs-on: aks-linux-4-cores-16gb
container:
image: fedora:33
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.fedora_33 }}
env:
RPM_PACKAGES_DIR: /__w/openvino/packages/

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/linux_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
# SANITIZER_CMAKE_OPTION: '-DENABLE_THREAD_SANITIZER=ON'
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja Multi-Config'
CMAKE_BUILD_TYPE: 'RelWithDebInfo'
CMAKE_GENERATOR: 'Ninja'
GITHUB_WORKSPACE: '/__w/openvino/openvino'
OPENVINO_REPO: /__w/openvino/openvino/openvino
OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib
Expand Down Expand Up @@ -159,9 +159,9 @@ jobs:
- name: Cmake install - OpenVINO
run: |
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_TEST_DIR} -DCOMPONENT=tests -P ${BUILD_DIR}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCOMPONENT=python_wheels -P ${BUILD_DIR}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake --config ${{ env.CMAKE_BUILD_TYPE }}
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_TEST_DIR} -DCOMPONENT=tests -P ${BUILD_DIR}/cmake_install.cmake --config ${{ env.CMAKE_BUILD_TYPE }}
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCOMPONENT=python_wheels -P ${BUILD_DIR}/cmake_install.cmake --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Remove unused files to free space
run: rm -rf ${BUILD_DIR}/*
Expand Down
40 changes: 30 additions & 10 deletions .github/workflows/webassembly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
changed_components: "${{ steps.smart_ci.outputs.changed_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
steps:
- name: checkout action
Expand All @@ -40,14 +41,41 @@ jobs:
skip_when_only_listed_labels_set: 'docs'
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*'

Build:
- name: Show affected components
run: |
echo "${{ toJSON(steps.smart_ci.outputs.affected_components) }}"
shell: bash

Docker:
needs: Smart_CI
runs-on: aks-linux-4-cores-16gb-docker-build
container:
image: openvinogithubactions.azurecr.io/docker_build:0.2
volumes:
- /mount:/mount
outputs:
images: "${{ steps.handle_docker.outputs.images }}"
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: ./.github/actions/handle_docker
id: handle_docker
with:
images: |
ov_build/webassembly
registry: 'openvinogithubactions.azurecr.io'
dockerfiles_root_dir: '.github/dockerfiles'
changed_components: ${{ needs.smart_ci.outputs.changed_components }}

Build:
needs: [Docker, Smart_CI]
defaults:
run:
shell: bash
runs-on: aks-linux-16-cores-32gb
container:
image: emscripten/emsdk
image: ${{ fromJSON(needs.docker.outputs.images).ov_build.webassembly }}
volumes:
- /mount:/mount
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
Expand All @@ -62,20 +90,12 @@ jobs:
SCCACHE_AZURE_KEY_PREFIX: webassembly_Release
if: "!needs.smart_ci.outputs.skip_workflow"
steps:
- name: Install git
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates

- name: Clone OpenVINO
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: 'openvino'
submodules: 'true'

- name: Install sccache
uses: mozilla-actions/sccache-action@89e9040de88b577a072e3760aaf59f585da083af # v0.0.5
with:
version: "v0.7.5"

- name: emcmake cmake - configure
run: |
emcmake cmake \
Expand Down
34 changes: 0 additions & 34 deletions docs/articles_en/about-openvino/additional-resources.rst

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@ Compiled Model
:description: Use the ov::CompiledModel class as the base class for a compiled
model and to create an arbitrary number of ov::InferRequest objects.

ov::CompiledModel class functionality:
``ov::CompiledModel`` class functionality:

* Compile an ov::Model instance to a backend specific graph representation
* Create an arbitrary number of ov::InferRequest objects
* Hold some common resources shared between different instances of ov::InferRequest. For example:
* Compile an ``ov::Model`` instance to a backend specific graph representation
* Create an arbitrary number of ``ov::InferRequest`` objects
* Hold some common resources shared between different instances of ``ov::InferRequest``. For example:

* ov::ICompiledModel::m_task_executor task executor to implement asynchronous execution
* ov::ICompiledModel::m_callback_executor task executor to run an asynchronous inference request callback in a separate thread
* ``ov::ICompiledModel::m_task_executor`` task executor to implement asynchronous execution
* ``ov::ICompiledModel::m_callback_executor`` task executor to run an asynchronous inference request callback in a separate thread

CompiledModel Class
###################

OpenVINO Plugin API provides the interface ov::ICompiledModel which should be used as a base class for a compiled model. Based on that, a declaration of an compiled model class can look as follows:
OpenVINO Plugin API provides the interface ``ov::ICompiledModel`` which should be used as a base class
for a compiled model. Based on that, a declaration of an compiled model class can look as follows:

.. doxygensnippet:: src/plugins/template/src/compiled_model.hpp
:language: cpp
Expand All @@ -32,9 +33,12 @@ Class Fields

The example class has several fields:

* ``m_request_id`` - Tracks a number of created inference requests, which is used to distinguish different inference requests during profiling via the Intel® Instrumentation and Tracing Technology (ITT) library.
* ``m_request_id`` - Tracks a number of created inference requests, which is used to distinguish
different inference requests during profiling via the Intel® Instrumentation and Tracing Technology (ITT) library.
* ``m_cfg`` - Defines a configuration a compiled model was compiled with.
* ``m_model`` - Keeps a reference to transformed ``ov::Model`` which is used in OpenVINO reference backend computations. Note, in case of other backends with backend specific graph representation ``m_model`` has different type and represents backend specific graph or just a set of computational kernels to perform an inference.
* ``m_model`` - Keeps a reference to transformed ``ov::Model`` which is used in OpenVINO reference
backend computations. Note, in case of other backends with backend specific graph representation
``m_model`` has different type and represents backend specific graph or just a set of computational kernels to perform an inference.
* ``m_loaded_from_cache`` - Allows to understand that model was loaded from cache.

CompiledModel Constructor
Expand All @@ -51,7 +55,11 @@ The implementation ``compile_model()`` is fully device-specific.
compile_model()
+++++++++++++++

The function accepts a const shared pointer to ``ov::Model`` object and applies OpenVINO passes using ``transform_model()`` function, which defines plugin-specific conversion pipeline. To support low precision inference, the pipeline can include Low Precision Transformations. These transformations are usually hardware specific. You can find how to use and configure Low Precisions Transformations in :doc:`Low Precision Transformations <advanced-guides/low-precision-transformations>` guide.
The function accepts a const shared pointer to ``ov::Model`` object and applies OpenVINO passes
using ``transform_model()`` function, which defines plugin-specific conversion pipeline. To support
low precision inference, the pipeline can include Low Precision Transformations. These
transformations are usually hardware specific. You can find how to use and configure Low Precisions
Transformations in :doc:`Low Precision Transformations <advanced-guides/low-precision-transformations>` guide.

.. doxygensnippet:: src/plugins/template/src/compiled_model.cpp
:language: cpp
Expand All @@ -65,7 +73,8 @@ The function accepts a const shared pointer to ``ov::Model`` object and applies
export_model()
++++++++++++++

The implementation of the method should write all data to the ``model_stream``, which is required to import a backend specific graph later in the ``Plugin::import_model`` method:
The implementation of the method should write all data to the ``model_stream``, which is required
to import a backend specific graph later in the ``Plugin::import_model`` method:

.. doxygensnippet:: src/plugins/template/src/compiled_model.cpp
:language: cpp
Expand All @@ -80,14 +89,25 @@ The method creates an synchronous inference request and returns it.
:language: cpp
:fragment: [compiled_model:create_sync_infer_request]

While the public OpenVINO API has a single interface for inference request, which can be executed in synchronous and asynchronous modes, a plugin library implementation has two separate classes:
While the public OpenVINO API has a single interface for inference request, which can be executed
in synchronous and asynchronous modes, a plugin library implementation has two separate classes:

* :doc:`Synchronous inference request <synch-inference-request>`, which defines pipeline stages and runs them synchronously in the ``infer`` method.

* :doc:`Asynchronous inference request <asynch-inference-request>`, which is a wrapper for a synchronous inference request and can run a pipeline asynchronously. Depending on a device pipeline structure, it can have one or several stages:

* For single-stage pipelines, there is no need to define this method and create a class derived from ov::IAsyncInferRequest. For single stage pipelines, a default implementation of this method creates ov::IAsyncInferRequest wrapping a synchronous inference request and runs it asynchronously in the ``m_request_executor`` executor.
* For pipelines with multiple stages, such as performing some preprocessing on host, uploading input data to a device, running inference on a device, or downloading and postprocessing output data, schedule stages on several task executors to achieve better device use and performance. You can do it by creating a sufficient number of inference requests running in parallel. In this case, device stages of different inference requests are overlapped with preprocessing and postprocessing stage giving better performance.
* :doc:`Asynchronous inference request <asynch-inference-request>`, which is a wrapper for a synchronous
inference request and can run a pipeline asynchronously. Depending on a device pipeline structure,
it can have one or several stages:

* For single-stage pipelines, there is no need to define this method and create a class derived
from ``ov::IAsyncInferRequest``. For single stage pipelines, a default implementation of this
method creates ``ov::IAsyncInferRequest`` wrapping a synchronous inference request and runs
it asynchronously in the ``m_request_executor`` executor.
* For pipelines with multiple stages, such as performing some preprocessing on host, uploading
input data to a device, running inference on a device, or downloading and postprocessing output
data, schedule stages on several task executors to achieve better device use and performance.
You can do it by creating a sufficient number of inference requests running in parallel.
In this case, device stages of different inference requests are overlapped with preprocessing
and postprocessing stage giving better performance.

.. important::

Expand Down
Loading

0 comments on commit 2b2e8bf

Please sign in to comment.