OpenVINO Toolkit Documentation
repository·master·Indexed 27 days ago
https://github.com/openvinotoolkit/openvinoAn open-source software toolkit for optimizing and deploying deep learning models across CPUs, GPUs, and NPUs. It supports frameworks including PyTorch, TensorFlow, and ONNX, providing tools for efficient inference from edge to cloud. The toolkit includes the OpenVINO Runtime, a C API for inference and preprocessing, the benchmark_app for performance estimation, and the physicalai package for Physical AI workflows.
What's inside OpenVINO
- OpenVINO Conditional Compilation (CC) is a feature designed to optimize OpenVINO™ binary sizes. It achieves this by excluding unnecessary code regions, specifically when using the ITT profiler, which is particularly useful when building applications with a static OpenVINO package.
Overview of OpenVINO ONNX Frontend
masterThe OpenVINO ONNX Frontend is responsible for importing ONNX models and converting them into the
ov::Modelrepresentation.Key capabilities include:
- Modifying tensor properties (e.g., data type and shapes).
- Changing model topology (e.g., cutting subgraphs, inserting additional inputs and outputs).
- Searching models using tensor and operator names.
The component is implemented in C++ and implements the common interface defined in the Frontends API.
Overview of OpenVINO™ Inference
masterOpenVINO Inference is a core component of the OpenVINO Runtime library. It manages model inference execution on various hardware devices and provides the necessary APIs for developing custom OpenVINO Plugins.Overview of OpenVINO™ Security Add-on components
masterThe OpenVINO™ Security Add-on works with the OpenVINO™ Model Server on Intel® architecture to provide secure packaging, secure model execution, and access control. It consists of three primary components running in Kernel-based Virtual Machines (KVMs):
- OpenVINO™ Security Add-on Tool (
ovsatool): Used by Model Developers or Independent Software Vendors to:- Generate access-controlled models (output file archives) from OpenVINO™ IR files.
- Manage cryptographic keys and collateral within a secure VM environment.
- Generate user-specific licenses in JSON format, allowing for policies like time limits or execution counts.
- OpenVINO™ Security Add-on License Service: Hosted by the Independent Software Vendor to validate licenses. When a user attempts to load an access-controlled model, the runtime contacts this service over the Internet to verify the license parameters.
- OpenVINO™ Security Add-on Runtime: Installed by the User in a Guest VM. It validates the user's license against the License Service during the model loading process in the OpenVINO™ Model Server. Once validated, the model is loaded and inference requests are serviced.
- OpenVINO™ Security Add-on Tool (
Overview of OpenVINO Python API
masterThe OpenVINO Python API provides bindings to both basic and advanced APIs from the OpenVINO Runtime, allowing users to integrate OpenVINO functionality directly into Python code.
Beyond simple C++ translations, the Python API includes 'pythonic' enhancements such as:
- NumPy Support: Specific extensions to handle NumPy-based data structures.
- Framework Integration: Support for inputs from external frameworks.
- Pythonic Helpers: Shortcuts and helpers designed for Pythonic workflows.
- Advanced Concepts: Support for features like shared memory to optimize performance.
Overview of OpenVINO TensorFlow Frontend
masterThe TensorFlow Frontend (TF FE) is a C++ component that reads and converts TensorFlow models into an
ov::Modelobject. This object can then be serialized into the OpenVINO Intermediate Representation (IR) format.Note: This is an internal API. Regular users should not use the frontend directly. Instead, use user-facing tools like the OVC tool (OpenVINO Model Converter), the Model Conversion API, or the OpenVINO Runtime
read_modelfunction to handle TensorFlow models.Overview of OpenVINO C API
masterThe OpenVINO C API provides a C-compatible interface for the OpenVINO Toolkit. It acts as a bridge between C applications and the core OpenVINO library (openvino). This is useful for developers needing to integrate OpenVINO into environments where a C interface is required or preferred.Overview of NNCF Optimization Methods
masterNNCF supports models in OpenVINO IR, PyTorch, and ONNX formats. The main optimization methods are:
- Weight Compression: Used for footprint reduction and inference acceleration in Large Language Models (LLMs) and Transformer-based models.
- Post-training Quantization: Applies 8-bit integer quantization. It is the easiest method as it requires no retraining, but may impact accuracy.
- Training-time Optimization: Includes advanced methods like Sparsity and Quantization-aware Training (QAT). This requires the PyTorch framework and is used if post-training quantization results in unacceptable accuracy loss.
Overview of OpenVINO™ Paddle Frontend
masterThe OpenVINO Paddle Frontend is a specialized library for the Baidu PaddlePaddle™ framework. It facilitates the transition of PaddlePaddle models into the OpenVINO ecosystem through two primary components:
- Paddle Reader: Parses PaddlePaddle protobuf models and converts them into the OpenVINO
InputModelformat. - Paddle Converter: Decodes PaddlePaddle models and operators, mapping them semantically to the OpenVINO opset.
Developers looking to extend or debug the frontend can refer to the component's internal documentation and API headers located in the
docs/andinclude/directories respectively.- Paddle Reader: Parses PaddlePaddle protobuf models and converts them into the OpenVINO
Overview of OpenVINO IR Frontend
masterThe OpenVINO IR Frontend is responsible for loading OpenVINO Intermediate Representation (IR) files (*.xml) into memory. It parses the XML files and creates anov::Modelobject used by the core OpenVINO library.Overview of OpenVINO Level Zero loader
masterThe OpenVINO Level Zero loader is a component designed to unify Level Zero loading logic across multiple OpenVINO plugins. It provides a centralized mechanism for handling Level Zero interactions, ensuring consistency in how different plugins load and manage resources via the Level Zero interface.Overview of OpenVINO PyTorch Frontend
masterThe OpenVINO PyTorch Frontend (PT FE) is a C++ component designed to read and convert PyTorch models into anov::Modelobject. Once converted to anov::Model, the model can be serialized into the OpenVINO Intermediate Representation (IR) format for deployment.