[DOC] Conditional compilation developer guide review (#14340)
* conditional compilation review * additional fixes * apply comment from review
This commit is contained in:
1 parent
1af95fb3f8
commit
b76168b32b
3 files changed
+68
-66
No files matched your search
@@ -9,21 +9,21 @@
|
||||
|
||||
## Introduction
|
||||
|
||||
Conditional compilation can significantly reduce OpenVINO™ binaries size by excluding unnecessary components for particular models inference.
|
||||
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:
|
||||
* Openrations and graph transformations in OpenVINO and plugins
|
||||
* jit kernels in a CPU plugin
|
||||
* arbitrary code that is not used for particular model inference
|
||||
* Operations and graph transformations in OpenVINO and plugins,
|
||||
* jit kernels in a CPU plugin,
|
||||
* arbitrary code that is not used for particular model inference.
|
||||
|
||||
However, conditional compilation has a significant drawback - **the resulting OpenVINO Runtime will work only with a limited set of models and devices.**
|
||||
However, the conditional compilation has a significant drawback - **the resulting OpenVINO Runtime will work only with a limited set of models and devices.**
|
||||
|
||||
There are 2 conditional compilation build stages: `SELECTIVE_BUILD=COLLECT` and `SELECTIVE_BUILD=ON`.
|
||||
There are two conditional compilation build stages: `SELECTIVE_BUILD=COLLECT` and `SELECTIVE_BUILD=ON`.
|
||||
|
||||
`SELECTIVE_BUILD=COLLECT` enables analyzed mode for annotated code regions, it can provide capability with the help of itt to collect some statistic data. Once this stage is completed, user need run openvino sample(such as benchmark_app) to generate actual statistic data and run `itt_collector tool` to dump them into cvs files. This statge can be enabled during build OpenVINO with options `-DSELECTIVE_BUILD=COLLECT -DENABLE_PROFILING_ITT=ON`
|
||||
`SELECTIVE_BUILD=COLLECT` enables analysis mode for annotated code regions. It can be used to collect statistics data using `itt`. Once this stage is completed, run an OpenVINO sample, such as benchmark_app, to generate actual statistic data. Then run `itt_collector tool` to dump the data into cvs files. This statge can be enabled during the OpenVINO build with the options `-DSELECTIVE_BUILD=COLLECT -DENABLE_PROFILING_ITT=ON`.
|
||||
|
||||
`SELECTIVE_BUILD=ON` excludes all annotated inactive code region out of compiled binaries with help of `cvs files` generated by `itt_collector tool`. It is done by a header file which generated from the `cvs files`. This stage need build OpenVINO with option `-DSELECTIVE_BUILD=ON -DENABLE_PROFILING_ITT=OFF -DSELECTIVE_BUILD_STAT=<cc_data.csv>`. Notice: `-DENABLE_PROFILING_ITT=OFF` is not must, if user wants to have ITT counters in final application, he can set it ON: `-DENABLE_PROFILING_ITT=ON`.
|
||||
`SELECTIVE_BUILD=ON` excludes all inactive annotated code regions from the compiled binaries using `cvs files` generated by the `itt_collector tool`. It is done by a header file which generated from the `cvs files`. This stage need build OpenVINO with option `-DSELECTIVE_BUILD=ON -DENABLE_PROFILING_ITT=OFF -DSELECTIVE_BUILD_STAT=<cc_data.csv>`. Notice: `-DENABLE_PROFILING_ITT=OFF` is not must, if user wants to have ITT counters in final application, he can set it ON: `-DENABLE_PROFILING_ITT=ON`.
|
||||
|
||||
Note: If above options are not enabled, conditional compilation will be OFF and default behavior is kept, all features of OpenVINO are enabled. You can ignore `SELECTIVE_BUILD` or set option `-DSELECTIVE_BUILD=OFF`
|
||||
> **NOTE**: If the above options are not enabled, conditional compilation will be OFF and the default behavior is kept, all OpenVINO features are enabled. You can ignore `SELECTIVE_BUILD` or set option `-DSELECTIVE_BUILD=OFF`.
|
||||
|
||||
### Setup environment
|
||||
|
||||
|
||||
Reference in new issue
Block a user