snapdragon: update toolchain to v0.6 (#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
This commit is contained in:
Max Krasnyansky
2026-05-19 22:04:04 -07:00
committed by GitHub
parent b39a7bf1b0
commit 871b0b70f8
3 changed files with 7 additions and 7 deletions
@@ -31,7 +31,7 @@ jobs:
android-ndk-snapdragon: android-ndk-snapdragon:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: 'ghcr.io/snapdragon-toolchain/arm64-android:v0.3' image: 'ghcr.io/snapdragon-toolchain/arm64-android:v0.6'
defaults: defaults:
run: run:
shell: bash shell: bash
@@ -61,7 +61,7 @@ jobs:
linux-iot-snapdragon: linux-iot-snapdragon:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: 'ghcr.io/snapdragon-toolchain/arm64-linux:v0.1' image: 'ghcr.io/snapdragon-toolchain/arm64-linux:v0.6'
defaults: defaults:
run: run:
shell: bash shell: bash
@@ -10,8 +10,8 @@
"ANDROID_ABI": "arm64-v8a", "ANDROID_ABI": "arm64-v8a",
"ANDROID_PLATFORM": "android-31", "ANDROID_PLATFORM": "android-31",
"CMAKE_TOOLCHAIN_FILE": "$env{ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake", "CMAKE_TOOLCHAIN_FILE": "$env{ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake",
"CMAKE_C_FLAGS": "-march=armv8.7a+fp16 -fvectorize -ffp-model=fast -fno-finite-math-only -flto -D_GNU_SOURCE", "CMAKE_C_FLAGS": "-march=armv8.7a+fp16+dotprod+i8mm -fvectorize -ffp-model=fast -fno-finite-math-only -flto -D_GNU_SOURCE",
"CMAKE_CXX_FLAGS": "-march=armv8.7a+fp16 -fvectorize -ffp-model=fast -fno-finite-math-only -flto -D_GNU_SOURCE", "CMAKE_CXX_FLAGS": "-march=armv8.7a+fp16+dotprod+i8mm -fvectorize -ffp-model=fast -fno-finite-math-only -flto -D_GNU_SOURCE",
"CMAKE_C_FLAGS_RELEASE": "-O3 -DNDEBUG", "CMAKE_C_FLAGS_RELEASE": "-O3 -DNDEBUG",
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG", "CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG",
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-O3 -DNDEBUG -g", "CMAKE_C_FLAGS_RELWITHDEBINFO": "-O3 -DNDEBUG -g",
@@ -59,8 +59,8 @@
"toolset": { "value": "host=x86_64", "strategy": "external" }, "toolset": { "value": "host=x86_64", "strategy": "external" },
"cacheVariables": { "cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "cmake/arm64-linux-clang.cmake", "CMAKE_TOOLCHAIN_FILE": "cmake/arm64-linux-clang.cmake",
"CMAKE_C_FLAGS": "-march=armv8 -fno-finite-math-only -flto -D_GNU_SOURCE", "CMAKE_C_FLAGS": "-march=armv8.2a+fp16+dotprod -fvectorize -fno-finite-math-only -flto -D_GNU_SOURCE",
"CMAKE_CXX_FLAGS": "-march=armv8 -fno-finite-math-only -flto -D_GNU_SOURCE", "CMAKE_CXX_FLAGS": "-march=armv8.2a+fp16+dotprod -fvectorize -fno-finite-math-only -flto -D_GNU_SOURCE",
"CMAKE_C_FLAGS_RELEASE": "-O3 -DNDEBUG", "CMAKE_C_FLAGS_RELEASE": "-O3 -DNDEBUG",
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG", "CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG",
"CMAKE_C_FLAGS_RELWITHDEBINFO": "-O3 -DNDEBUG -g", "CMAKE_C_FLAGS_RELWITHDEBINFO": "-O3 -DNDEBUG -g",
+1 -1
View File
@@ -10,7 +10,7 @@ This image includes Android NDK, OpenCL SDK, Hexagon SDK, CMake, etc.
This method works on Linux, macOS, and Windows. macOS and Windows users should install Docker Desktop. This method works on Linux, macOS, and Windows. macOS and Windows users should install Docker Desktop.
``` ```
~/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 ~/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
[d]/> cd /workspace [d]/> cd /workspace
``` ```