Skip to content

Commit d81e63d

Browse files
authored
CI : support IOT device (IQ9) (ggml-org#22987)
* update test scripts * align CI behavior between linux and android * remove automatically cancel in 15min * enable cancel-in-progress * fix ty check issue * update and fix pylint issue * update runner such that we are not restricted by the 15min limit rule * fix flake8 lint issue * update runner according to review feedback * code update according to review feedback * switch from llama-cli to llama-completion binary with -no-cnv flag
1 parent 834a243 commit d81e63d

7 files changed

Lines changed: 795 additions & 169 deletions

File tree

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

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,45 @@ jobs:
5858
name: llama-cpp-android-arm64-snapdragon
5959
path: pkg-snapdragon/llama.cpp
6060

61+
linux-iot-snapdragon:
62+
runs-on: ubuntu-latest
63+
container:
64+
image: 'ghcr.io/snapdragon-toolchain/arm64-linux:v0.1'
65+
defaults:
66+
run:
67+
shell: bash
68+
69+
steps:
70+
- name: Clone
71+
uses: actions/checkout@v6
72+
with:
73+
fetch-depth: 0
74+
lfs: false
75+
76+
- name: Build Llama.CPP for Snapdragon Linux IoT
77+
id: build_llama_cpp_snapdragon_linux
78+
run: |
79+
cp docs/backend/snapdragon/CMakeUserPresets.json .
80+
cmake --preset arm64-linux-snapdragon-release -B build-snapdragon -DGGML_OPENCL=ON
81+
cmake --build build-snapdragon -j $(nproc)
82+
cmake --install build-snapdragon --prefix pkg-snapdragon/llama.cpp
83+
84+
- name: Upload Llama.CPP Snapdragon Linux IoT Build Artifact
85+
if: ${{ always() && steps.build_llama_cpp_snapdragon_linux.outcome == 'success' }}
86+
uses: actions/upload-artifact@v6
87+
with:
88+
name: llama-cpp-linux-arm64-snapdragon
89+
path: pkg-snapdragon/llama.cpp
90+
6191
test-snapdragon-qdc:
62-
name: Test on QDC Android Device (${{ matrix.device }})
63-
needs: [android-ndk-snapdragon]
64-
runs-on: ubuntu-slim
92+
name: Test on QDC Device (${{ matrix.device }})
93+
needs: [android-ndk-snapdragon, linux-iot-snapdragon]
94+
runs-on: ubuntu-24.04-arm
95+
timeout-minutes: 90
6596
strategy:
6697
fail-fast: false
6798
matrix:
68-
device: [SM8750, SM8650, SM8850]
99+
device: [SM8750, SM8850, QCS9075M]
69100

70101
steps:
71102
- name: Checkout
@@ -74,11 +105,11 @@ jobs:
74105
- name: Download build artifact
75106
uses: actions/download-artifact@v7
76107
with:
77-
name: llama-cpp-android-arm64-snapdragon
108+
name: ${{ startsWith(matrix.device, 'QCS') && 'llama-cpp-linux-arm64-snapdragon' || 'llama-cpp-android-arm64-snapdragon' }}
78109
path: pkg-snapdragon/llama.cpp
79110

80111
- name: Set up Python
81-
uses: actions/setup-python@v5
112+
uses: actions/setup-python@v6
82113
with:
83114
python-version: '3.x'
84115
cache: pip
@@ -107,7 +138,8 @@ jobs:
107138
--test all \
108139
--pkg-dir pkg-snapdragon/llama.cpp \
109140
--model-url "https://huggingface.co/bartowski/Llama-3.2-1B-Instruct-GGUF/resolve/main/Llama-3.2-1B-Instruct-Q4_0.gguf" \
110-
--device ${{ matrix.device }}
141+
--device ${{ matrix.device }} \
142+
${{ startsWith(matrix.device, 'QCS') && '--retries 2 --retry-delay 300' || '' }}
111143
env:
112144
QDC_API_KEY: ${{ secrets.QDC_API_KEY }}
113145

0 commit comments

Comments
 (0)