-
Notifications
You must be signed in to change notification settings - Fork 2.3k
BuildingForWindows
OpenVINO can be compiled for different architectures on Windows: X64 or ARM64. But in order to build for ARM64 architecture, the machine with Windows on ARM is required, because only native compilation is supported (see similar documents 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
- CMake* 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 version.
- Git for Windows*
- (Windows on ARM only) LLVM for Windows on ARM (WoA)
NOTE: After installation, make sure
clang-cl
compiler is available fromPATH
.
-
Clone submodules:
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:
git clone https://github.com/openvinotoolkit/openvino_contrib.git cd openvino_contrib git submodule update --init --recursive
-
Create build directory:
mkdir build && cd build
-
In the
build
directory, runcmake
to fetch project dependencies and generate a Visual Studio solution.On Windows x86 64-bits:
cmake -G "Visual Studio 16 2019" -DCMAKE_BUILD_TYPE=Release <openvino>
On Windows on ARM for ARM64 architecture:
cmake -G "Visual Studio 16 2019" -DOPENVINO_EXTRA_MODULES=<openvino_contrib>/modules/arm_plugin -DCMAKE_BUILD_TYPE=Release <openvino>
-
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. -
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.
- First, install all additional packages (e.g., cython and opencv) listed in the
<openvino>\src\bindings\python\src\compatibility\openvino\requirements-dev.txt
file:pip install -r requirements-dev.txt
- Second, enable the
-DENABLE_PYTHON=ON
in the CMake (Step #4) option above. To specify an exact Python version, use the following options:-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"
- To build a wheel package (.whl), enable the
-DENABLE_WHEEL=ON
option in the CMake step above (Step 4): - After the build process finishes, export the newly built Python libraries to the user environment variables:
or install the wheel with pip:
set PYTHONPATH=<openvino_repo>/bin/<arch>/Release/python_api/python3.11;%PYTHONPATH% set OPENVINO_LIB_PATH=<openvino_repo>/bin/<arch>/Release;%OPENVINO_LIB_PATH%
pip install build/wheel/openvino-2023.0.0-9612-cp11-cp11-win_arm64.whl
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
© Copyright 2018-2024, OpenVINO team
- Home
- General resources
- How to build
-
Developer documentation
- Inference Engine architecture
- CPU plugin
- GPU plugin
- HETERO plugin architecture
- Snippets
- Sample for IE C++/C/Python API
- Proxy plugin (Concept)
- Tests