diff --git a/README.md b/README.md index f480734bb8233db47e535697f94403aca94c5b1d..cfd4329d1bf3e8b86598a53fafb501fde46f5f0e 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,47 @@ Some of the data types currently supported with the KleidiAI library are the fol +

How to build

+ +

Prerequisites

+ +KleidiAI requires the following dependencies, obtainable via your preferred package manager, to be installed and available on your system to be able to build the project. + +- `build-essential` +- `cmake >= 3.18` + +In addition, you may choose to use the following toolchains: + +- (Optional) `Arm GNU toolchain` available to download from the [Arm Developer](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads) website. +- (Optional) `Android NDK` available to download from the [Android Developer](https://developer.android.com/ndk/downloads/index.html) website. + +

Compile natively on an Arm®-based system

+ +You can quickly compile the project on your system with an Arm® processor by using the following commands: + +```shell +cmake -DCMAKE_BUILD_TYPE=Release -S . -B build/ +cmake --build ./build +``` + +

Cross-compile to Android™

+ +Cross-compiling for Android systems requires the Android NDK toolset. The downloaded NDK contains the CMake toolchain file necessary for cross-compiling the project and must be provided to CMake with the `-DCMAKE_TOOLCHAIN_FILE` option. + +```shell +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -S . -B build/ +cmake --build ./build +``` + +

Cross-compile to Linux

+ +The Arm GNU toolchain can be used to cross-compile the project to a Linux system with an Arm® processor like a Raspberry Pi from an x86_64 Linux host machine. This requires specifying the target triple `aarch64-none-linux-gnu-` in the CMake C and CXX compiler options. + +```shell +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=aarch64-none-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-none-linux-gnu-g++ -S . -B build/ +cmake --build ./build +``` +

Release Cadence

The release is a tagged version of the source code. After the first official release (v0.1.0), releases will be made at least once every 3 months. The goal is a predictable and shorter time span between the releases. Until that point is