The ML SDK for Vulkan® is an SDK to facilitate the development of projects using the ML extensions for Vulkan®.
This repository contains scripts to facilitate building all the ML SDK for Vulkan® components, utilities, and documentation.
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:
- Argument Parser for Modern C++.
- LLVM.
- TOSA Serialization Library.
- TOSA MLIR Translator.
- JSON for Modern C++.
- pybind11.
- GoogleTest. Optional, for testing.
- glslang.
- SPIRV-Headers.
- SPIRV-Tools.
- SPIRV-Cross.
- Vulkan-Headers.
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.
To build the documentation, run the following command:
./scripts/build.py --doc
For more command line options, consult the program help:
./scripts/build.py --help
If you believe you have discovered a security issue please refer to the Security Section
Arm® is a registered trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
Khronos®, Vulkan® and SPIR-V™ are registered trademarks of the Khronos® Group.