Building the ML SDK for Vulkan®

The ML SDK for Vulkan® consists of four components:

These can be built from the ML SDK for Vulkan® root repository or individually from their respective repositories.

The build system must have:

  • CMake 3.25 or later.

  • C/C++ 17 compiler: GCC, or optionally Clang on Linux and MSVC on Windows®.

  • Python 3.10 or later. Required python libraries for building are listed in tooling-requirements.txt.

  • Flatbuffers flatc compiler.

  • Doxygen 1.9.1 or later. (When building documentation)

The following dependencies are also needed:

For building the ML SDK for Vulkan® components, run the following command:

./scripts/build.py

If the ML SDK for Vulkan® components are installed in custom locations, specify their paths by adding the following command line option:

./scripts/build.py --$COMPONENT_NAME $PATH_TO_COMPONENT

COMPONENT_NAME, with the respective default relative locations within paranthesis, can be:

  • vgf-lib (sw/vgf-lib)

  • model-converter (sw/model-converter)

  • scenario-runner (sw/scenario-runner)

  • emulation-layer (sw/emulation-layer)

Similarly, dependencies with custom install locations need to be specifed. For instance if glslang was installed at $GLSLANG_REPO_PATH, use the following:

./scripts/build.py --glslang-path $GLSLANG_REPO_PATH

Upon a sparse checkout, missing components will be skipped during building. Note that some components have strict dependencies on each other, with VGF Library being required by Scenario Runner and Model Converter.

The build artifacts can be installed into a specified location by passing the option --install with the required path.

To create an archive with the build artifacts, add the option --package. The archive will be stored in the provided location.

Build the documentation

To build the documentation, run the following command:

./scripts/build.py --doc

More command line options

For more command line options, consult the program help:

./scripts/build.py --help

For more information about building the ML SDK for Vulkan®, see the following build instructions: