Skip to content

Add llama-bench for android #8

Add llama-bench for android

Add llama-bench for android #8

name: Android ARM64 llama-bench Build
on:
workflow_dispatch:
push:
branches:
- benchmarks
pull_request:
branches:
- benchmarks
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# https://developer.android.com/ndk/downloads
NDK_VERSION: "29.0.14206865"
jobs:
android-arm64-llama-bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: ggml-org/ccache-action@v1.2.16
with:
key: android-arm64-llama-bench
- uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
- uses: android-actions/setup-android@v3
with:
log-accepted-android-sdk-licenses: false
- run: |
sdkmanager "ndk;${{ env.NDK_VERSION }}"
echo "ANDROID_NDK=${ANDROID_SDK_ROOT}/ndk/${{ env.NDK_VERSION }}" >> $GITHUB_ENV
- run: |
cmake -B build -G Ninja \
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-28 \
-DCMAKE_BUILD_TYPE=Release \
-DGGML_NATIVE=OFF \
-DGGML_BACKEND_DL=ON \
-DGGML_CPU_ALL_VARIANTS=ON \
-DLLAMA_CURL=OFF \
-DGGML_OPENMP=OFF \
-DLLAMA_BUILD_TOOLS=ON \
-DLLAMA_BUILD_EXAMPLES=OFF \
-DLLAMA_BUILD_TESTS=OFF \
-DLLAMA_BUILD_SERVER=OFF
cmake --build build --config Release --target llama-bench
- uses: actions/upload-artifact@v4
with:
name: llama-bench-android-arm64-v8a
path: build/bin/*
if-no-files-found: error