From 91cde333cb33b387dc19367c69aeb6b476cd4346 Mon Sep 17 00:00:00 2001 From: Sebastian Golebiewski Date: Thu, 1 Feb 2024 11:02:35 +0100 Subject: [PATCH] [DOCS] Port docs patches for 23.3 (#22590) * Porting 21679 - fixing typo * Porting 22571 - specify number of jobs in build --- .../basic_quantization_flow.rst | 18 +++++++++--------- docs/dev/build_linux.md | 11 ++++++++--- docs/dev/build_windows.md | 14 +++++++------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/docs/articles_en/openvino_workflow/model_optimization_guide/ptq_introduction/basic_quantization_flow.rst b/docs/articles_en/openvino_workflow/model_optimization_guide/ptq_introduction/basic_quantization_flow.rst index 6e44f1c9c2fed6..7b17cac251d047 100644 --- a/docs/articles_en/openvino_workflow/model_optimization_guide/ptq_introduction/basic_quantization_flow.rst +++ b/docs/articles_en/openvino_workflow/model_optimization_guide/ptq_introduction/basic_quantization_flow.rst @@ -39,14 +39,14 @@ The transformation function is a function that takes a sample from the dataset a .. tab-item:: OpenVINO :sync: openvino - + .. doxygensnippet:: docs/optimization_guide/nncf/ptq/code/ptq_openvino.py :language: python :fragment: [dataset] .. tab-item:: PyTorch :sync: pytorch - + .. doxygensnippet:: docs/optimization_guide/nncf/ptq/code/ptq_torch.py :language: python :fragment: [dataset] @@ -78,14 +78,14 @@ See the `example section <#examples-of-how-to-apply-nncf-post-training-quantizat .. tab-item:: OpenVINO :sync: openvino - + .. doxygensnippet:: docs/optimization_guide/nncf/ptq/code/ptq_openvino.py :language: python :fragment: [quantization] .. tab-item:: PyTorch :sync: pytorch - + .. doxygensnippet:: docs/optimization_guide/nncf/ptq/code/ptq_torch.py :language: python :fragment: [quantization] @@ -103,7 +103,7 @@ See the `example section <#examples-of-how-to-apply-nncf-post-training-quantizat .. doxygensnippet:: docs/optimization_guide/nncf/ptq/code/ptq_tensorflow.py :language: python :fragment: [quantization] - + After that the model can be converted into the OpenVINO Intermediate Representation (IR) if needed, compiled and run with OpenVINO. If you have not already installed OpenVINO developer tools, install it with ``pip install openvino-dev``. @@ -112,14 +112,14 @@ If you have not already installed OpenVINO developer tools, install it with ``pi .. tab-item:: OpenVINO :sync: openvino - + .. doxygensnippet:: docs/optimization_guide/nncf/ptq/code/ptq_openvino.py :language: python :fragment: [inference] .. tab-item:: PyTorch :sync: pytorch - + .. doxygensnippet:: docs/optimization_guide/nncf/ptq/code/ptq_torch.py :language: python :fragment: [inference] @@ -137,7 +137,7 @@ If you have not already installed OpenVINO developer tools, install it with ``pi .. doxygensnippet:: docs/optimization_guide/nncf/ptq/code/ptq_tensorflow.py :language: python :fragment: [inference] - + Tune quantization parameters ############################ @@ -156,7 +156,7 @@ Tune quantization parameters .. code-block:: sh - nncf.quantize(model, dataset, preset=nncf.Preset.MIXED) + nncf.quantize(model, dataset, preset=nncf.QuantizationPreset.MIXED) * ``fast_bias_correction`` - when set to ``False``, enables a more accurate bias (error) correction algorithm that can be used to improve the accuracy of the model. This parameter is available only for OpenVINO and ONNX representations. ``True`` is used by default to minimize quantization time. diff --git a/docs/dev/build_linux.md b/docs/dev/build_linux.md index eb98cb2c744ac6..5f6ee6f69725f7 100644 --- a/docs/dev/build_linux.md +++ b/docs/dev/build_linux.md @@ -7,7 +7,7 @@ The software was validated on: > **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 +## Software requirements - [CMake](https://cmake.org/download/) 3.13 or higher - GCC 7.5 or higher to build OpenVINO Runtime @@ -53,7 +53,12 @@ The software was validated on: cmake -DCMAKE_BUILD_TYPE=Release .. make --jobs=$(nproc --all) ``` -The process may take some time to finish. + + The process may take some time to finish. If you are using a system with limited resources, it is recommended to specify a lower number of parallel jobs to avoid overloading your system. This can help maintain system responsiveness and stability during the build process. Use `nproc` to find the number of available processing units. For example, to use 8 parallel jobs, run the following command: + ```sh + cmake --build . --parallel 8 + ``` + ### Additional Build Options @@ -80,7 +85,7 @@ You can use the following additional build options: ```sh pip install -r /src/bindings/python/wheel/requirements-dev.txt ``` - 4. After the build process finishes, export the newly built Python libraries to the user environment variables: + 4. After the build process finishes, export the newly built Python libraries to the user environment variables: ``` export PYTHONPATH=/bin/intel64/Release/python:$PYTHONPATH export LD_LIBRARY_PATH=/bin/intel64/Release:$LD_LIBRARY_PATH diff --git a/docs/dev/build_windows.md b/docs/dev/build_windows.md index bd326803513767..d8b438b6d6da18 100644 --- a/docs/dev/build_windows.md +++ b/docs/dev/build_windows.md @@ -6,16 +6,16 @@ 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 +## 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. + > **NOTE**: Native Microsoft Visual Studio for WoA is available since 2022. - Python 3.8 - 3.11 for OpenVINO Runtime Python API - > **NOTE**: Python for ARM64 is available since [3.11](https://www.python.org/downloads/windows/) version. + > **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`. + > **NOTE**: After installation, make sure `clang-cl` compiler is available from `PATH`. ## How to build @@ -37,14 +37,14 @@ Supported configurations: ```sh cmake -G "Visual Studio 17 2022" ``` - + > **HINT**: **Generating PDB Files and Debugging Your Build**
> If you intend to generate PDB files and debug your build, it is essential to set the CMake build type appropriately. > You should utilize one of the following CMake build type options:
>* `-DCMAKE_BUILD_TYPE=RelWithDebInfo`: This option generates PDB files with release information, making it suitable for debugging optimized builds.
- >* `-DCMAKE_BUILD_TYPE=Debug`: This option generates PDB files optimized for debugging, providing comprehensive debugging information. + >* `-DCMAKE_BUILD_TYPE=Debug`: This option generates PDB files optimized for debugging, providing comprehensive debugging information. -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. +4. Build generated solution in Visual Studio or run `cmake --build . --config Release --verbose -j` to build from the command line. View the number of available processing units with `WMIC cpu get numberofLogicalProcessors`. 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 `/temp/tbb/bin` folder.