[DOCS] Moving How to build documentation from wiki to md docs - master (#16063)
* conditional_compilation * how-to-build-2 * Update local-distribution.md * Update build.md * Update build.md * Update docs/dev/build.md Co-authored-by: Ilya Churaev <ilyachur@gmail.com> * Update docs/dev/build.md Co-authored-by: Ilya Churaev <ilyachur@gmail.com> * Update docs/dev/static_libaries.md Co-authored-by: Ilya Churaev <ilyachur@gmail.com> * Update docs/dev/building_documentation.md Co-authored-by: Ilya Churaev <ilyachur@gmail.com> * Changes after review * Update docs/dev/building_documentation.md * Update docs/dev/static_libaries.md * building articles update --------- Co-authored-by: Ilya Churaev <ilyachur@gmail.com>
This commit is contained in:
1 parent
6586742204
commit
da9b014c83
15 files changed
+1273
-390
No files matched your search
@@ -163,7 +163,7 @@ The system requirements vary depending on platform and are available on dedicate
|
||||
|
||||
## How to build
|
||||
|
||||
See the [OpenVINO Wiki](https://github.com/openvinotoolkit/openvino/wiki#how-to-build) to get more information about the OpenVINO build process.
|
||||
See [How to build OpenVINO](./docs/dev/build.md) to get more information about the OpenVINO build process.
|
||||
|
||||
## How to contribute
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Build OpenVINO™ Runtime for Android systems
|
||||
|
||||
This article describes how to build Inference Engine for Android operating systems.
|
||||
|
||||
## Software requirements
|
||||
|
||||
- [CMake](https://cmake.org/download/) 3.13 or higher
|
||||
- Android NDK (this guide has been validated with r20 release)
|
||||
|
||||
## How to build
|
||||
|
||||
1. Download and unpack [Android NDK](https://developer.android.com/ndk/downloads). Let's assume that `~/Downloads` is used as a working folder.
|
||||
```sh
|
||||
cd ~/Downloads
|
||||
wget https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip
|
||||
|
||||
unzip android-ndk-r20-linux-x86_64.zip
|
||||
mv android-ndk-r20 android-ndk
|
||||
```
|
||||
|
||||
2. Create a build folder:
|
||||
```sh
|
||||
mkdir build
|
||||
```
|
||||
|
||||
3. Change working directory to `build` and run `cmake` to create makefiles. Then run `make`.
|
||||
```sh
|
||||
cd build
|
||||
|
||||
cmake .. \
|
||||
-DCMAKE_TOOLCHAIN_FILE=~/Downloads/android-ndk/build/cmake/android.toolchain.cmake \
|
||||
-DANDROID_ABI=x86_64 \
|
||||
-DANDROID_PLATFORM=21 \
|
||||
-DANDROID_STL=c++_shared \
|
||||
-DENABLE_OPENCV=OFF
|
||||
|
||||
make --jobs=$(nproc --all)
|
||||
```
|
||||
|
||||
* `ANDROID_ABI` specifies target architecture:
|
||||
* `x86_64` for x64 build
|
||||
* `armeabi-v7a with NEON` for ARM with NEON support
|
||||
* `arm64-v8a` for ARM 64 bits
|
||||
* `ANDROID_PLATFORM` - Android API version
|
||||
* `ANDROID_STL` specifies that shared C++ runtime is used. Copy `~/Downloads/android-ndk/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so` from Android NDK along with built binaries
|
||||
|
||||
4. To reduce the binaries size, use `strip` tool from NDK:
|
||||
|
||||
```bash
|
||||
~/Downloads/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/bin/strip openvino/bin/intel64/Release/lib/*.so
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [OpenVINO Get Started](./get_started.md)
|
||||
* [How to build OpenVINO](build.md)
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
# Build OpenVINO™ Runtime for Linux systems
|
||||
|
||||
The software was validated on:
|
||||
- Ubuntu 18.04 (64-bit) with default GCC 7.5.0
|
||||
- Ubuntu 20.04 (64-bit) with default GCC 9.3.0
|
||||
- Red Hat Enterprise Linux 8.2 (64-bit) with default GCC 8.5.0
|
||||
|
||||
> **NOTE**: To build on CentOS 7 (64-bit), refer to [Building OpenVINO on CentOS 7 Guide](https://github.com/openvinotoolkit/openvino/wiki/Building-OpenVINO-on-CentOS-7-Guide)
|
||||
|
||||
## Software requirements
|
||||
|
||||
- [CMake](https://cmake.org/download/) 3.13 or higher
|
||||
- GCC 7.5 or higher to build OpenVINO Runtime
|
||||
- Python 3.7 or higher for OpenVINO Runtime Python API
|
||||
- (Optional) [Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.41.14441](https://github.com/intel/compute-runtime/releases/tag/19.41.14441) to enable inference on Intel integrated GPUs.
|
||||
|
||||
## How to build
|
||||
|
||||
1. Clone OpenVINO repository and init submodules:
|
||||
```sh
|
||||
git clone https://github.com/openvinotoolkit/openvino.git
|
||||
cd openvino
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
(Optional) For users in China, clone submodules via gitee mirrors
|
||||
```sh
|
||||
chmod +x scripts/submodule_update_with_gitee.sh
|
||||
./scripts/submodule_update_with_gitee.sh
|
||||
```
|
||||
|
||||
2. Install build dependencies using the `install_build_dependencies.sh` script in the
|
||||
project root folder.
|
||||
```sh
|
||||
chmod +x install_build_dependencies.sh
|
||||
```
|
||||
```sh
|
||||
sudo ./install_build_dependencies.sh
|
||||
```
|
||||
> **NOTE**: By default, the build enables the OpenVINO Runtime GPU plugin to infer models on your Intel® Processor Graphics. This requires you to [Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.41.14441](https://github.com/intel/compute-runtime/releases/tag/19.41.14441) before running the build. If you don't want to use the GPU plugin, use the `-DENABLE_INTEL_GPU=OFF` CMake build option and skip the installation of the Intel® Graphics Compute Runtime for OpenCL™ Driver.
|
||||
|
||||
3. Create a build folder:
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
```
|
||||
4. OpenVINO Runtime uses a CMake-based build system. In the created `build` directory, run `cmake` to fetch project dependencies and create Unix makefiles, then run `make` to build the project:
|
||||
```sh
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make --jobs=$(nproc --all)
|
||||
```
|
||||
The process may take some time to finish.
|
||||
|
||||
### Additional Build Options
|
||||
|
||||
You can use the following additional build options:
|
||||
|
||||
- For IA32 operation systems, use [ia32.linux.toolchain.cmake](https://github.com/openvinotoolkit/openvino/blob/master/cmake/toolchains/ia32.linux.toolchain.cmake) CMake toolchain file:
|
||||
|
||||
```sh
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=<openvino_repo>/cmake/toolchains/ia32.linux.toolchain.cmake ..
|
||||
```
|
||||
|
||||
- To build the OpenVINO Runtime Python API:
|
||||
1. Install all additional packages (e.g., cython and opencv) listed in the `/src/bindings/python/src/compatibility/openvino/requirements-dev.txt` file:
|
||||
```sh
|
||||
pip install -r requirements-dev.txt
|
||||
```
|
||||
2. Enable the `-DENABLE_PYTHON=ON` option in the CMake step above (Step 4). To specify an exact Python version, use the following options:
|
||||
```
|
||||
-DPYTHON_EXECUTABLE=`which python3.7` \
|
||||
-DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so \
|
||||
-DPYTHON_INCLUDE_DIR=/usr/include/python3.7
|
||||
```
|
||||
3. To build a wheel package (.whl), enable the `-DENABLE_WHEEL=ON` option in the CMake step above (Step 4):
|
||||
4. After the build process finishes, export the newly built Python libraries to the user environment variables:
|
||||
```
|
||||
export PYTHONPATH=PYTHONPATH:<openvino_repo>/bin/intel64/Release/python_api/python3.7
|
||||
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:<openvino_repo>/bin/intel64/Release
|
||||
```
|
||||
or install the wheel with pip:
|
||||
```
|
||||
pip install <openvino_repo>/build/wheel/openvino-2022.2.0-000-cp37-cp37-manylinux_2_35_x86_64.whl
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [OpenVINO Get Started](./get_started.md)
|
||||
* [How to build OpenVINO](build.md)
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
# Build OpenVINO™ Runtime for macOS systems (Apple Silicon)
|
||||
|
||||
This guide shows how to build OpenVINO Runtime for later inference on Apple Silicon & Intel MYRIAD devices on OSX.
|
||||
|
||||
There are two options how to use OpenVINO on Apple Silicon:
|
||||
- (Native) Compile OpenVINO for arm64 architecture with extra module [OpenVINO ARM plugin](https://github.com/openvinotoolkit/openvino_contrib/tree/master/modules/arm_plugin) location in [OpenVINO Contrib](https://github.com/openvinotoolkit/openvino_contrib). Note, build steps will cover this as a default scenario.
|
||||
- (Rosetta) Compile Intel CPU plugin `x86_64` architecture and run under [Rosetta](https://support.apple.com/en-us/HT211861).
|
||||
|
||||
The software was validated on:
|
||||
- macOS 11.x, 12.x, arm64
|
||||
|
||||
## Software requirements
|
||||
|
||||
- [brew](https://brew.sh) package manager to install additional dependencies. Use [install brew](https://brew.sh) guide to achieve this.
|
||||
|
||||
- Installation step for python and python libraries varies depending on the host architecture:
|
||||
- **arm64** Python 3.7 or higher for the OpenVINO Runtime Python API, Development tools (Model Optimizer, POT and others):
|
||||
```sh
|
||||
% # let's have a look what python versions are available in brew
|
||||
% brew search python
|
||||
% # select preferred version of python based on available ones, e.g. 3.11
|
||||
% brew install python@3.11
|
||||
```
|
||||
- **x86_64** Select universal2 installer from [Python releases] download page and install `python-3.X.Y-macos11.pkg` image. This allows to have universal python libraries, build x86_64 OpenVINO Python API and Development tools.
|
||||
|
||||
- [CMake](https://cmake.org/download/) 3.13 or higher:
|
||||
```sh
|
||||
% brew install cmake
|
||||
```
|
||||
- Clang compiler, git and other command line tools from Xcode 10.1 or higher:
|
||||
```sh
|
||||
% xcode-select --install
|
||||
% brew install git-lfs
|
||||
```
|
||||
- (arm64 only) `scons` to build ARM compute library:
|
||||
```sh
|
||||
% python3 -m pip install scons
|
||||
```
|
||||
- (arm64 only) TBB library for threading:
|
||||
```sh
|
||||
% brew install tbb
|
||||
```
|
||||
- Additional `pip` dependencies to build OpenVINO Runtime Python API, Development tools (Model Optimizer, POT and others):
|
||||
```sh
|
||||
% # update pip and setuptools to newer versions
|
||||
% python3 -m pip install -U pip setuptools
|
||||
% python3 -m pip install cython
|
||||
```
|
||||
Additional install requirements (after OpenVINO repo clone) in order to build OpenVINO Python API and Development tools as wheel packages:
|
||||
```sh
|
||||
% python3 -m pip install -r <openvino source tree>/src/bindings/python/wheel/requirements-dev.txt
|
||||
```
|
||||
|
||||
## How to build
|
||||
|
||||
1. (Get sources) Clone submodules:
|
||||
```sh
|
||||
git clone https://github.com/openvinotoolkit/openvino.git
|
||||
git clone https://github.com/openvinotoolkit/openvino_contrib.git
|
||||
cd openvino_contrib
|
||||
git submodule update --init
|
||||
cd ../openvino
|
||||
git submodule update --init
|
||||
```
|
||||
2. Create a build folder:
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
```
|
||||
3. (CMake configure) OpenVINO project uses a CMake-based build system. In the created `build` directory, run `cmake` to fetch project dependencies and create build rules:
|
||||
```sh
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENVINO_EXTRA_MODULES=../openvino_contrib/modules/arm_plugin ..
|
||||
```
|
||||
> **NOTE**: By default OpenVINO CMake scripts try to introspect the system and enable all possible functionality based on that. You can look at the CMake output and see warnings, which show that some functionality is turned off and the corresponding reason, guiding what to do to install additionally to enable unavailable functionality. Additionally, you can change CMake options to enable / disable some functionality, add / remove compilation flags, provide custom version of dependencies like TBB, PugiXML, OpenCV, Protobuf. For more information, see [CMake Options for Custom Compilation](./cmake_options_for_custom_comiplation.md).
|
||||
4. (CMake build) Build OpenVINO project:
|
||||
```sh
|
||||
cmake --build . --config Release --parallel $(sysctl -n hw.ncpu)
|
||||
```
|
||||
All built binaries are located in `<openvino_source_dir>/bin/<arm64 | intel64>/Release/` and wheel packages are located in `<openvino_build_dir>/wheels`.
|
||||
|
||||
5. (Optional install) Once you have built OpenVINO, you can install artifacts to a preferred location:
|
||||
```sh
|
||||
cmake -DCMAKE_INSTALL_PREFIX=<installation location> -P cmake_install.cmake
|
||||
```
|
||||
|
||||
### Building x86_64 binaries
|
||||
|
||||
Since OSX version 11.x and Xcode version 12.2, the Apple development tools allow to compile arm64 code on x86 hosts and vice-versa. Based on this, OpenVINO can be compiled as x86_64 binary, then run on Apple Silicon hosts using [Rosetta](https://support.apple.com/en-us/HT211861). To do this, you must first install Rosetta:
|
||||
|
||||
```sh
|
||||
softwareupdate --install-rosetta
|
||||
```
|
||||
|
||||
Then try to compile OpenVINO using the steps above, but adding `-DCMAKE_OSX_ARCHITECTURES=x86_64` on cmake configure stage. But, **don't enable any system library usage explicitly** via CMake options, because they have `arm64` architecture, e.g.:
|
||||
```sh
|
||||
file /opt/homebrew/Cellar/tbb/2021.5.0_2/lib/libtbb.12.5.dylib
|
||||
/opt/homebrew/Cellar/tbb/2021.5.0_2/lib/libtbb.12.5.dylib: Mach-O 64-bit dynamically linked shared library arm64
|
||||
```
|
||||
|
||||
The same goes for other external dependencies like `libusb`. If you want to enable extra functionality like enable MYRIAD plugin build, you need to provide either x86_64 or universal2 `libusb` library. All other steps are the same as for usual compilation: build, install.
|
||||
|
||||
> **NOTE**: When building with `universal2` python libraries, wheel package is created with the `openvino-2022.3.0-000-cp39-cp39-macosx_12_0_universal2.whl` name and have a proper `universal2` tags, so they can *potentially* be used on both Apple Silicon and Intel CPU.
|
||||
|
||||
## See also
|
||||
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [OpenVINO Get Started](./get_started.md)
|
||||
* [How to build OpenVINO](build.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
# Build OpenVINO™ Runtime for macOS systems (Intel CPU)
|
||||
|
||||
This guide shows how to build OpenVINO Runtime for later inference on Intel CPU on macOS with Intel CPU underneath. This can be done using two ways:
|
||||
- Compile on Intel CPU host using native compilation. Note, that [Build steps](#build-steps) show this scenario.
|
||||
- Cross-compile on OSX Apple Silicon.
|
||||
|
||||
The software was validated on:
|
||||
- macOS 10.x, 11.x, 12.x x86 64-bit
|
||||
- macOS 11.x, 12.x, arm64 (cross-compilation)
|
||||
|
||||
## Software Requirements
|
||||
|
||||
- [brew](https://brew.sh) package manager to install additional dependencies. Use [install brew](https://brew.sh) guide to achieve this.
|
||||
- [CMake](https://cmake.org/download/) 3.13 or higher
|
||||
```sh
|
||||
% brew install cmake
|
||||
```
|
||||
- Clang compiler, git and other command line tools from Xcode 10.1 or higher:
|
||||
```sh
|
||||
% xcode-select --install
|
||||
% brew install git-lfs
|
||||
```
|
||||
- Installation step for python and python libraries varies depending on the host architecture:
|
||||
- **x86_64** Python 3.7 or higher for the OpenVINO Runtime Python API, Development tools (Model Optimizer, POT and others):
|
||||
```sh
|
||||
% # let's have a look what python versions are available in brew
|
||||
% brew search python
|
||||
% # select preferred version of python based on available ones, e.g. 3.11
|
||||
% brew install python@3.11
|
||||
```
|
||||
- **arm64** Select universal2 installer from [Python releases](https://www.python.org/downloads/macos/) download page and install `python-3.X.Y-macos11.pkg` image. This allows to have universal python libraries, build x86_64 OpenVINO Python API and Development tools.
|
||||
|
||||
- Additional `pip` dependencies to build OpenVINO Runtime Python API, Development tools (Model Optimizer, POT and others):
|
||||
```sh
|
||||
% # update pip and setuptools to newer versions
|
||||
% python3 -m pip install -U pip setuptools
|
||||
% python3 -m pip install cython
|
||||
```
|
||||
Additional install requirements (after OpenVINO repo clone) in order to build OpenVINO Python API and Development tools as wheel packages:
|
||||
```sh
|
||||
% python3 -m pip install -r <openvino source tree>/src/bindings/python/wheel/requirements-dev.txt
|
||||
```
|
||||
- (Optional; native compilation only) Latest version of TBB library. By default, OpenVINO downloads prebuilt version of TBB 2020.4 library, if you want to use latest (add `-DENABLE_SYSTEM_TBB=ON` additionally to cmake configuration step):
|
||||
```sh
|
||||
% brew install tbb
|
||||
```
|
||||
|
||||
## How to build
|
||||
|
||||
1. Create a build folder:
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
```
|
||||
2. (CMake configure) OpenVINO project uses a CMake-based build system. In the created `build` directory, run `cmake` to fetch project dependencies and create build rules:
|
||||
```sh
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
> **NOTE**: By default OpenVINO CMake scripts try to introspect the system and enable all possible functionality based on that. You can look at the CMake output and see warnings, which show that some functionality is turned off and the corresponding reason, guiding what to do to install additionally to enable unavailable functionality. Additionally, you can change CMake options to enable / disable some functionality, add / remove compilation flags, provide custom version of dependencies like TBB, PugiXML, OpenCV, Protobuf. For more information, see [CMake Options for Custom Compilation](./cmake_options_for_custom_comiplation.md).
|
||||
3. (CMake build) Build OpenVINO project:
|
||||
```sh
|
||||
cmake --build . --config Release --parallel $(sysctl -n hw.ncpu)
|
||||
```
|
||||
All built binaries are located in `<openvino_source_dir>/bin/intel64/Release/` and wheel packages are located in `<openvino_build_dir>/wheels`.
|
||||
|
||||
4. (Optional install) Once you have built OpenVINO, you can install artifacts to a preferred location:
|
||||
```sh
|
||||
cmake -DCMAKE_INSTALL_PREFIX=<installation location> -P cmake_install.cmake
|
||||
```
|
||||
|
||||
### Cross-compilation
|
||||
|
||||
Since OSX version 11.x and Xcode version 12.2, the Apple development tools allows to compile arm64 code on x86 hosts and vice-versa. Based on this, OpenVINO can be compiled even on Apple Silicon machines, then such artifacts can be run on both Intel CPU hosts and Apple Silicon hosts (using [Rosetta](https://support.apple.com/en-us/HT211861)). To do this, add `-DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_INTEL_MYRIAD=OFF` in the cmake configuration step when compiling OpenVINO following the steps above. **Don't enable any system library usage explicitly** via CMake options, because they have `arm64` architecture, e.g.:
|
||||
```sh
|
||||
file /opt/homebrew/Cellar/tbb/2021.5.0_2/lib/libtbb.12.5.dylib
|
||||
/opt/homebrew/Cellar/tbb/2021.5.0_2/lib/libtbb.12.5.dylib: Mach-O 64-bit dynamically linked shared library arm64
|
||||
```
|
||||
|
||||
If you will see the errors like the one below:
|
||||
```sh
|
||||
ld: warning: ignoring file /opt/homebrew/lib/libopencv_imgproc.4.6.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
|
||||
Undefined symbols for architecture x86_64:
|
||||
"cv::Mat::Mat(cv::Size_<int>, int, void*, unsigned long)", referenced from:
|
||||
_image_resize in opencv_c_wrapper.cpp.o
|
||||
_image_save in opencv_c_wrapper.cpp.o
|
||||
....
|
||||
ld: symbol(s) not found for architecture x86_64
|
||||
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
||||
```
|
||||
Disable its usage in cmake or completely remove such library from the system (e.g. `brew uninstall opencv`), because it's pure arm64 and cannot be used to compile x86_64 binaries.
|
||||
|
||||
> **NOTE**: By using such way, the OpenVINO Intel CPU plugin can be cross-compiled, because MYRIAD plugin cannot be linked against `arm64` version of `libusb`
|
||||
|
||||
Or you have to explicitly find / compile x86_64 (or even `universal2`) dependencies by yourself and pass it to OpenVINO cmake scripts. E.g. compile oneTBB using additional option `-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"`, install and then set `export TBBROOT=<universal oneTBB install root>` which will be used by OpenVINO.
|
||||
|
||||
## See also
|
||||
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [OpenVINO Get Started](./get_started.md)
|
||||
* [How to build OpenVINO](build.md)
|
||||
@@ -0,0 +1,68 @@
|
||||
# Build OpenVINO™ Runtime for Raspbian Stretch OS
|
||||
|
||||
> **NOTE**: [ARM CPU plugin](https://github.com/openvinotoolkit/openvino_contrib/tree/master/modules/arm_plugin) are supported. The detailed instruction how to build ARM plugin is available in [OpenVINO contrib wiki](https://github.com/openvinotoolkit/openvino_contrib/wiki/How-to-build-ARM-CPU-plugin).
|
||||
|
||||
## Hardware Requirements
|
||||
* Raspberry Pi 2 or 3 with Raspbian Stretch OS (32 or 64-bit).
|
||||
|
||||
> **NOTE**: Despite the Raspberry Pi CPU is ARMv8, 32-bit OS detects ARMv7 CPU instruction set. The default `gcc` compiler applies ARMv6 architecture flag for compatibility with lower versions of boards. For more information, run the `gcc -Q --help=target` command and refer to the description of the `-march=` option.
|
||||
|
||||
You can compile the OpenVINO Runtime for Raspberry Pi in one of the two ways:
|
||||
* [Native Compilation](#native-compilation), which is the simplest way, but time-consuming
|
||||
* [Cross Compilation Using Docker](#cross-compilation-using-docker), which is the recommended way
|
||||
|
||||
## Native Compilation
|
||||
Native compilation of the OpenVINO Runtime is the most straightforward solution. However, it might take at least one hour to complete on Raspberry Pi 3.
|
||||
|
||||
1. Install dependencies:
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y git cmake scons build-essential
|
||||
```
|
||||
2. Clone the repositories:
|
||||
```
|
||||
git clone --recurse-submodules --single-branch --branch=master https://github.com/openvinotoolkit/openvino.git
|
||||
git clone --recurse-submodules --single-branch --branch=master https://github.com/openvinotoolkit/openvino_contrib.git
|
||||
```
|
||||
3. Go to the cloned `openvino` repository:
|
||||
|
||||
```bash
|
||||
cd openvino/
|
||||
```
|
||||
4. Create a build folder:
|
||||
|
||||
```bash
|
||||
mkdir build && cd build/
|
||||
```
|
||||
5. Build the OpenVINO Runtime:
|
||||
* for MYRIAD support only:
|
||||
```bash
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DOPENVINO_EXTRA_MODULES=<OPENVINO_CONTRIB_PATH>/openvino_contrib/modules/arm_plugin \
|
||||
-DARM_COMPUTE_SCONS_JOBS=$(nproc --all) \
|
||||
.. && cmake --build . --parallel
|
||||
```
|
||||
|
||||
## Cross Compilation Using Docker
|
||||
|
||||
To cross-compile ARM CPU plugins using pre-configured `Dockerfile` you can use the following instruction: [Build OpenCV, OpenVINO™ and the plugin using pre-configured Dockerfile](https://github.com/openvinotoolkit/openvino_contrib/wiki/How-to-build-ARM-CPU-plugin#approach-1-build-opencv-openvino-and-the-plugin-using-pre-configured-dockerfile-cross-compiling-the-preferred-way).
|
||||
|
||||
## Additional Build Options
|
||||
|
||||
- To build Python API, install `libpython3-dev:armhf` and `python3-pip`
|
||||
packages using `apt-get`; then install `numpy` and `cython` python modules
|
||||
via `pip3`, adding the following options:
|
||||
```sh
|
||||
-DENABLE_PYTHON=ON \
|
||||
-DPYTHON_EXECUTABLE=/usr/bin/python3.7 \
|
||||
-DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.7m.so \
|
||||
-DPYTHON_INCLUDE_DIR=/usr/include/python3.7
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [OpenVINO Get Started](./get_started.md)
|
||||
* [How to build OpenVINO](build.md)
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# Build OpenVINO™ Runtime for WebAssembly
|
||||
|
||||
This guide shows how to build OpenVINO for WebAssembly using [Emscripten SDK](https://emscripten.org/). Emscripten SDK can be directly downloaded and used, but it is more easier to use the [emscripten/emsdk](https://hub.docker.com/r/emscripten/emsdk) docker image.
|
||||
|
||||
The approach is validated on Linux, Windows and macOS operation systems.
|
||||
|
||||
## Software Requirements
|
||||
|
||||
- [Docker Engine](https://docs.docker.com/engine/install/)
|
||||
|
||||
## How to build
|
||||
|
||||
1. Clone OpenVINO repository and init submodules:
|
||||
```sh
|
||||
git clone https://github.com/openvinotoolkit/openvino.git
|
||||
cd openvinof
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
2. Run docker image and mount a volume with OpenVINO source code:
|
||||
```sh
|
||||
$ docker pull emscripten/emsdk
|
||||
$ docker run -it --rm -v `pwd`:/openvino emscripten/emsdk
|
||||
```
|
||||
3. (CMake configure) Run cmake configure step using helper emscripten command:
|
||||
```sh
|
||||
$ mkdir build && cd build
|
||||
$ emcmake cmake -DCMAKE_BUILD_TYPE=Release /openvino
|
||||
```
|
||||
4. (CMake build) Build OpenVINO project:
|
||||
```sh
|
||||
$ emmake make -j$(nproc)
|
||||
```
|
||||
`openvino.wasm` and `openvino.js` files are located in:
|
||||
- `<openvino_source_dir>/bin/ia32/Release/` on host machine file system.
|
||||
- `/openvino/bin/ia32/Release` in docker environment.
|
||||
These files can be used in browser applications.
|
||||
|
||||
## See also
|
||||
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [OpenVINO Get Started](./get_started.md)
|
||||
* [How to build OpenVINO](build.md)
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
# Build OpenVINO™ Runtime for Windows systems
|
||||
|
||||
OpenVINO can be compiled for different architectures on Windows: X64 or ARM64. In order to build for ARM64 architecture, the machine with Windows on ARM is required as only native compilation is supported (see [similar documents](https://www.linaro.org/blog/how-to-set-up-windows-on-arm-for-llvm-development/#:~:text=Install%20the%20Latest%20LLVM%20for,PATH%20yourself%2C%20as%20described%20above.) for details).
|
||||
|
||||
Supported configurations:
|
||||
- Windows 10 x86 64-bit or higher with Visual Studio 2019 or higher build for X64 architecture.
|
||||
- Windows on ARM (shortly WoA) to build for ARM64 architecture. OpenVINO was validated on [Windows DevKit 2023](https://developer.qualcomm.com/hardware/windows-on-snapdragon/windows-dev-kit-2023)
|
||||
|
||||
## Software requirements
|
||||
|
||||
- [CMake](https://cmake.org/download/) 3.13 or higher
|
||||
- Microsoft Visual Studio 2019 or higher, version 16.3 or later
|
||||
> **NOTE**: Native Microsoft Visual Studio for WoA is available since 2022.
|
||||
- Python 3.7 or higher for OpenVINO Runtime Python API
|
||||
> **NOTE**: Python for ARM64 is available since [3.11](https://www.python.org/downloads/windows/) version.
|
||||
- [Git for Windows*]
|
||||
- (Windows on ARM only) [LLVM for Windows on ARM (WoA)](https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/LLVM-15.0.6-woa64.exe)
|
||||
> **NOTE**: After installation, make sure `clang-cl` compiler is available from `PATH`.
|
||||
|
||||
## How to build
|
||||
|
||||
> **NOTE**: By default, the build enables the OpenVINO Runtime GPU plugin to infer models on your Intel® Processor Graphics. This requires you to download and install the Intel® Graphics Driver for Windows (26.20) [driver package](https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html) before running the build. If you don't want to use the GPU plugin, use the `-DENABLE_INTEL_GPU=OFF` CMake build option and skip the installation of the Intel® Graphics Driver.
|
||||
|
||||
1. Clone submodules:
|
||||
```sh
|
||||
git clone https://github.com/openvinotoolkit/openvino.git
|
||||
cd openvino
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
(Extra for WoA) To build on Windows on ARM with ARM plugin:
|
||||
```sh
|
||||
git clone https://github.com/openvinotoolkit/openvino_contrib.git
|
||||
cd openvino_contrib
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
2. Create build directory:
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
```
|
||||
3. In the `build` directory, run `cmake` to fetch project dependencies and generate a Visual Studio solution.
|
||||
|
||||
On Windows x86 64-bits:
|
||||
```sh
|
||||
cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release <openvino>
|
||||
```
|
||||
|
||||
On Windows on ARM for ARM64 architecture:
|
||||
```sh
|
||||
cmake -G "Visual Studio 16 2019" -DOPENVINO_EXTRA_MODULES=<openvino_contrib>/modules/arm_plugin -DCMAKE_BUILD_TYPE=Release <openvino>
|
||||
```
|
||||
|
||||
4. Build generated solution in Visual Studio or run `cmake --build . --config Release --verbose -j8` to build from the command line. Be aware that this process may take some time.
|
||||
|
||||
5. Before running the samples, add paths to the Threading Building Blocks (TBB) binaries used for the build to the `%PATH%` environment variable. By default, TBB binaries are downloaded by the CMake-based script to the `<openvino>/temp/tbb/bin` folder.
|
||||
|
||||
### Additional Build Options
|
||||
|
||||
- Internal JIT GEMM implementation is used by default.
|
||||
|
||||
- Threading Building Blocks (TBB) is used by default. To build Inference Engine with OpenMP threading, set the `-DTHREADING=OMP` option.
|
||||
|
||||
- Required versions of TBB and OpenCV packages are downloaded automatically by the CMake-based script. If you want to use the automatically-downloaded packages but you have already installed TBB or OpenCV packages configured in your environment, you may need to clean the `TBBROOT` and `OpenCV_DIR` environment variables before running the `cmake` command; otherwise they won'tnbe downloaded and the build may fail if incompatible versions were installed.
|
||||
|
||||
- If the CMake-based build script can not find and download the OpenCV package that is supported on your platform, or if you want to use a custom build of the OpenCV library, refer to the [Use Custom OpenCV Builds](./cmake_options_for_custom_comiplation.md#Building-with-custom-OpenCV) section for details.
|
||||
|
||||
- To build the OpenVINO Runtime Python API:
|
||||
1. First, install all additional packages (e.g., cython and opencv) listed in the file:
|
||||
```sh
|
||||
pip install -r <openvino>\src\bindings\python\src\compatibility\openvino\requirements-dev.txt
|
||||
```
|
||||
2. Second, enable the `-DENABLE_PYTHON=ON` in the CMake (Step #4) option above. To specify an exact Python version, use the following options:
|
||||
```sh
|
||||
-DPYTHON_EXECUTABLE="C:\Program Files\Python11\python.exe" ^
|
||||
-DPYTHON_LIBRARY="C:\Program Files\Python11\libs\python11.lib" ^
|
||||
-DPYTHON_INCLUDE_DIR="C:\Program Files\Python11\include"
|
||||
```
|
||||
3. To build a wheel package (.whl), enable the `-DENABLE_WHEEL=ON` option in the CMake step above (Step 4):
|
||||
4. After the build process finishes, export the newly built Python libraries to the user environment variables:
|
||||
```
|
||||
set PYTHONPATH=<openvino_repo>/bin/<arch>/Release/python_api/python3.11;%PYTHONPATH%
|
||||
set OPENVINO_LIB_PATH=<openvino_repo>/bin/<arch>/Release;%OPENVINO_LIB_PATH%
|
||||
```
|
||||
or install the wheel with pip:
|
||||
```
|
||||
pip install build/wheel/openvino-2023.0.0-9612-cp11-cp11-win_arm64.whl
|
||||
```
|
||||
|
||||
- OpenVINO runtime compilation options:
|
||||
`-DENABLE_OV_ONNX_FRONTEND=ON` enables the building of the ONNX importer.
|
||||
|
||||
### Building OpenVINO with Ninja* Build System
|
||||
|
||||
```sh
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
|
||||
cmake -G Ninja -Wno-dev -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake --build . --config Release
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [OpenVINO Get Started](./get_started.md)
|
||||
* [How to build OpenVINO](build.md)
|
||||
|
||||
+14
-384
@@ -1,7 +1,5 @@
|
||||
# How to build OpenVINO
|
||||
|
||||
The guide provides the basic information about the process of building OpenVINO.
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
%% Use a hack for centry as a persantage
|
||||
@@ -14,390 +12,22 @@ gantt
|
||||
Run tests :active, run, after build, 1716w
|
||||
```
|
||||
|
||||
## Setup environment
|
||||
The articles below provide the basic informations about the process of building OpenVINO.
|
||||
|
||||
This charpter describe how to prepare your machine for OpenVINO development.
|
||||
* [Windows](build-windows.md)
|
||||
* [Linux](build-linux.md)
|
||||
* [Mac (Intel GPU)](build-mac-intel-cpu.md)
|
||||
* [Mac (ARM)](build-mac-arm.md)
|
||||
* [Android](build-android.md)
|
||||
* [Raspbian Stretch](./build-raspbian.md)
|
||||
* [Web Assembly](./build-webassembly.md)
|
||||
* [Docker Image](https://github.com/openvinotoolkit/docker_ci/tree/master/dockerfiles/ubuntu18/build_custom)
|
||||
|
||||
### Software requirements
|
||||
> **NOTE**: For the details on how to build static OpenVINO, refer to [Building static OpenVINO libraries](static_libaries.md)
|
||||
|
||||
For the OpenVINO build next tools are required:
|
||||
<details><summary>Windows</summary>
|
||||
<p>
|
||||
|
||||
- [CMake]\* 3.14 or higher
|
||||
- Microsoft\* Visual Studio 2019, version 16.8 or later
|
||||
- (Optional) Intel® Graphics Driver for Windows* (30.0) [driver package](https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html).
|
||||
- Python 3.7 or higher for OpenVINO Runtime Python API
|
||||
- [Git for Windows*](https://gitforwindows.org/)
|
||||
|
||||
</p>
|
||||
</details>
|
||||
<details><summary>Linux</summary>
|
||||
<p>
|
||||
## See also
|
||||
|
||||
- [CMake] 3.13 or higher
|
||||
- GCC 7.5 or higher to build OpenVINO Runtime
|
||||
- Python 3.7 or higher for OpenVINO Runtime Python API
|
||||
- (Optional) [Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.41.14441] to enable inference on Intel integrated GPUs.
|
||||
|
||||
<p>
|
||||
</details>
|
||||
<details><summary>Mac</summary>
|
||||
<p>
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [OpenVINO Get Started](./get_started.md)
|
||||
|
||||
- [brew](https://brew.sh) package manager to install additional dependencies. Use [install brew](https://brew.sh) guide to achieve this.
|
||||
- [CMake]\* 3.13 or higher
|
||||
```sh
|
||||
% brew install cmake
|
||||
```
|
||||
- Clang\* compiler, git and other command line tools from Xcode\* 10.1 or higher:
|
||||
```sh
|
||||
% xcode-select --install
|
||||
```
|
||||
- The step to install python and python libraries is different depending on host architecture:
|
||||
- **x86_64** Python\* 3.7 or higher for the OpenVINO Runtime Python API, Development tools (Model Optimizer, POT and others):
|
||||
```sh
|
||||
% # let's have a look what python versions are available in brew
|
||||
% brew search python
|
||||
% # select preferred version of python based on available ones, e.g. 3.10
|
||||
% brew install python@3.10
|
||||
```
|
||||
- **arm64** Select universal2 installer from [Python releases] download page and install `python-3.X.Y-macos11.pkg` image. This allows to have universal python libraries and build x86_64 OpenVINO Python API and Development tools.
|
||||
|
||||
- Additional `pip` dependencies to build OpenVINO Runtime Python API, Development tools (Model Optimizer, POT and others):
|
||||
```sh
|
||||
% # update pip and setuptools to newer versions
|
||||
% python3 -m pip install -U pip setuptools
|
||||
% python3 -m pip install cython
|
||||
```
|
||||
In order to build OpenVINO Python API and Development tools as wheel packages, additionally install requirements (after OpenVINO repo clone):
|
||||
```sh
|
||||
% python3 -m pip install -r <openvino source tree>/src/bindings/python/wheel/requirements-dev.txt
|
||||
```
|
||||
- (Optional; native compilation only) Latest version of TBB library. By default, OpenVINO downloads prebuilt version of TBB 2020.4 library, but if you want to use latest (add `-DENABLE_SYSTEM_TBB=ON` additionally to cmake configuration step):
|
||||
```sh
|
||||
% brew install tbb
|
||||
```
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
### Clone OpenVINO Repository
|
||||
|
||||
Clone OpenVINO repository and init submodules:
|
||||
```sh
|
||||
git clone https://github.com/openvinotoolkit/openvino.git
|
||||
cd openvino
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
|
||||
<details><summary>(Optional) For users in China, clone submodules via gitee mirrors</summary>
|
||||
<p>
|
||||
|
||||
```sh
|
||||
chmod +x scripts/submodule_update_with_gitee.sh
|
||||
./scripts/submodule_update_with_gitee.sh
|
||||
```
|
||||
|
||||
<p>
|
||||
</details>
|
||||
|
||||
Congratulate! Now you are ready to build the OpenVINO.
|
||||
|
||||
## How to build
|
||||
|
||||
<details><summary>Windows</summary>
|
||||
<p>
|
||||
|
||||
> **NOTE**: By default, the build enables the OpenVINO Runtime GPU plugin to infer models on your Intel® Processor Graphics. This requires you to download and install the Intel® Graphics Driver for Windows (26.20) [driver package](https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html) before running the build. If you don't want to use the GPU plugin, use the `-DENABLE_INTEL_GPU=OFF` CMake build option and skip the installation of the Intel® Graphics Driver.
|
||||
|
||||
1. Create build directory:
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
```
|
||||
2. In the `build` directory, run `cmake` to fetch project dependencies and
|
||||
generate a Visual Studio solution.
|
||||
|
||||
For Microsoft\* Visual Studio 2019 x64 architecture:
|
||||
```sh
|
||||
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
|
||||
For Microsoft\* Visual Studio 2019 ARM architecture:
|
||||
```sh
|
||||
cmake -G "Visual Studio 16 2019" -A ARM -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
|
||||
For Microsoft\* Visual Studio 2019 ARM64 architecture:
|
||||
```sh
|
||||
cmake -G "Visual Studio 16 2019" -A ARM64 -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
|
||||
3. Build generated solution in Visual Studio or run
|
||||
`cmake --build . --config Release --verbose -j8` to build from the command line. Note that this process may take some time.
|
||||
|
||||
4. Before running the samples, add paths to the Threading Building Blocks (TBB) and OpenCV binaries used for
|
||||
the build to the `%PATH%` environment variable. By default, TBB binaries are
|
||||
downloaded by the CMake-based script to the `<openvino_repo>/temp/tbb/bin`
|
||||
folder, OpenCV binaries to the `<openvino_repo>/temp/opencv_4.5.0/opencv/bin`
|
||||
folder.
|
||||
|
||||
### Additional Build Options
|
||||
|
||||
- Internal JIT GEMM implementation is used by default.
|
||||
|
||||
- Threading Building Blocks (TBB) is used by default. To build Inference
|
||||
Engine with OpenMP threading, set the `-DTHREADING=OMP` option.
|
||||
|
||||
- Required versions of TBB and OpenCV packages are downloaded automatically by
|
||||
the CMake-based script. If you want to use the automatically-downloaded
|
||||
packages but you have already installed TBB or OpenCV packages configured in
|
||||
your environment, you may need to clean the `TBBROOT` and `OpenCV_DIR`
|
||||
environment variables before running the `cmake` command; otherwise they won't
|
||||
be downloaded and the build may fail if incompatible versions were installed.
|
||||
|
||||
- If the CMake-based build script can not find and download the OpenCV package
|
||||
that is supported on your platform, or if you want to use a custom build of
|
||||
the OpenCV library, refer to the
|
||||
[Use Custom OpenCV Builds](https://github.com/openvinotoolkit/openvino/wiki/CMakeOptionsForCustomCompilation#Building-with-custom-OpenCV)
|
||||
section for details.
|
||||
|
||||
- To switch off/on the CPU and GPU plugins, use the `cmake` options
|
||||
`-DENABLE_INTEL_CPU=ON/OFF` and `-DENABLE_INTEL_GPU=ON/OFF` respectively.
|
||||
|
||||
- To build the OpenVINO Runtime Python API:
|
||||
1. First, install all additional packages (e.g., cython and opencv) listed in the
|
||||
`src\bindings\python\src\compatibility\openvino\requirements-dev.txt` file:
|
||||
```sh
|
||||
pip install -r requirements-dev.txt
|
||||
```
|
||||
2. Second, enable the `-DENABLE_PYTHON=ON` in the CMake (Step #4) option above. To
|
||||
specify an exact Python version, use the following options:
|
||||
```sh
|
||||
-DPYTHON_EXECUTABLE="C:\Program Files\Python37\python.exe" ^
|
||||
-DPYTHON_LIBRARY="C:\Program Files\Python37\libs\python37.lib" ^
|
||||
-DPYTHON_INCLUDE_DIR="C:\Program Files\Python37\include"
|
||||
```
|
||||
|
||||
- OpenVINO runtime compilation options:
|
||||
`-DENABLE_OV_ONNX_FRONTEND=ON` enables the building of the ONNX importer.
|
||||
|
||||
### Building OpenVINO with Ninja* Build System
|
||||
|
||||
```sh
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
|
||||
cmake -G Ninja -Wno-dev -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake --build . --config Release
|
||||
```
|
||||
|
||||
<p>
|
||||
</details>
|
||||
|
||||
<details><summary>Linux</summary>
|
||||
<p>
|
||||
|
||||
1. Install build dependencies using the `install_build_dependencies.sh` script in the
|
||||
project root folder.
|
||||
```sh
|
||||
chmod +x install_build_dependencies.sh
|
||||
```
|
||||
```sh
|
||||
./install_build_dependencies.sh
|
||||
```
|
||||
> **NOTE**: By default, the build enables the OpenVINO Runtime GPU plugin to infer models on your Intel® Processor Graphics. This requires you to [Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.41.14441] before running the build. If you don't want to use the GPU plugin, use the `-DENABLE_INTEL_GPU=OFF` CMake build option and skip the installation of the Intel® Graphics Compute Runtime for OpenCL™ Driver.
|
||||
|
||||
2. Create a build folder:
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
```
|
||||
3. OpenVINO Runtime uses a CMake-based build system. In the created `build`
|
||||
directory, run `cmake` to fetch project dependencies and create Unix
|
||||
makefiles, then run `make` to build the project:
|
||||
```sh
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make --jobs=$(nproc --all)
|
||||
```
|
||||
The process may take some time to finish.
|
||||
|
||||
### Additional Build Options
|
||||
|
||||
You can use the following additional build options:
|
||||
|
||||
- Threading Building Blocks (TBB) is used by default. To build the OpenVINO
|
||||
Runtime with OpenMP\* threading set the `-DTHREADING=OMP` option.
|
||||
|
||||
- For IA32 operation systems, use [ia32.linux.toolchain.cmake](https://github.com/openvinotoolkit/openvino/blob/master/cmake/toolchains/ia32.linux.toolchain.cmake) CMake toolchain file:
|
||||
|
||||
```sh
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=<openvino_repo>/cmake/toolchains/ia32.linux.toolchain.cmake ..
|
||||
```
|
||||
|
||||
- Required versions of TBB and OpenCV packages are downloaded automatically by
|
||||
the CMake-based script. If you want to use the automatically downloaded
|
||||
packages but you have already installed TBB or OpenCV packages configured in
|
||||
your environment, you may need to clean the `TBBROOT` and `OpenCV_DIR`
|
||||
environment variables before running the `cmake` command, otherwise they
|
||||
will not be downloaded and the build may fail if incompatible versions were
|
||||
installed.
|
||||
|
||||
- If the CMake-based build script can not find and download the OpenCV package
|
||||
that is supported on your platform, or if you want to use a custom build of
|
||||
the OpenCV library, see how to [Use Custom OpenCV Builds](https://github.com/openvinotoolkit/openvino/wiki/CMakeOptionsForCustomCompilation#Building-with-custom-OpenCV).
|
||||
|
||||
- To build the OpenVINO Runtime Python API:
|
||||
1. Install all additional packages (e.g., cython and opencv) listed in the
|
||||
`/src/bindings/python/src/compatibility/openvino/requirements-dev.txt` file:
|
||||
```sh
|
||||
pip install -r requirements-dev.txt
|
||||
```
|
||||
2. Enable the `-DENABLE_PYTHON=ON` option in the CMake step above (Step 4). To specify an exact Python version, use the following
|
||||
options:
|
||||
```
|
||||
-DPYTHON_EXECUTABLE=`which python3.7` \
|
||||
-DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so \
|
||||
-DPYTHON_INCLUDE_DIR=/usr/include/python3.7
|
||||
```
|
||||
3. To build a wheel package (.whl), enable the `-DENABLE_WHEEL=ON` option in the CMake step above (Step 4):
|
||||
4. After the build process finishes, export the newly built Python libraries to the user environment variables:
|
||||
```
|
||||
export PYTHONPATH=PYTHONPATH:<openvino_repo>/bin/intel64/Release/python_api/python3.7
|
||||
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:<openvino_repo>/bin/intel64/Release
|
||||
```
|
||||
or install the wheel with pip:
|
||||
```
|
||||
pip install <openvino_repo>/build/wheel/openvino-2022.2.0-000-cp37-cp37-manylinux_2_35_x86_64.whl
|
||||
```
|
||||
|
||||
- To switch the CPU and GPU plugins off/on, use the `cmake` options
|
||||
`-DENABLE_INTEL_CPU=ON/OFF` and `-DENABLE_INTEL_GPU=ON/OFF` respectively.
|
||||
|
||||
- OpenVINO runtime compilation options:
|
||||
`-DENABLE_OV_ONNX_FRONTEND=ON` enables the building of the ONNX importer.
|
||||
|
||||
|
||||
<p>
|
||||
</details>
|
||||
|
||||
<details><summary>Mac</summary>
|
||||
<p>
|
||||
|
||||
This guide shows how to build OpenVINO Runtime for later inference on Apple with:
|
||||
|
||||
<details><summary>Intel CPU</summary>
|
||||
<p>
|
||||
|
||||
This can be done using two ways:
|
||||
- Compile on Intel CPU host using native compilation. Note, that [Build steps](#build-steps) show this scenario.
|
||||
- Cross-compile on OSX Apple Silicon.
|
||||
|
||||
1. Create a build folder:
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
```
|
||||
2. (CMake configure) OpenVINO project uses a CMake-based build system. In the created `build` directory, run `cmake` to fetch project dependencies and create build rules:
|
||||
```sh
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
> **Note:** By default OpenVINO CMake scripts try to introspect the system and enable all possible functionality based on that. You can look at the CMake output and see warnings, which show that some functionality is turned off and the corresponding reason, guiding what to do to install additionally to enable unavailable functionality. Additionally, you can change CMake options to enable / disable some functionality, add / remove compilation flags, provide custom version of dependencies like TBB, PugiXML, OpenCV, Protobuf. Please, read [CMake Options for Custom Compilation](https://github.com/openvinotoolkit/openvino/wiki/CMakeOptionsForCustomCompilation) for this information.
|
||||
3. (CMake build) Build OpenVINO project:
|
||||
```sh
|
||||
cmake --build . --config Release --jobs=$(nproc --all)
|
||||
```
|
||||
All built binaries are located in `<openvino_source_dir>/bin/intel64/Release/` and wheel packages are located in `<openvino_build_dir>/wheels`.
|
||||
|
||||
4. (Optional install) Once you have built OpenVINO, you can install artifacts to a preferred location:
|
||||
```sh
|
||||
cmake -DCMAKE_INSTALL_PREFIX=<installation location> -P cmake_install.cmake
|
||||
```
|
||||
|
||||
### Cross-compilation
|
||||
|
||||
Since OSX version 11.x and Xcode version 12.2, the Apple development tools allows to compile arm64 code on x86 hosts and vice-versa. Based on this, OpenVINO can be compiled even on Apple Silicon machines, then such artifacts can be run on both Intel CPU hosts and Apple Silicon hosts (using [Rosetta]). For this, try to compile OpenVINO using the steps above, but adding `-DCMAKE_OSX_ARCHITECTURES=x86_64` on cmake configure stage. But, **don't enable any system library usage explicitly** via CMake options, because they have `arm64` architecture, e.g.:
|
||||
```sh
|
||||
file /opt/homebrew/Cellar/tbb/2021.5.0_2/lib/libtbb.12.5.dylib
|
||||
/opt/homebrew/Cellar/tbb/2021.5.0_2/lib/libtbb.12.5.dylib: Mach-O 64-bit dynamically linked shared library arm64
|
||||
```
|
||||
|
||||
If you will see the errors like below:
|
||||
```sh
|
||||
ld: warning: ignoring file /opt/homebrew/lib/libopencv_imgproc.4.6.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
|
||||
Undefined symbols for architecture x86_64:
|
||||
"cv::Mat::Mat(cv::Size_<int>, int, void*, unsigned long)", referenced from:
|
||||
_image_resize in opencv_c_wrapper.cpp.o
|
||||
_image_save in opencv_c_wrapper.cpp.o
|
||||
....
|
||||
ld: symbol(s) not found for architecture x86_64
|
||||
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
||||
```
|
||||
Disable its usage in cmake or totally remove such library from the system (e.g. `brew uninstall opencv`), because it's pure arm64 and cannot be used to compile x86_64 binaries.
|
||||
|
||||
Or you have to explicitly find / compile x86_64 (or even `universal2`) dependencies by yourself and pass it to OpenVINO cmake scripts. E.g. compile oneTBB using additional option `-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"`, install and then set `export TBBROOT=<universal oneTBB install root>` which will be used by OpenVINO.
|
||||
|
||||
<p>
|
||||
</details>
|
||||
|
||||
<details><summary>ARM</summary>
|
||||
<p>
|
||||
|
||||
There are two options how to use OpenVINO on Apple Silicon:
|
||||
- (Native) Compile OpenVINO for arm64 architecture with extra module [OpenVINO ARM plugin](https://github.com/openvinotoolkit/openvino_contrib/tree/master/modules/arm_plugin) location in [OpenVINO Contrib](https://github.com/openvinotoolkit/openvino_contrib). Note, build steps will cover this as a default scenario.
|
||||
- (Rosetta) Compile Intel CPU plugin `x86_64` architecture and run under [Rosetta].
|
||||
|
||||
1. Clone contrib repo:
|
||||
```sh
|
||||
cd ..
|
||||
git clone https://github.com/openvinotoolkit/openvino_contrib.git
|
||||
cd openvino_contrib
|
||||
git submodule update --init --recursive
|
||||
cd ../openvino
|
||||
```
|
||||
2. Create a build folder:
|
||||
```sh
|
||||
mkdir build && cd build
|
||||
```
|
||||
3. (CMake configure) OpenVINO project uses a CMake-based build system. In the created `build` directory, run `cmake` to fetch project dependencies and create build rules:
|
||||
```sh
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENVINO_EXTRA_MODULES=../openvino_contrib/modules/arm_plugin ..
|
||||
```
|
||||
> **Note:** By default OpenVINO CMake scripts try to introspect the system and enable all possible functionality based on that. You can look at the CMake output and see warnings, which show that some functionality is turned off and the corresponding reason, guiding what to do to install additionally to enable unavailable functionality. Additionally, you can change CMake options to enable / disable some functionality, add / remove compilation flags, provide custom version of dependencies like TBB, PugiXML, OpenCV, Protobuf. Please, read [CMake Options for Custom Compilation](https://github.com/openvinotoolkit/openvino/wiki/CMakeOptionsForCustomCompilation) for this information.
|
||||
4. (CMake build) Build OpenVINO project:
|
||||
```sh
|
||||
cmake --build . --config Release --jobs=$(nproc --all)
|
||||
```
|
||||
All built binaries are located in `<openvino_source_dir>/bin/<arm64 | intel64>/Release/` and wheel packages are located in `<openvino_build_dir>/wheels`.
|
||||
|
||||
5. (Optional install) Once you have built OpenVINO, you can install artifacts to a preferred location:
|
||||
```sh
|
||||
cmake -DCMAKE_INSTALL_PREFIX=<installation location> -P cmake_install.cmake
|
||||
```
|
||||
|
||||
### Building x86_64 binaries
|
||||
|
||||
Since OSX version 11.x and Xcode version 12.2, the Apple development tools allows to compile arm64 code on x86 hosts and vice-versa. Based on this, OpenVINO can be compiled as x86_64 binary, then run on Apple Silicon hosts using [Rosetta]. For this, first of all Rosetta must be installed:
|
||||
|
||||
```sh
|
||||
softwareupdate --install-rosetta
|
||||
```
|
||||
|
||||
Then try to compile OpenVINO using the steps above, but adding `-DCMAKE_OSX_ARCHITECTURES=x86_64` on cmake configure stage. But, **don't enable any system library usage explicitly** via CMake options, because they have `arm64` architecture, e.g.:
|
||||
```sh
|
||||
file /opt/homebrew/Cellar/tbb/2021.5.0_2/lib/libtbb.12.5.dylib
|
||||
/opt/homebrew/Cellar/tbb/2021.5.0_2/lib/libtbb.12.5.dylib: Mach-O 64-bit dynamically linked shared library arm64
|
||||
```
|
||||
|
||||
> **Note:** since you are building with `universal2` python libraries, wheel package is created with name `openvino-2022.3.0-000-cp39-cp39-macosx_12_0_universal2.whl` and have proper `universal2` tags, so can *potentially* be used on both Apple Silicon and Intel CPU.
|
||||
|
||||
|
||||
<p>
|
||||
</details>
|
||||
|
||||
|
||||
<p>
|
||||
</details>
|
||||
|
||||
## Run application
|
||||
|
||||
[CMake]:https://cmake.org/download/
|
||||
[Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.41.14441]:https://github.com/intel/compute-runtime/releases/tag/19.41.14441
|
||||
[Rosetta]:https://support.apple.com/en-us/HT211861
|
||||
@@ -0,0 +1,59 @@
|
||||
# How to build documentation
|
||||
|
||||
The following procedure was validated on Windows and Ubuntu operation systems.
|
||||
|
||||
## Table of content:
|
||||
|
||||
* [Installing dependencies](#installing-dependencies)
|
||||
* [Building documentation](#installing-dependencies)
|
||||
* [Additional Resources](#additional-resources)
|
||||
|
||||
## Installing dependencies
|
||||
|
||||
The `doxygen` and `latex` must be installed in addition to usual build dependencies:
|
||||
|
||||
### Windows
|
||||
|
||||
* [miktex](https://miktex.org/)
|
||||
* [doxygen](http://doxygen.nl/files/doxygen-1.8.20-setup.exe) (version >= 1.8.20)
|
||||
* [Graphviz](https://graphviz.org/download/)
|
||||
|
||||
### Ubuntu systems
|
||||
|
||||
* Latex and graphviz:
|
||||
|
||||
```sh
|
||||
apt-get install texlive-full graphviz
|
||||
```
|
||||
|
||||
* goxygen version >= 1.8.20:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/doxygen/doxygen.git
|
||||
$ cd doxygen
|
||||
$ git checkout Release_1_8_20
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
$ cmake ..
|
||||
$ cmake --build . -j8
|
||||
$ sudo make install
|
||||
```
|
||||
|
||||
## Building documentation
|
||||
|
||||
You should run `cmake` with `-DENABLE_DOCS=ON` and it will find all dependencies automatically on Ubuntu systems, while on Windows we still need to specify paths to the installed dependencies:
|
||||
|
||||
```sh
|
||||
cmake -DLATEX_COMPILER="C:/Program Files/MiKTeX/miktex/bin/x64/latex.exe" \
|
||||
-DDOXYGEN_DOT_EXECUTABLE="C:/Program Files (x86)/Graphviz2.38/bin/dot.exe" \
|
||||
-DDOXYGEN_EXECUTABLE="C:/Program Files/doxygen/bin/doxygen.exe" \
|
||||
-DENABLE_DOCS=ON \
|
||||
```
|
||||
|
||||
Once the dependencies are found, the project must generated using CMake. The target `openvino_docs` must be built to generate doxygen documentation, the generated files can be found at `<binary dir>/docs/html/index.html`
|
||||
|
||||
## See also
|
||||
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [How to Build OpenVINO](build.md)
|
||||
@@ -0,0 +1,192 @@
|
||||
# CMake Options for Custom Compilation
|
||||
|
||||
This document provides description and default values for CMake options that can be used to build a custom OpenVINO runtime using the open source version. For instructions on how to create a custom runtime from the prebuilt OpenVINO release package, refer to the [deployment manager] documentation. To understand all the dependencies when creating a custom runtime from the open source repository, refer to the [OpenVINO Runtime Introduction].
|
||||
|
||||
## Table of contents:
|
||||
|
||||
* [Disable / enable plugins build and other components](#disable--enable-plugins-build-and-other-components)
|
||||
* [Options affecting binary size](#options-affecting-binary-size)
|
||||
* [Building with custom OpenCV](#building-with-custom-opencv)
|
||||
* [Building with custom TBB](#building-with-custom-tbb)
|
||||
* [Test capabilities](#test-capabilities)
|
||||
* [Other options](#other-options)
|
||||
- [Additional Resources](#additional-resources)
|
||||
|
||||
## Disable / enable plugins build and other components
|
||||
|
||||
* Inference plugins:
|
||||
* `ENABLE_INTEL_CPU` enables CPU plugin compilation:
|
||||
* `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_GNA` enables GNA plugin compilation:
|
||||
* `ON` is default for x86 platforms; not available, otherwise.
|
||||
* `ENABLE_HETERO` enables HETERO plugin build:
|
||||
* `ON` is default.
|
||||
* `ENABLE_MULTI` enables MULTI plugin build:
|
||||
* `ON` is default.
|
||||
* `ENABLE_AUTO` enables AUTO plugin build:
|
||||
* `ON` is default.
|
||||
* `ENABLE_TEMPLATE` enables TEMPLATE plugin build:
|
||||
* `ON` is default.
|
||||
* `ENABLE_AUTO_BATCH` enables Auto Batch plugin build:
|
||||
* `ON` is default.
|
||||
* Frontends to work with models from frameworks:
|
||||
* `ENABLE_OV_ONNX_FRONTEND` enables [ONNX] frontend plugin for OpenVINO Runtime:
|
||||
* `ON` is default.
|
||||
* `ENABLE_OV_PDPD_FRONTEND` enables [PDPD] frontend plugin for OpenVINO Runtime:
|
||||
* `ON` is default.
|
||||
* `ENABLE_OV_TF_FRONTEND` enables [TensorFlow] frontend plugin for OpenVINO Runtime:
|
||||
* `ON` is default.
|
||||
* `ENABLE_OV_TF_LITE_FRONTEND` enables [TensorFlow Lite] frontend plugin for OpenVINO Runtime:
|
||||
* `ON` is default.
|
||||
* `ENABLE_OV_PYTORCH_FRONTEND` enables [PyTorch] frontend plugin for OpenVINO Runtime:
|
||||
* `ON` is default.
|
||||
* `ENABLE_OV_IR_FRONTEND` enables OpenVINO Intermediate Representation frontend plugin for OpenVINO Runtime:
|
||||
* `ON` is default.
|
||||
* `ENABLE_GAPI_PREPROCESSING` enables G-API preprocessing:
|
||||
* `ON` is default.
|
||||
* `OPENVINO_EXTRA_MODULES` specifies path to add extra OpenVINO modules to the build.
|
||||
* See [OpenVINO Contrib] to add extra modules from.
|
||||
* `ENABLE_SAMPLES` enables OpenVINO Runtime samples build:
|
||||
* `ON` is default.
|
||||
* `ENABLE_PYTHON` enables [Python] API build:
|
||||
* `ON` if python requirements are satisfied (auto-discovered by CMake).
|
||||
* `ENABLE_WHEEL` enables [Python] OpenVINO Runtime and Development wheels build:
|
||||
* `ON` if requirements are satisfied (auto-discovered by CMake).
|
||||
* `ENABLE_TESTS` enables tests compilation:
|
||||
* `OFF` is default.
|
||||
* `ENABLE_IR_V7_READER` enables IR v7 reader:
|
||||
* `ON` is default.
|
||||
**Note:** must be turned `OFF` when building OpenVINO runtime as static
|
||||
* `ENABLE_DOCS` enables building the OpenVINO documentation:
|
||||
* `OFF` is on Debian (Ubuntu) OSes
|
||||
* `OFF` is in other cases.
|
||||
* `ENABLE_SYSTEM_PUGIXML` builds with system version of [pugixml] if it is available on the system.
|
||||
* `ON` is default.
|
||||
* [OpenVINO thirdparty pugixml] is used by default.
|
||||
* `ENABLE_SYSTEM_PROTOBUF` use [protobuf] installed on the system (used by ONNX, PaddlePaddle and TensorFlow frontends):
|
||||
* `OFF` is default.
|
||||
* `ENABLE_SYSTEM_FLATBUFFERS` use [FlatBuffers] installed on the system (used by Tensorflow Lite frontend):
|
||||
* `ON` is default.
|
||||
* `ENABLE_SYSTEM_TBB` use TBB installed on the system:
|
||||
* `ON` is on Debian (Ubuntu) OSes.
|
||||
* `OFF` is in other cases.
|
||||
* `ENABLE_SYSTEM_OPENCL` use OpenCL installed on the system:
|
||||
* `ON` is default.
|
||||
|
||||
## Options affecting binary size
|
||||
|
||||
* `ENABLE_LTO` boolean option to enable [Link Time Optimizations]:
|
||||
* `OFF` is default, because it takes longer time to link binaries.
|
||||
* `ON` is enabled for OpenVINO release binaries.
|
||||
* Available on Unix* compilers only like GCC or CLANG.
|
||||
* Gives 30% decrease in binary size together with other optimization options used to build OpenVINO.
|
||||
* `THREADING` points to the OpenVINO threading interface:
|
||||
* `TBB` is the default option, which enables build with [Intel TBB] and `tbb::static_partitioner`.
|
||||
* `TBB_AUTO` enables building with [Intel TBB].
|
||||
* `OMP` enables building with Intel OpenMP.
|
||||
* `SEQ` disables threading optimizations. Can be used in cases when TBB binaries are absent.
|
||||
* **Note:** because TBB is a template library, it increases binary size because of multiple instantiations of `tbb::parallel_for`
|
||||
* `ENABLE_TBBBIND_2_5` enables prebuilt static TBBBind 2.5 usage:
|
||||
* `ON` is default, because OpenVINO Runtime should be generic out of box.
|
||||
|
||||
> **Note:** TBBBind 2.5 is needed when OpenVINO **inference** targets CPUs with:
|
||||
> * NUMA support (Non-Unified Memory Architecture), e.g. to detect a number of NUMA nodes
|
||||
> * Hybrid architecture to separate Performance / Efficiency cores and schedule tasks in the optimal way.
|
||||
|
||||
> **Note:** if you build OpenVINO runtime with [oneTBB] support where TBBBind 2.5 is automatically loaded by TBB in runtime, then set `ENABLE_TBBBIND_2_5` to `OFF`
|
||||
|
||||
* `ENABLE_SSE42` enables SSE4.2 optimizations:
|
||||
* `ON` is default for x86 platforms; not available for other platforms.
|
||||
* Affects only OpenVINO Runtime common part and preprocessing plugin, **does not affect the oneDNN library**
|
||||
* `ENABLE_AVX2` enables AVX2 optimizations:
|
||||
* `ON` is default for x86 platforms, not available for other platforms.
|
||||
* Affects only OpenVINO Runtime common part and preprocessing plugin, **does not affect the oneDNN library**
|
||||
* `ENABLE_AVX512F` enables AVX512 optimizations:
|
||||
* `ON` is default for x86 platforms, not available for other platforms.
|
||||
* Affects only OpenVINO Runtime common part and preprocessing plugin, **does not affect the oneDNN library**
|
||||
* `ENABLE_PROFILING_ITT` enables profiling with [Intel ITT and VTune].
|
||||
* `OFF` is default, because it increases binary size.
|
||||
* `SELECTIVE_BUILD` enables [[Conditional compilation|ConditionalCompilation]] feature.
|
||||
* `OFF` is default.
|
||||
|
||||
## Building with custom OpenCV
|
||||
|
||||
When OpenVINO CMake scripts are run with enabled OpenCV (`-DENABLE_OPENCV=ON` which is default), CMake OpenVINO scripts automatically download prebuilt OpenCV
|
||||
from shared drive, such OpenCV is ABI-compatible with the default compiler of your system. If you have a non-default compiler or want to use custom version of OpenCV, you can pass it via CMake option:
|
||||
|
||||
```sh
|
||||
cmake -DOpenCV_DIR=<path to OpenCVConfig.cmake> ...
|
||||
```
|
||||
In this case, default OpenCV will not downloaded and provided one will be used.
|
||||
|
||||
## Building with custom TBB
|
||||
|
||||
When OpenVINO CMake scripts are run with TBB enabled (`-DTHREADING=TBB` which is default, or `-DTHREADING=TBB_AUTO`), CMake OpenVINO scripts automatically download prebuilt version of TBB which is ABI-compatible with the default compiler of your system. If you have a non-default compiler or want to use custom TBB, you can use:
|
||||
|
||||
```sh
|
||||
export TBBROOT=<path to TBB install root>
|
||||
cmake ...
|
||||
```
|
||||
In this case OpenVINO CMake scripts take `TBBROOT` environment variable into account and provided TBB will be used.
|
||||
|
||||
**Note:** if you are building TBB from source files, please install TBB after and use `TBBROOT` to point to installation root.
|
||||
|
||||
## Test capabilities
|
||||
|
||||
* `ENABLE_SANITIZER` builds with clang [address sanitizer] support:
|
||||
* `OFF` is default.
|
||||
* `ENABLE_THREAD_SANITIZER` builds with clang [thread-sanitizer] support:
|
||||
* `OFF` is default.
|
||||
* `ENABLE_COVERAGE` adds option to enable coverage. See dedicated guide [[how to measure test coverage|InferenceEngineTestsCoverage]]:
|
||||
* `OFF` is default.
|
||||
* `ENABLE_FUZZING` enables instrumentation of code for fuzzing:
|
||||
* `OFF` is default.
|
||||
|
||||
## Other options
|
||||
|
||||
* `ENABLE_CPPLINT` enables code style check using [cpplint] static code checker:
|
||||
* `ON` is default.
|
||||
* `ENABLE_CLANG_FORMAT` enables [Clang format] code style check:
|
||||
* `ON` is default.
|
||||
* Used only for ngraph component.
|
||||
* `TREAT_WARNING_AS_ERROR` treats all warnings as an error:
|
||||
* `OFF` is default.
|
||||
* `ENABLE_FASTER_BUILD` enables [precompiled headers] and [unity build] using CMake:
|
||||
* `OFF` is default.
|
||||
* `ENABLE_INTEGRITYCHECK` builds DLLs with [/INTEGRITYCHECK] flag:
|
||||
* `OFF` is default.
|
||||
* Available on MSVC compiler only.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [How to build OpenVINO](build.md)
|
||||
|
||||
[Link Time Optimizations]:https://llvm.org/docs/LinkTimeOptimization.html
|
||||
[thread-sanitizer]:https://clang.llvm.org/docs/ThreadSanitizer.html
|
||||
[address sanitizer]:https://clang.llvm.org/docs/AddressSanitizer.html
|
||||
[Intel ITT and VTune]:https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/api-support/instrumentation-and-tracing-technology-apis.html
|
||||
[precompiled headers]:https://cmake.org/cmake/help/git-stage/command/target_precompile_headers.html
|
||||
[unity build]:https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD.html
|
||||
[/INTEGRITYCHECK]:https://docs.microsoft.com/en-us/cpp/build/reference/integritycheck-require-signature-check?view=msvc-160
|
||||
[Intel TBB]:https://software.intel.com/content/www/us/en/develop/tools/threading-building-blocks.html
|
||||
[Python]:https://www.python.org/
|
||||
[Java]:https://www.java.com/ru/
|
||||
[cpplint]:https://github.com/cpplint/cpplint
|
||||
[Clang format]:http://clang.llvm.org/docs/ClangFormat.html
|
||||
[OpenVINO Contrib]:https://github.com/openvinotoolkit/openvino_contrib
|
||||
[OpenVINO thirdparty pugixml]:https://github.com/openvinotoolkit/openvino/tree/master/inference-engine/thirdparty/pugixml
|
||||
[pugixml]:https://pugixml.org/
|
||||
[ONNX]:https://onnx.ai/
|
||||
[protobuf]:https://github.com/protocolbuffers/protobuf
|
||||
[deployment manager]:https://docs.openvino.ai/latest/openvino_docs_install_guides_deployment_manager_tool.html
|
||||
[OpenVINO Runtime Introduction]:https://docs.openvino.ai/latest/openvino_docs_OV_UG_Integrate_OV_with_your_application.html
|
||||
[PDPD]:https://github.com/PaddlePaddle/Paddle
|
||||
[TensorFlow]:https://www.tensorflow.org/
|
||||
[TensorFlow Lite]:https://www.tensorflow.org/lite
|
||||
[PyTorch]:https://www.tensorflow.org/lite
|
||||
[FlatBuffers]:https://google.github.io/flatbuffers/
|
||||
[oneTBB]:https://github.com/oneapi-src/oneTBB
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
## Introduction
|
||||
|
||||
Conditional compilation can significantly reduce OpenVINO™ binaries size by excluding unnecessary components for particular model inference.
|
||||
The following components can be excluded from the build:
|
||||
* Operations and graph transformations in OpenVINO and plugins,
|
||||
Conditional compilation can significantly reduce the size of OpenVINO™ binaries by excluding unnecessary components for inference of particular models. The components are:
|
||||
* layers and graph transformations in OpenVINO Runtime and plugins,
|
||||
* OpenVINO Runtime operations,
|
||||
* jit kernels in a CPU plugin,
|
||||
* arbitrary code that is not used for particular model inference.
|
||||
|
||||
However, the conditional compilation has a significant drawback - **the resulting OpenVINO Runtime will work only with a limited set of models and devices.**
|
||||
However, conditional compilation has a significant drawback - the resulting OpenVINO runtime will properly infer only using the models and devices for which it was compiled. If just one model is used to collect statistics for compilation, only this particular model is guaranteed to work with the resulting OpenVINO runtime.
|
||||
|
||||
There are two conditional compilation build stages: `SELECTIVE_BUILD=COLLECT` and `SELECTIVE_BUILD=ON`.
|
||||
|
||||
@@ -66,7 +66,7 @@ To apply conditional compilation, follow the steps below:
|
||||
1. Run the CMake tool with the following options: `-DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=${ABSOLUTE_PATH_TO_STATISTICS_FILES}/*.csv -DENABLE_PROFILING_ITT=OFF`
|
||||
2. `cmake --build <cmake_build_directory>`
|
||||
|
||||
The `-niter 1 -nireq 1` flags are highly recommended for the benchmark_app. Otherwise, the trace files will be very large.
|
||||
The `-niter 1 -nireq 1` flags are highly recommended for benchmark_app. Otherwise, the trace files will be very large.
|
||||
If you are using an application other than benchmark_app, remember to limit the number of inference requests and iterations.
|
||||
|
||||
## Building for devices with different ISA
|
||||
|
||||
@@ -17,3 +17,5 @@ Explore other resources to learn more about OpenVINO:
|
||||
## See also
|
||||
* [OpenVINO Developer Documentation](./index.md)
|
||||
* [OpenVINO Samples](../../samples)
|
||||
* [OpenVINO Building Documentation](./building_documentation.md)
|
||||
* [CMake Options for Custom Compilation](./cmake_options_for_custom_comiplation.md)
|
||||
@@ -0,0 +1,266 @@
|
||||
# Installing
|
||||
|
||||
Once the project is built you can install OpenVINO™ Runtime into custom location:
|
||||
|
||||
```
|
||||
cmake --install <BUILDDIR> --prefix <INSTALLDIR>
|
||||
```
|
||||
|
||||
## Installation check
|
||||
|
||||
<details>
|
||||
<summary>For versions prior to 2022.1</summary>
|
||||
<p>
|
||||
|
||||
1. Obtaining Open Model Zoo tools and models
|
||||
|
||||
To have the ability to run samples and demos, you need to clone the Open Model Zoo repository and copy the folder under `./deployment_tools` to your install directory:
|
||||
|
||||
```
|
||||
git clone https://github.com/openvinotoolkit/open_model_zoo.git
|
||||
cmake -E copy_directory ./open_model_zoo/ <INSTALLDIR>/deployment_tools/open_model_zoo/
|
||||
```
|
||||
|
||||
2. Adding OpenCV to your environment
|
||||
|
||||
Open Model Zoo samples use OpenCV functionality to load images. To use it for demo builds you need to provide the path to your OpenCV custom build by setting `OpenCV_DIR` environment variable and add path OpenCV libraries to the `LD_LIBRARY_PATH (Linux)` or `PATH (Windows)` variable before running demos.
|
||||
|
||||
Linux:
|
||||
```sh
|
||||
export LD_LIBRARY_PATH=/path/to/opencv_install/lib/:$LD_LIBRARY_PATH
|
||||
export OpenCV_DIR=/path/to/opencv_install/cmake
|
||||
```
|
||||
|
||||
Windows:
|
||||
```sh
|
||||
set PATH=\path\to\opencv_install\bin\;%PATH%
|
||||
set OpenCV_DIR=\path\to\opencv_install\cmake
|
||||
```
|
||||
|
||||
3. Running demo
|
||||
|
||||
To check your installation go to the demo directory and run Classification Demo:
|
||||
|
||||
Linux and macOS:
|
||||
```sh
|
||||
cd <INSTALLDIR>/deployment_tools/demo
|
||||
./demo_squeezenet_download_convert_run.sh
|
||||
```
|
||||
|
||||
Windows:
|
||||
```sh
|
||||
cd <INSTALLDIR>\deployment_tools\demo
|
||||
demo_squeezenet_download_convert_run.bat
|
||||
```
|
||||
|
||||
Result:
|
||||
```
|
||||
Top 10 results:
|
||||
|
||||
Image <INSTALLDIR>/deployment_tools/demo/car.png
|
||||
|
||||
classid probability label
|
||||
------- ----------- -----
|
||||
817 0.6853030 sports car, sport car
|
||||
479 0.1835197 car wheel
|
||||
511 0.0917197 convertible
|
||||
436 0.0200694 beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
|
||||
751 0.0069604 racer, race car, racing car
|
||||
656 0.0044177 minivan
|
||||
717 0.0024739 pickup, pickup truck
|
||||
581 0.0017788 grille, radiator grille
|
||||
468 0.0013083 cab, hack, taxi, taxicab
|
||||
661 0.0007443 Model T
|
||||
|
||||
[ INFO ] Execution successful
|
||||
```
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
|
||||
<details open>
|
||||
<summary> For 2022.1 and after</summary>
|
||||
<p>
|
||||
|
||||
1. Build samples
|
||||
|
||||
To build C++ sample applications, run the following commands:
|
||||
|
||||
Linux and macOS:
|
||||
```sh
|
||||
cd <INSTALLDIR>/samples/cpp
|
||||
./build_samples.sh
|
||||
```
|
||||
|
||||
Windows:
|
||||
```sh
|
||||
cd <INSTALLDIR>\samples\cpp
|
||||
build_samples_msvc.bat
|
||||
```
|
||||
|
||||
2. Install OpenVINO Development Tools
|
||||
|
||||
> **NOTE**: To build OpenVINO Development Tools (Model Optimizer, Post-Training Optimization Tool, Model Downloader, and Open Model Zoo tools) wheel package locally you are required to use CMake option: `-DENABLE_WHEEL=ON`.
|
||||
|
||||
To install OpenVINO Development Tools to work with Caffe models, execute the following commands:
|
||||
|
||||
Linux and macOS:
|
||||
|
||||
```sh
|
||||
#setup virtual envrinment
|
||||
python3 -m venv openvino_env
|
||||
source openvino_env/bin/activate
|
||||
pip install pip --upgrade
|
||||
|
||||
#install local package from install directory
|
||||
pip install openvino_dev-<version>-py3-none-any.whl[caffe] --find-links=<INSTALLDIR>/tools
|
||||
```
|
||||
|
||||
Windows:
|
||||
```bat
|
||||
rem setup virtual envrinment
|
||||
python -m venv openvino_env
|
||||
openvino_env\Scripts\activate.bat
|
||||
pip install pip --upgrade
|
||||
|
||||
rem install local package from install directory
|
||||
cd <INSTALLDIR>\tools
|
||||
pip install openvino_dev-<version>-py3-none-any.whl[caffe] --find-links=<INSTALLDIR>\tools
|
||||
```
|
||||
|
||||
3. Download the Models
|
||||
|
||||
Download the following model to run the Image Classification Sample:
|
||||
|
||||
Linux and macOS:
|
||||
```sh
|
||||
omz_downloader --name googlenet-v1 --output_dir ~/models
|
||||
```
|
||||
|
||||
Windows:
|
||||
```bat
|
||||
omz_downloader --name googlenet-v1 --output_dir %USERPROFILE%\Documents\models
|
||||
```
|
||||
|
||||
4. Convert the Model with Model Optimizer
|
||||
|
||||
Linux and macOS:
|
||||
```sh
|
||||
mkdir ~/ir
|
||||
mo --input_model ~/models/public/googlenet-v1/googlenet-v1.caffemodel --data_type FP16 --output_dir ~/ir
|
||||
```
|
||||
Windows:
|
||||
```bat
|
||||
mkdir %USERPROFILE%\Documents\ir
|
||||
mo --input_model %USERPROFILE%\Documents\models\public\googlenet-v1\googlenet-v1.caffemodel --data_type FP16 --output_dir %USERPROFILE%\Documents\ir
|
||||
```
|
||||
|
||||
5. Run Inference on the Sample
|
||||
|
||||
Set up the OpenVINO environment variables:
|
||||
|
||||
Linux and macOS:
|
||||
```sh
|
||||
source <INSTALLDIR>/setupvars.sh
|
||||
```
|
||||
|
||||
Windows:
|
||||
```bat
|
||||
<INSTALLDIR>\setupvars.bat
|
||||
```
|
||||
|
||||
The following commands run the Image Classification Code Sample using the [`dog.bmp`](https://storage.openvinotoolkit.org/data/test_data/images/224x224/dog.bmp) file as an input image, the model in IR format from the `ir` directory, and on different hardware devices:
|
||||
|
||||
Linux and macOS:
|
||||
|
||||
```sh
|
||||
cd ~/inference_engine_cpp_samples_build/intel64/Release
|
||||
./classification_sample_async -i ~/Downloads/dog.bmp -m ~/ir/googlenet-v1.xml -d CPU
|
||||
```
|
||||
|
||||
Windows:
|
||||
|
||||
```bat
|
||||
cd %USERPROFILE%\Documents\Intel\OpenVINO\inference_engine_samples_build\intel64\Release
|
||||
.\classification_sample_async.exe -i %USERPROFILE%\Downloads\dog.bmp -m %USERPROFILE%\Documents\ir\googlenet-v1.xml -d CPU
|
||||
```
|
||||
|
||||
When the sample application is complete, you see the label and confidence data for the top 10 categories on the display:
|
||||
|
||||
```
|
||||
Top 10 results:
|
||||
|
||||
Image dog.bmp
|
||||
|
||||
classid probability
|
||||
------- -----------
|
||||
156 0.6875963
|
||||
215 0.0868125
|
||||
218 0.0784114
|
||||
212 0.0597296
|
||||
217 0.0212105
|
||||
219 0.0194193
|
||||
247 0.0086272
|
||||
157 0.0058511
|
||||
216 0.0057589
|
||||
154 0.0052615
|
||||
|
||||
```
|
||||
|
||||
</p>
|
||||
</details>
|
||||
|
||||
## Adding OpenVINO Runtime (Inference Engine) to Your Project
|
||||
|
||||
<details>
|
||||
<summary>For versions prior to 2022.1</summary>
|
||||
<p>
|
||||
|
||||
For CMake projects, set the `InferenceEngine_DIR` and when you run CMake tool:
|
||||
|
||||
```sh
|
||||
cmake -DInferenceEngine_DIR=/path/to/openvino/build/ .
|
||||
```
|
||||
|
||||
Then you can find Inference Engine by [`find_package`]:
|
||||
|
||||
```cmake
|
||||
find_package(InferenceEngine REQUIRED)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${InferenceEngine_LIBRARIES})
|
||||
```
|
||||
</p>
|
||||
</details>
|
||||
|
||||
|
||||
<details open>
|
||||
<summary>For 2022.1 and after</summary>
|
||||
<p>
|
||||
|
||||
|
||||
For CMake projects, set the `OpenVINO_DIR` and when you run CMake tool:
|
||||
|
||||
```sh
|
||||
cmake -DOpenVINO_DIR=<INSTALLDIR>/runtime/cmake .
|
||||
```
|
||||
|
||||
Then you can find OpenVINO Runtime (Inference Engine) by [`find_package`]:
|
||||
|
||||
```cmake
|
||||
find_package(OpenVINO REQUIRED)
|
||||
add_executable(ov_app main.cpp)
|
||||
target_link_libraries(ov_app PRIVATE openvino::runtime)
|
||||
|
||||
add_executable(ov_c_app main.c)
|
||||
target_link_libraries(ov_c_app PRIVATE openvino::runtime::c)
|
||||
```
|
||||
</p>
|
||||
</details>
|
||||
|
||||
## See also
|
||||
|
||||
* [OpenVINO README](../../README.md)
|
||||
* [OpenVINO Developer Documentation](index.md)
|
||||
* [OpenVINO How to Build](build.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
# Building OpenVINO static libraries
|
||||
|
||||
## Contents
|
||||
|
||||
- [Introduction](#introduction)
|
||||
- [System requirements](#system-requirements)
|
||||
- [Configure OpenVINO runtime in CMake stage](#configure-openvino-runtime-in-cmake-stage)
|
||||
- [Build static OpenVINO libraries](#build-static-openvino-libraries)
|
||||
- [Link static OpenVINO runtime](#link-static-openvino-runtime)
|
||||
- [Static OpenVINO libraries + Conditional compilation for particular models](#static-openvino-libraries--conditional-compilation-for-particular-models)
|
||||
- [Building with static MSVC Runtime](#building-with-static-msvc-runtime)
|
||||
- [Limitations](#limitations)
|
||||
- [See also](#see-also)
|
||||
|
||||
## Introduction
|
||||
|
||||
Building static OpenVINO Runtime libraries allows to additionally reduce the size of a binary when it is used together with conditional compilation.
|
||||
It is possible because not all interface symbols of OpenVINO Runtime libraries are exported to end users during a static build and can be removed by linker. See [Static OpenVINO libraries + Conditional compilation for particular models](#static-openvino-libraries--conditional-compilation-for-particular-models)
|
||||
|
||||
## System requirements
|
||||
|
||||
* CMake version 3.17 or higher must be used to build static OpenVINO libraries.
|
||||
* Supported OSes:
|
||||
* Windows x64
|
||||
* Linux x64
|
||||
* All other OSes may work, but have not been explicitly tested
|
||||
|
||||
## 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)
|
||||
* IR v7 reader (used in legacy tests only, if you are not to going to run OpenVINO tests, set `-DENABLE_TESTS=OFF` which disables IR v7 reader)
|
||||
|
||||
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_GNA=OFF \
|
||||
-DENABLE_TEMPLATE=OFF \
|
||||
-DENABLE_HETERO=OFF \
|
||||
-DENABLE_MULTI=OFF \
|
||||
-DENABLE_AUTO=OFF \
|
||||
-DENABLE_AUTO_BATCH=OFF \
|
||||
-DENABLE_OV_ONNX_FRONTEND=OFF \
|
||||
-DENABLE_OV_PADDLE_FRONTEND=OFF \
|
||||
-DENABLE_OV_TF_FRONTEND=OFF \
|
||||
-DENABLE_OV_TF_LITE_FRONTEND=OFF \
|
||||
-DENABLE_OV_PYTORCH_FRONTEND=OFF \
|
||||
-DENABLE_IR_V7_READER=OFF \
|
||||
-DENABLE_GAPI_PREPROCESSING=OFF \
|
||||
-DENABLE_INTEL_CPU=ON \
|
||||
-DENABLE_OV_IR_FRONTEND=ON
|
||||
```
|
||||
|
||||
> **NOTE**: Inference backends located in external repositories can also be used in a static build. Use `-DOPENVINO_EXTRA_MODULES=<path to external plugin root>` to enable them. `OpenVINODeveloperPackage.cmake` must not be used to build external plugins, only `OPENVINO_EXTRA_MODULES` is a working solution.
|
||||
|
||||
> **NOTE**: The `ENABLE_LTO` CMake option can also be passed to enable link time optimizations to reduce the binary size. But such property should also be enabled on the target which links with static OpenVINO libraries via `set_target_properties(<target_name> PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)`
|
||||
-
|
||||
## Build static OpenVINO libraries
|
||||
|
||||
To build OpenVINO Runtime in a static mode, you need to specify the additional CMake option:
|
||||
|
||||
```sh
|
||||
cmake -DBUILD_SHARED_LIBS=OFF <all other CMake options> <openvino_sources root>
|
||||
```
|
||||
|
||||
Then, use the usual CMake 'build' command:
|
||||
|
||||
```sh
|
||||
cmake --build . --target openvino --config Release -j12
|
||||
```
|
||||
|
||||
Then, the installation step:
|
||||
|
||||
```sh
|
||||
cmake -DCMAKE_INSTALL_PREFIX=<install_root> -P cmake_install.cmake
|
||||
```
|
||||
|
||||
The OpenVINO runtime is located in `<install_root>/runtime/lib`
|
||||
|
||||
## Link static OpenVINO Runtime
|
||||
|
||||
Once you build static OpenVINO Runtime libraries and install them, you can use one of the two ways to add them to your project:
|
||||
|
||||
### CMake interface
|
||||
|
||||
Just use CMake's `find_package` as usual and link `openvino::runtime`:
|
||||
|
||||
```cmake
|
||||
find_package(OpenVINO REQUIRED)
|
||||
target_link_libraries(<application> PRIVATE openvino::runtime)
|
||||
```
|
||||
|
||||
`openvino::runtime` transitively adds all other static OpenVINO libraries to a linker command.
|
||||
|
||||
### Pass libraries to linker directly
|
||||
|
||||
If you want to configure your project directly, you need to pass all libraries from `<install_root>/runtime/lib` to linker command.
|
||||
|
||||
> **NOTE**: Since the proper order of static libraries must be used (dependent library should come **before** dependency in a linker command), consider using the following compiler specific flags to link static OpenVINO libraries:
|
||||
|
||||
Microsoft Visual Studio compiler:
|
||||
```sh
|
||||
/WHOLEARCHIVE:<ov_library 0> /WHOLEARCHIVE:<ov_library 1> ...
|
||||
```
|
||||
|
||||
GCC like compiler:
|
||||
```sh
|
||||
gcc main.cpp -Wl,--whole-archive <all libraries from <root>/runtime/lib> > -Wl,--no-whole-archive -o a.out
|
||||
```
|
||||
|
||||
## Static OpenVINO libraries + Conditional compilation for particular models
|
||||
|
||||
OpenVINO Runtime can be compiled for particular models, as shown in the [[Conditional compilation for particular models|ConditionalCompilation]] guide.
|
||||
The conditional compilation feature can be paired with static OpenVINO libraries to build even smaller end-user applications in terms of binary size. The following procedure can be used, (based on the detailed [[Conditional compilation for particular models|ConditionalCompilation]] guide):
|
||||
|
||||
* Build OpenVINO Runtime as usual with the CMake option of `-DSELECTIVE_BUILD=COLLECT`.
|
||||
* Run target applications on target models and target platforms to collect traces.
|
||||
* Build the final OpenVINO static Runtime with `-DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=/path/*.csv -DBUILD_SHARED_LIBS=OFF`
|
||||
|
||||
## Building with static MSVC Runtime
|
||||
|
||||
In order to build with static MSVC runtime, use the special [OpenVINO toolchain](https://github.com/openvinotoolkit/openvino/blob/master/cmake/toolchains/mt.runtime.win32.toolchain.cmake) file:
|
||||
|
||||
```sh
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=<openvino source dir>/cmake/toolchains/mt.runtime.win32.toolchain.cmake <other options>
|
||||
```
|
||||
|
||||
> **NOTE**: all other dependent application and libraries must be built with the same `mt.runtime.win32.toolchain.cmake ` toolchain to have conformed values of the `MSVC_RUNTIME_LIBRARY` target property.
|
||||
|
||||
## Limitations
|
||||
|
||||
* 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
|
||||
* CPU and GNA inference plugins (**GPU and MYRIAD are not enabled**)
|
||||
* MULTI, HETERO, AUTO, and BATCH inference modes
|
||||
* IR, ONNX, PDPD, and TF 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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user