Install CMake version >= 3.13 from https://cmake.org/download/.
Tip:
Your editor of choice likely has plugins for CMake, such as the Visual Studio Code CMake Tools extension.
We recommend MSVC from either the full Visual Studio or from “Build Tools For Visual Studio”:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\BinUsing your shell of choice (such as PowerShell or cmder), clone the repository and initialize its submodules:
$ git clone https://github.com/google/iree.git $ cd iree $ git submodule update --init
Tip:
Editors and other programs can also clone the repository, just make sure that they initialize the submodules.
Configure:
$ cmake -B build\ .
Tip:
The root CMakeLists.txt file has options for configuring which parts of the project to enable.
Build all targets:
$ cmake --build build\ -j 8
Check out the contents of the ‘tools’ build directory:
$ dir build\iree\tools\Debug $ .\build\iree\tools\Debug\iree-translate.exe --help
Translate a MLIR file and execute a function in the compiled module:
$ .\build\iree\tools\Debug\iree-run-mlir.exe %cd%/iree/tools/test/simple.mlir -input-value="i32=-2" -iree-hal-target-backends=vmla -print-mlir
More documentation coming soon...