Skip to content

Commit

Permalink
Updated OpenVINO build docs (#25982)
Browse files Browse the repository at this point in the history
### Details:
 - *item1*
 - *...*

### Tickets:
 - *ticket-id*
  • Loading branch information
ilya-lavrenov authored Aug 8, 2024
1 parent 358c428 commit d8cbe92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
3 changes: 3 additions & 0 deletions docs/dev/cmake_options_for_custom_compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ This document provides description and default values for CMake options that can
* `ON` is default for x86 platforms; `OFF`, otherwise.
* `ENABLE_INTEL_GPU` enables Intel GPU plugin compilation:
* `ON` is default for x86 platforms; not available, otherwise.
* `ENABLE_INTEL_NPU` enables Intel NPU plugin compilation:
* `ON` is default for Windows and Linux x86 platforms; not available, otherwise.
* `ENABLE_HETERO` enables HETERO plugin build:
* `ON` is default.
* `ENABLE_MULTI` enables MULTI plugin build:
Expand Down Expand Up @@ -191,3 +193,4 @@ In this case OpenVINO CMake scripts take `TBBROOT` environment variable into acc
[PyTorch]:https://pytorch.org/
[FlatBuffers]:https://google.github.io/flatbuffers/
[oneTBB]:https://github.com/oneapi-src/oneTBB
[JAX]:https://github.com/google/jax
14 changes: 5 additions & 9 deletions docs/dev/static_libaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ It is possible because not all interface symbols of OpenVINO Runtime libraries a
## Configure OpenVINO Runtime in the CMake stage

The default architecture of OpenVINO Runtime assumes that the following components are subject to dynamic loading during execution:
* (Device) Inference backends (CPU, GPU, MULTI, HETERO, etc.)
* (Model) Frontends (IR, ONNX, PDPD, etc.)
* Preprocessing library (to perform preprocessing, e.g. resize and color space conversions)
* (Device) Inference backends (CPU, GPU, NPU, MULTI, HETERO, etc.)
* (Model) Frontends (IR, ONNX, PDPD, TF, JAX, etc.)

With the static OpenVINO Runtime, all these modules should be linked into a final user application and **the list of modules/configuration must be known for the CMake configuration stage**. To minimize the total binary size, you can explicitly turn `OFF` unnecessary components. Use [[CMake Options for Custom Compilation|CMakeOptionsForCustomCompilation ]] as a reference for OpenVINO CMake configuration.

For example, to enable only IR v11 reading and CPU inference capabilities, use:
```sh
cmake -DENABLE_INTEL_GPU=OFF \
-DENABLE_INTEL_NPU=OFF \
-DENABLE_TEMPLATE=OFF \
-DENABLE_HETERO=OFF \
-DENABLE_MULTI=OFF \
Expand All @@ -46,6 +46,7 @@ cmake -DENABLE_INTEL_GPU=OFF \
-DENABLE_OV_PADDLE_FRONTEND=OFF \
-DENABLE_OV_TF_FRONTEND=OFF \
-DENABLE_OV_TF_LITE_FRONTEND=OFF \
-DENABLE_OV_JAX_FRONTEND=OFF \
-DENABLE_OV_PYTORCH_FRONTEND=OFF \
-DENABLE_OV_JAX_FRONTEND=OFF \
-DENABLE_INTEL_CPU=ON \
Expand Down Expand Up @@ -133,21 +134,16 @@ cmake -DCMAKE_TOOLCHAIN_FILE=<openvino source dir>/cmake/toolchains/mt.runtime.w
* The enabled and tested capabilities of OpenVINO Runtime in a static build:
* OpenVINO common runtime - work with `ov::Model`, perform model loading on particular device
* MULTI, HETERO, AUTO, and BATCH inference modes
* IR, ONNX, PDPD, and TF frontends to read `ov::Model`
* IR, ONNX, PDPD, TF and TF Lite frontends to read `ov::Model`
* Static build support for building static libraries only for OpenVINO Runtime libraries. All other third-party prebuilt dependencies remain in the same format:
* `libGNA` is a shared library.
* `TBB` is a shared library; to provide your own TBB build from [[oneTBB source code|https://github.com/oneapi-src/oneTBB]] use `export TBBROOT=<tbb_root>` before OpenVINO CMake scripts are run.

> **NOTE**: The TBB team does not recommend using oneTBB as a static library, see [[Why onetbb does not like a static library?|https://github.com/oneapi-src/oneTBB/issues/646]]
* `TBBBind_2_5` is not available on Windows x64 during a static OpenVINO build (see description for `ENABLE_TBBBIND_2_5` CMake option [[here|CMakeOptionsForCustomCompilation]] to understand what this library is responsible for). So, capabilities enabled by `TBBBind_2_5` are not available. To enable them, build [[oneTBB from source code|https://github.com/oneapi-src/oneTBB]] and provide the path to built oneTBB artifacts via `TBBROOT` environment variable before OpenVINO CMake scripts are run.

* `ov::Op::type_info` static member is deprecated and not available in static build. Don't use `type_info` during implementation of your own custom operations, use `ov::Op::get_type_info_static()` instead.

## See also

* [OpenVINO README](../../README.md)
* [OpenVINO Developer Documentation](index.md)
* [How to Build OpenVINO](build.md)


0 comments on commit d8cbe92

Please sign in to comment.