Skip to content

Commit 908eef8

Browse files
authored
Add llama-bench for android (#1)
1 parent 7d77f07 commit 908eef8

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Android ARM64 llama-bench Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- benchmarks
8+
9+
pull_request:
10+
branches:
11+
- benchmarks
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
env:
18+
# https://developer.android.com/ndk/downloads
19+
NDK_VERSION: "29.0.14206865"
20+
21+
jobs:
22+
android-arm64-llama-bench:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v5
27+
28+
- uses: ggml-org/ccache-action@v1.2.16
29+
with:
30+
key: android-arm64-llama-bench
31+
32+
- uses: actions/setup-java@v3
33+
with:
34+
java-version: "17"
35+
distribution: "temurin"
36+
37+
- uses: android-actions/setup-android@v3
38+
with:
39+
log-accepted-android-sdk-licenses: false
40+
41+
- run: |
42+
sdkmanager "ndk;${{ env.NDK_VERSION }}"
43+
echo "ANDROID_NDK=${ANDROID_SDK_ROOT}/ndk/${{ env.NDK_VERSION }}" >> $GITHUB_ENV
44+
45+
- run: |
46+
cmake -B build -G Ninja \
47+
-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK}/build/cmake/android.toolchain.cmake \
48+
-DANDROID_ABI=arm64-v8a \
49+
-DANDROID_PLATFORM=android-28 \
50+
-DCMAKE_BUILD_TYPE=Release \
51+
-DGGML_NATIVE=OFF \
52+
-DGGML_BACKEND_DL=ON \
53+
-DGGML_CPU_ALL_VARIANTS=ON \
54+
-DLLAMA_CURL=OFF \
55+
-DGGML_OPENMP=OFF \
56+
-DLLAMA_BUILD_TOOLS=ON \
57+
-DLLAMA_BUILD_EXAMPLES=OFF \
58+
-DLLAMA_BUILD_TESTS=OFF \
59+
-DLLAMA_BUILD_SERVER=OFF
60+
cmake --build build --config Release --target llama-bench
61+
62+
- uses: actions/upload-artifact@v4
63+
with:
64+
name: llama-bench-android-arm64-v8a
65+
path: build/bin/*
66+
if-no-files-found: error

0 commit comments

Comments
 (0)