* Initial commit for proxy plugin * Include proxy to openvino library * Fixed some tests * Added plugin properties * Added readme * Support Compile model for the proxy plugin * Fixed python * Remove gmock * Fixed some tests * Fixed load plugin tests * Removed internal PROXY_FALLBACK_PRIORITIES initialization property * Fixed code style * Added new tests * Create architecture.md * Fixed some proxy tests * Implement not implemented functions * Fixed ICore mock * Remove redundant code * Added import/export tests * Fixed hetero import/export tests * Fixed ICore mock * Fixed import tests * Fixed build * Remove redundant parse config * Fixed some comments * Try to fix Windows build * Fixed incorrect logic * Small fix in tests * Fixed python API * Fixed typo * Try to fix python * Switch GPU under proxy * Fixed GPU name * Revert GPU plugin under proxy * Small changes in CMake files * Temp commit * Build without proxy * Revert "Temp commit" This reverts commit1ac9824bdf. * Fixed test linking * Removed tests from ncc check * Add option to disable proxy plugin * Fixed minor comments * Disable some proxy tests if IR frontend is disabled * Enable Intel GPU under the proxy * Fixed typo * Fixed segfault in tests * Small fix for case if only GPU is registered * Fixed code style * Added remote context tests * Added proxy tests to CI * Fixed mock engine * Test change * Revert "Test change" This reverts commit2d1d67766f. * Add new tests * Removed some tests * Revert "Removed some tests" This reverts commit090398652f. * Revert incorrect logic * Removed unused variables * Use original name for the GPU plugin * Fixed CMake * Do not show hidden devices * Try to fix GPU remote context * Fixed GPU plugin build * Added interface for proxy remote context * Remove local properties * Remove redundant API * Fixed typo * Added remote tensors * Fixed code style * Fixed some comments * Unwrap remote tensors before conversion to Blob * Added cast for legacy API * Fixed some cldnn tests * Do not add preprocessing for proxy plugin * Enabled more tests and wrap tensors in infer request * Use hardware request inside conversion wrapper * Fixed hand on cache calculation * Try to fix some tests * Support set tensor for remote tensors in proxy plugin * Revert "Support set tensor for remote tensors in proxy plugin" This reverts commit5a927de590. * Remove redundant friend from compiled model and fix life time for infer request * Fixed code style * Add additional so pointers to the tensor * Rewrite approach for compile model and tensor * Removed API from proxy * Fixed is/as Blob for wrapped Blobs * Wrap tensor when set tensor to plugin * Fixed recursive call * Don't unwrap tensors for AUTO plugin * Fixed Some Multi tests with remote blob for proxy * Align context name with tests * Fixed code style * Try to fix more tests * Some minor changes * Try to fix OVHoldersTests * Try to save low level SO in high level wrappers * Revert "Try to save low level SO in high level wrappers" This reverts commit430ff8a526. * Revert "Try to fix OVHoldersTests" This reverts commit32604f0d3e. * Disable some tests * Fixed DynamicBatchShapeTests * Fixed caching tests and skip OVHoldersTest * Small refactoring * Fixed import model * Small fix * Fix typo which causes fails of caching tests * Disabled AUTO BATCH for proxy device * Support Export in Auto batch * Small changes * Fixed initialization fallback to plugin with proxy name * Added more values for tests * Ask all devices and create context if no device id * Support export in auto batch * Fixed some comments * Fixed some comments and removed auto batch * Fixed some comments * Fixed auto batch test and some comments * Fixed build * Removed proxy plugin class from dev api * Fixed code style * Fixed disabled tests
11 KiB
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
- Options affecting binary size
- Building with custom OpenCV
- Building with custom TBB
- Test capabilities
- Other options
Disable / enable plugins build and other components
- Inference plugins:
ENABLE_INTEL_CPUenables CPU plugin compilation:ONis default for x86 platforms;OFF, otherwise.
ENABLE_INTEL_GPUenables Intel GPU plugin compilation:ONis default for x86 platforms; not available, otherwise.
ENABLE_INTEL_GNAenables GNA plugin compilation:ONis default for x86 platforms; not available, otherwise.
ENABLE_HETEROenables HETERO plugin build:ONis default.
ENABLE_MULTIenables MULTI plugin build:ONis default.
ENABLE_AUTOenables AUTO plugin build:ONis default.
ENABLE_TEMPLATEenables TEMPLATE plugin build:ONis default.
ENABLE_AUTO_BATCHenables Auto Batch plugin build:ONis default.
ENABLE_PROXYenables Proxy plugin compilation:ONis default.
- Frontends to work with models from frameworks:
ENABLE_OV_ONNX_FRONTENDenables ONNX frontend plugin for OpenVINO Runtime:ONis default.
ENABLE_OV_PADDLE_FRONTENDenables PDPD frontend plugin for OpenVINO Runtime:ONis default.
ENABLE_OV_TF_FRONTENDenables TensorFlow frontend plugin for OpenVINO Runtime:ONis default.
ENABLE_OV_TF_LITE_FRONTENDenables TensorFlow Lite frontend plugin for OpenVINO Runtime:ONis default.
ENABLE_OV_PYTORCH_FRONTENDenables PyTorch frontend plugin for OpenVINO Runtime:ONis default.
ENABLE_OV_IR_FRONTENDenables OpenVINO Intermediate Representation frontend plugin for OpenVINO Runtime:ONis default.
ENABLE_GAPI_PREPROCESSINGenables G-API preprocessing:ONis default.
OPENVINO_EXTRA_MODULESspecifies path to add extra OpenVINO modules to the build.- See OpenVINO Contrib to add extra modules from.
ENABLE_SAMPLESenables OpenVINO Runtime samples build:ONis default.
ENABLE_PYTHONenables Python API build:ONif python requirements are satisfied (auto-discovered by CMake).
ENABLE_WHEELenables Python OpenVINO Runtime and Development wheels build:ONif requirements are satisfied (auto-discovered by CMake).
ENABLE_TESTSenables tests compilation:OFFis default.
ENABLE_IR_V7_READERenables IR v7 reader:ONis default. Note: must be turnedOFFwhen building OpenVINO runtime as static
ENABLE_DOCSenables building the OpenVINO documentation:OFFis on Debian (Ubuntu) OSesOFFis in other cases.
ENABLE_SYSTEM_PUGIXMLbuilds with system version of pugixml if it is available on the system.ONis default.- OpenVINO thirdparty pugixml is used by default.
ENABLE_SYSTEM_PROTOBUFuse protobuf installed on the system (used by ONNX, PaddlePaddle and TensorFlow frontends):OFFis default.
ENABLE_SYSTEM_FLATBUFFERSuse FlatBuffers installed on the system (used by Tensorflow Lite frontend):ONis default.
ENABLE_SYSTEM_TBBuse TBB installed on the system:ONis on Debian (Ubuntu) OSes.OFFis in other cases.
ENABLE_SYSTEM_OPENCLuse OpenCL installed on the system:ONis default.
Options affecting binary size
ENABLE_LTOboolean option to enable Link Time Optimizations:OFFis default, because it takes longer time to link binaries.ONis 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.
THREADINGpoints to the OpenVINO threading interface:TBBis the default option, which enables build with Intel TBB andtbb::static_partitioner.TBB_AUTOenables building with Intel TBB.OMPenables building with Intel OpenMP.SEQdisables 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_5enables prebuilt static TBBBind 2.5 usage:ONis 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_5toOFF
- make sure libtbbbind.so is in the same folder as libtbb.so. For example, oneTBB package on Ubuntu 22.04 has libtbbbind missed. https://bugs.launchpad.net/ubuntu/+source/onetbb/+bug/2006898
- oneTBB relies on higher version hwloc to recognize hybrid CPU core types correctly, on some machines, they require higher hwloc version to work correctly. Check if hwloc-info --version returns hwloc version >= 2.7.0, Ubuntu 20.04 with hwloc 2.1.0
ENABLE_SSE42enables SSE4.2 optimizations:ONis 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_AVX2enables AVX2 optimizations:ONis 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_AVX512Fenables AVX512 optimizations:ONis 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_ITTenables profiling with Intel ITT and VTune.OFFis default, because it increases binary size.
SELECTIVE_BUILDenables Conditional compilation feature.OFFis 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:
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:
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.
Note: reference to oneTBB Note in Options affecting binary size
Test capabilities
ENABLE_SANITIZERbuilds with clang address sanitizer support:OFFis default.
ENABLE_THREAD_SANITIZERbuilds with clang thread-sanitizer support:OFFis default.
ENABLE_COVERAGEadds option to enable coverage. See dedicated guide how to measure test coverage:OFFis default.
ENABLE_FUZZINGenables instrumentation of code for fuzzing:OFFis default.
Other options
ENABLE_CPPLINTenables code style check using cpplint static code checker:ONis default.
ENABLE_CLANG_FORMATenables Clang format code style check:ONis default.- Used only for ngraph component.
TREAT_WARNING_AS_ERRORtreats all warnings as an error:OFFis default.
ENABLE_FASTER_BUILDenables precompiled headers and unity build using CMake:OFFis default.
ENABLE_INTEGRITYCHECKbuilds DLLs with /INTEGRITYCHECK flag:OFFis default.- Available on MSVC compiler only.
ENABLE_QSPECTREbuilds with /Qspectre flag:OFFis default.- Available on MSVC compiler only.