Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/openvinotoolkit/openvino
Browse files Browse the repository at this point in the history
…into at/npuw-extend-transpose-value-tensors-pass
  • Loading branch information
TolyaTalamanov committed Jan 10, 2025
2 parents 793d05d + 433256b commit 6770d18
Show file tree
Hide file tree
Showing 50 changed files with 1,448 additions and 1,694 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ jobs:
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
- name: 'Upload sphinx.log'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@v4.6.0
with:
name: sphinx_build_log_${{ env.PR_NUMBER }}.log
path: build/docs/sphinx.log

- name: 'Upload docs html'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@v4.6.0
with:
name: openvino_docs_html_${{ env.PR_NUMBER }}.zip
path: build/docs/openvino_docs_html.zip
Expand All @@ -101,7 +101,7 @@ jobs:
- name: 'Upload test results'
if: failure()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@v4.6.0
with:
name: openvino_docs_pytest
path: build/docs/_artifacts/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Learn how to run LLMs and GenAI with [Samples](https://github.com/openvinotoolki
- [OpenVINO Execution Provider for ONNX Runtime](https://onnxruntime.ai/docs/execution-providers/OpenVINO-ExecutionProvider.html) - use OpenVINO as a backend with your existing ONNX Runtime code.
- [LlamaIndex](https://docs.llamaindex.ai/en/stable/examples/llm/openvino/) - build context-augmented GenAI applications with the LlamaIndex framework and enhance runtime performance with OpenVINO.
- [LangChain](https://python.langchain.com/docs/integrations/llms/openvino/) - integrate OpenVINO with the LangChain framework to enhance runtime performance for GenAI applications.
- [Keras 3](https://github.com/keras-team/keras) - Keras 3 is a multi-backend deep learning framework. Users can switch model inference to the OpenVINO backend using the Keras API.

Check out the [Awesome OpenVINO](https://github.com/openvinotoolkit/awesome-openvino) repository to discover a collection of community-made AI projects based on OpenVINO!

Expand Down
6 changes: 5 additions & 1 deletion cmake/developer_package/compile_flags/os_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ macro(ov_check_compiler_supports_sve flags)
int main() {
svfloat64_t a;
a = svdup_n_f64(0);
(void)a; // to avoid warnings
return 0;
}")

Expand Down Expand Up @@ -259,7 +260,6 @@ endmacro()
macro(ov_arm_sve_optimization_flags flags)
# Check for compiler SVE support
ov_check_compiler_supports_sve("-march=armv8-a+sve")

if(OV_COMPILER_IS_INTEL_LLVM)
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
Expand Down Expand Up @@ -449,6 +449,10 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Build with multiple processes
ov_add_compiler_flags(/MP)

# Specifies both the source character set and the execution character set as UTF-8.
# For details, refer to link: https://learn.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-170
ov_add_compiler_flags(/utf-8)

# Workaround for an MSVC compiler issue in some versions of Visual Studio 2022.
# The issue involves a null dereference to a mutex. For details, refer to link https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710
if(MSVC AND MSVC_VERSION GREATER_EQUAL 1930)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,3 @@ topic (step 3 "Configure input and output").
| \* **Of the Linux systems, versions 22.04 and 24.04 include drivers for NPU.**
| **For Windows, CPU inference on ARM64 is not supported.**

.. note::

With the OpenVINO 2024.0 release, support for GNA has been discontinued. To keep using it
in your solutions, revert to the 2023.3 (LTS) version.

With the OpenVINO™ 2023.0 release, support has been cancelled for:

- Intel® Neural Compute Stick 2 powered by the Intel® Movidius™ Myriad™ X
- Intel® Vision Accelerator Design with Intel® Movidius™

To keep using the MYRIAD and HDDL plugins with your hardware,
revert to the OpenVINO 2022.3 (LTS) version.
1,645 changes: 13 additions & 1,632 deletions docs/articles_en/about-openvino/release-notes-openvino.rst

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/articles_en/assets/images/openvino-overview-diagram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/articles_en/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Documentation
Tool Ecosystem <documentation/openvino-ecosystem>
OpenVINO Extensibility <documentation/openvino-extensibility>
OpenVINO™ Security <documentation/openvino-security>
Legacy Features <documentation/legacy-features>


This section provides reference documents that guide you through the OpenVINO toolkit workflow, from preparing models, optimizing them, to deploying them in your own deep learning applications.
Expand Down
112 changes: 112 additions & 0 deletions docs/articles_en/documentation/legacy-features.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
Legacy Features and Components
==============================

.. meta::
:description: A list of deprecated OpenVINO™ components.

Since OpenVINO has grown very rapidly in recent years, a number of its features
and components have been replaced by other solutions. Some of them are still
supported to assure OpenVINO users are given enough time to adjust their projects,
before the features are fully discontinued.

This section will give you an overview of these major changes and tell you how
you can proceed to get the best experience and results with the current OpenVINO
offering.


Discontinued:
#############

.. dropdown:: OpenVINO Development Tools Package

| *New solution:* OpenVINO Runtime includes all supported components
| *Old solution:* `See how to install Development Tools <https://docs.openvino.ai/2024/documentation/legacy-features/install-dev-tools.html>`__
|
| OpenVINO Development Tools used to be the OpenVINO package with tools for
advanced operations on models, such as Model conversion API, Benchmark Tool,
Accuracy Checker, Annotation Converter, Post-Training Optimization Tool,
and Open Model Zoo tools. Most of these tools have been either removed,
replaced by other solutions, or moved to the OpenVINO Runtime package.
.. dropdown:: Model Optimizer / Conversion API

| *New solution:* :doc:`Direct model support and OpenVINO Converter (OVC) <../openvino-workflow/model-preparation>`
| *Old solution:* `Legacy Conversion API <https://docs.openvino.ai/2024/documentation/legacy-features/transition-legacy-conversion-api.html>`__
|
| The role of Model Optimizer and later the Conversion API was largely reduced
when all major model frameworks became supported directly. For converting model
files explicitly, it has been replaced with a more light-weight and efficient
solution, the OpenVINO Converter (launched with OpenVINO 2023.1).
.. dropdown:: Open Model ZOO

| *New solution:* users are encouraged to use public model repositories such as `Hugging Face <https://huggingface.co/OpenVINO>`__
| *Old solution:* `Open Model ZOO <https://docs.openvino.ai/2024/documentation/legacy-features/model-zoo.html>`__
|
| Open Model ZOO provided a collection of models prepared for use with OpenVINO,
and a small set of tools enabling a level of automation for the process.
Since the tools have been mostly replaced by other solutions and several
other model repositories have recently grown in size and popularity,
Open Model ZOO will no longer be maintained. You may still use its resources
until they are fully removed. `Check the OMZ GitHub project <https://github.com/openvinotoolkit/open_model_zoo>`__
.. dropdown:: Multi-Device Execution

| *New solution:* :doc:`Automatic Device Selection <../openvino-workflow/running-inference/inference-devices-and-modes/auto-device-selection>`
| *Old solution:* `Check the legacy solution <https://docs.openvino.ai/2024/documentation/legacy-features/multi-device.html>`__
|
| The behavior and results of the Multi-Device Execution mode are covered by the ``CUMULATIVE_THROUGHPUT``
option of the Automatic Device Selection. The only difference is that ``CUMULATIVE_THROUGHPUT`` uses
the devices specified by AUTO, which means that adding devices manually is not mandatory,
while with MULTI, the devices had to be specified before the inference.
.. dropdown:: Caffe, and Kaldi model formats

| *New solution:* conversion to ONNX via external tools
| *Old solution:* model support discontinued with OpenVINO 2024.0
| `The last version supporting Apache MXNet, Caffe, and Kaldi model formats <https://docs.openvino.ai/2023.3/mxnet_caffe_kaldi.html>`__
| :doc:`See the currently supported frameworks <../openvino-workflow/model-preparation>`
.. dropdown:: Post-training Optimization Tool (POT)

| *New solution:* Neural Network Compression Framework (NNCF) now offers the same functionality
| *Old solution:* POT discontinued with OpenVINO 2024.0
| :doc:`See how to use NNCF for model optimization <../openvino-workflow/model-optimization>`
| `Check the NNCF GitHub project, including documentation <https://github.com/openvinotoolkit/nncf>`__
.. dropdown:: Inference API 1.0

| *New solution:* API 2.0 launched in OpenVINO 2022.1
| *Old solution:* discontinued with OpenVINO 2024.0
| `2023.2 is the last version supporting API 1.0 <https://docs.openvino.ai/archives/index.html#:~:text=2023.2,Release%20Notes>`__
.. dropdown:: Compile tool

| *New solution:* the tool is no longer needed
| *Old solution:* discontinued with OpenVINO 2023.0
| If you need to compile a model for inference on a specific device, use the following script:
.. tab-set::

.. tab-item:: Python
:sync: py

.. doxygensnippet:: docs/articles_en/assets/snippets/export_compiled_model.py
:language: python
:fragment: [export_compiled_model]

.. tab-item:: C++
:sync: cpp

.. doxygensnippet:: docs/articles_en/assets/snippets/export_compiled_model.cpp
:language: cpp
:fragment: [export_compiled_model]

.. dropdown:: TensorFlow integration (OVTF)

| *New solution:* Direct model support and OpenVINO Converter (OVC)
| *Old solution:* discontinued in OpenVINO 2023.0
|
| OpenVINO now features a native TensorFlow support, with no need for explicit model
conversion.
5 changes: 4 additions & 1 deletion docs/articles_en/learn-openvino/llm_inference_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ options:
as well as conversion on the fly. For integration with the final product it may offer
lower performance, though.


Note that the base version of OpenVINO may also be used to run generative AI. Although it may
offer a simpler environment, with fewer dependencies, it has significant limitations and a more
demanding implementation process. For reference, see
`the article on generative AI usage of OpenVINO 2024.6 <https://docs.openvino.ai/2024/learn-openvino/llm_inference_guide/llm-inference-native-ov.html>`__.

The advantages of using OpenVINO for generative model deployment:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ Benchmark Tool
devices.


This page demonstrates how to use the Benchmark Tool to estimate deep learning inference performance on supported devices.
This page demonstrates how to use the Benchmark Tool to estimate deep learning inference
performance on supported devices. Note that the MULTI plugin mentioned here is considered
a legacy tool and currently is just a mapping of the
:doc:`AUTO plugin <../../openvino-workflow/running-inference/inference-devices-and-modes/auto-device-selection>`.

.. note::

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
Converting a Keras Model
========================


.. meta::
:description: Learn how to convert a model from the
Keras format to the OpenVINO Model.


This document explains the process of converting Keras 3 models to the OpenVINO Intermediate Representation (IR) format.
For instructions on converting Keras 2 models, refer to :doc:`TensorFlow Model Conversion <convert-model-tensorflow>`.

To convert a Keras 3 model, first export it to a lightweight TensorFlow SavedModel artifact,
and then convert it to an OpenVINO model, using the ``convert_model`` function.
Here is a code example of how to do this:

.. code-block:: py
:force:
import keras_hub
import openvino as ov
model = keras_hub.models.BertTextClassifier.from_preset(
"bert_base_en_uncased",
num_classes=4,
preprocessor=None,
)
# export to SavedModel
model.export("bert_base")
# convert to OpenVINO model
ov_model = ov.convert_model("bert_base")
.. note::

The resulting OpenVINO IR model can be saved to drive with no additional, Keras-specific steps.
Use the standard ``ov.save_model(ov_model,'model.xml')`` command.

Alternatively, a model exported to TensorFlow SavedModel format can also be converted to OpenVINO IR using the ``ovc`` tool. Here is an example:

.. code-block:: sh
:force:
ovc bert_base
Run inference in Keras 3 with the OpenVINO backend
##################################################

Starting with release 3.8, Keras provides native integration with the OpenVINO backend for accelerated inference.
This integration enables you to leverage OpenVINO performance optimizations directly within the Keras workflow, enabling faster inference on OpenVINO supported hardware.

To switch to the OpenVINO backend in Keras 3, set the ``KERAS_BACKEND`` environment variable to ``"openvino"``
or specify the backend in the local configuration file at ``~/.keras/keras.json``.
Here is an example of how to infer a model (trained with PyTorch, JAX, or TensorFlow backends) in Keras 3, using the OpenVINO backend:

.. code-block:: py
:force:
import os
os.environ["KERAS_BACKEND"] = "openvino"
import numpy as np
import keras
import keras_hub
features = {
"token_ids": np.ones(shape=(2, 12), dtype="int32"),
"segment_ids": np.array([[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0]] * 2),
"padding_mask": np.array([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]] * 2),
}
# take a model from KerasHub
bert = keras_hub.models.BertTextClassifier.from_preset(
"bert_base_en_uncased",
num_classes=4,
preprocessor=None,
)
predictions = bert.predict(features)
.. note::

The OpenVINO backend may currently lack support for some operations.
This will be addressed in upcoming Keras releases as operation coverage is being expanded.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Convert to OpenVINO IR
Convert from TensorFlow Lite <convert-model-tensorflow-lite>
Convert from PaddlePaddle <convert-model-paddle>
Convert from JAX/Flax <convert-model-jax>
Convert from Keras <convert-model-keras>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ generative models as it already includes all the core functionality.

``openvino_genai.Text2ImagePipeline`` class supports inference of
`Diffusers
models <https://github.com/openvinotoolkit/openvino.genai/blob/master/src/docs/SUPPORTED_MODELS.md#text-2-image-models>`__.
models <https://github.com/openvinotoolkit/openvino.genai/blob/master/SUPPORTED_MODELS.md#image-generation-models>`__.
For pipeline initialization, we should provide directory with converted
by Optimum Intel pipeline and specify inference device. Optionally, we
can provide configuration for LoRA Adapters using ``adapter_config``.
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/multilora-image-generation-with-output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ generative models as it already includes all the core functionality.

``openvino_genai.Text2ImagePipeline`` class supports inference of
`Diffusers
models <https://github.com/openvinotoolkit/openvino.genai/blob/master/src/docs/SUPPORTED_MODELS.md#text-2-image-models>`__.
models <https://github.com/openvinotoolkit/openvino.genai/blob/master/SUPPORTED_MODELS.md#image-generation-models>`__.
For pipeline initialization, we should provide directory with converted
by Optimum Intel pipeline and specify inference device. Optionally, we
can provide configuration for LoRA Adapters using ``adapter_config``.
Expand Down
Binary file modified docs/sphinx_setup/_static/download/GenAI_Quick_Start_Guide.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion samples/python/benchmark/bert_benchmark/bert_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import openvino as ov
import datasets
from openvino.runtime import get_version
from openvino import get_version
from transformers import AutoTokenizer
from transformers.onnx import export
from transformers.onnx.features import FeaturesManager
Expand Down
4 changes: 2 additions & 2 deletions samples/python/benchmark/sync_benchmark/sync_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import numpy as np
import openvino as ov
from openvino.runtime import get_version
from openvino.runtime.utils.types import get_dtype
from openvino import get_version
from openvino.utils.types import get_dtype


def fill_tensor_random(tensor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

import numpy as np
import openvino as ov
from openvino.runtime import get_version
from openvino.runtime.utils.types import get_dtype
from openvino import get_version
from openvino.utils.types import get_dtype


def fill_tensor_random(tensor):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import numpy as np
import openvino as ov
from openvino.runtime import op, opset1, opset8
from openvino import op, opset1, opset8

from data import digits

Expand Down
1 change: 0 additions & 1 deletion src/bindings/python/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ h5py>=3.1.0,<3.13.0
docopt~=0.6.2
paddlepaddle==2.6.2
tensorflow>=1.15.5,<2.18.0
six~=1.16.0
protobuf>=3.18.1,<6.0.0
onnx==1.17.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2018-2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

# Properties
import openvino._pyopenvino.properties.intel_npu as __intel_npu
from openvino.properties._properties import __make_properties

__make_properties(__intel_npu, __name__)
Loading

0 comments on commit 6770d18

Please sign in to comment.