Skip to content

Commit 871b0b7

Browse files
snapdragon: update toolchain to v0.6 (ggml-org#23369)
* snapdragon: update compiler flags to enable all CPU features * snapdragon: update readme to point to toolchain v0.6 * snapdragon: bump toolchain docker to v0.6
1 parent b39a7bf commit 871b0b7

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/build-and-test-snapdragon.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
android-ndk-snapdragon:
3232
runs-on: ubuntu-latest
3333
container:
34-
image: 'ghcr.io/snapdragon-toolchain/arm64-android:v0.3'
34+
image: 'ghcr.io/snapdragon-toolchain/arm64-android:v0.6'
3535
defaults:
3636
run:
3737
shell: bash
@@ -61,7 +61,7 @@ jobs:
6161
linux-iot-snapdragon:
6262
runs-on: ubuntu-latest
6363
container:
64-
image: 'ghcr.io/snapdragon-toolchain/arm64-linux:v0.1'
64+
image: 'ghcr.io/snapdragon-toolchain/arm64-linux:v0.6'
6565
defaults:
6666
run:
6767
shell: bash

docs/backend/snapdragon/CMakeUserPresets.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"ANDROID_ABI": "arm64-v8a",
1111
"ANDROID_PLATFORM": "android-31",
1212
"CMAKE_TOOLCHAIN_FILE": "$env{ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake",
13-
"CMAKE_C_FLAGS": "-march=armv8.7a+fp16 -fvectorize -ffp-model=fast -fno-finite-math-only -flto -D_GNU_SOURCE",
14-
"CMAKE_CXX_FLAGS": "-march=armv8.7a+fp16 -fvectorize -ffp-model=fast -fno-finite-math-only -flto -D_GNU_SOURCE",
13+
"CMAKE_C_FLAGS": "-march=armv8.7a+fp16+dotprod+i8mm -fvectorize -ffp-model=fast -fno-finite-math-only -flto -D_GNU_SOURCE",
14+
"CMAKE_CXX_FLAGS": "-march=armv8.7a+fp16+dotprod+i8mm -fvectorize -ffp-model=fast -fno-finite-math-only -flto -D_GNU_SOURCE",
1515
"CMAKE_C_FLAGS_RELEASE": "-O3 -DNDEBUG",
1616
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG",
1717
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-O3 -DNDEBUG -g",
@@ -59,8 +59,8 @@
5959
"toolset": { "value": "host=x86_64", "strategy": "external" },
6060
"cacheVariables": {
6161
"CMAKE_TOOLCHAIN_FILE": "cmake/arm64-linux-clang.cmake",
62-
"CMAKE_C_FLAGS": "-march=armv8 -fno-finite-math-only -flto -D_GNU_SOURCE",
63-
"CMAKE_CXX_FLAGS": "-march=armv8 -fno-finite-math-only -flto -D_GNU_SOURCE",
62+
"CMAKE_C_FLAGS": "-march=armv8.2a+fp16+dotprod -fvectorize -fno-finite-math-only -flto -D_GNU_SOURCE",
63+
"CMAKE_CXX_FLAGS": "-march=armv8.2a+fp16+dotprod -fvectorize -fno-finite-math-only -flto -D_GNU_SOURCE",
6464
"CMAKE_C_FLAGS_RELEASE": "-O3 -DNDEBUG",
6565
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG",
6666
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-O3 -DNDEBUG -g",

docs/backend/snapdragon/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This image includes Android NDK, OpenCL SDK, Hexagon SDK, CMake, etc.
1010
This method works on Linux, macOS, and Windows. macOS and Windows users should install Docker Desktop.
1111

1212
```
13-
~/src/llama.cpp$ docker run -it -u $(id -u):$(id -g) --volume $(pwd):/workspace --platform linux/amd64 ghcr.io/snapdragon-toolchain/arm64-android:v0.3
13+
~/src/llama.cpp$ docker run -it -u $(id -u):$(id -g) --volume $(pwd):/workspace --platform linux/amd64 ghcr.io/snapdragon-toolchain/arm64-android:v0.6
1414
[d]/> cd /workspace
1515
```
1616

0 commit comments

Comments
 (0)