Skip to content

Commit b140a9c

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents f73287f + d05fe1d commit b140a9c

488 files changed

Lines changed: 38480 additions & 18611 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devops/intel.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG ONEAPI_VERSION=2025.3.2-0-devel-ubuntu24.04
1+
ARG ONEAPI_VERSION=2025.3.3-0-devel-ubuntu24.04
22

33
## Build Image
44

.github/ISSUE_TEMPLATE/010-bug-compilation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ body:
1212
after recreating the CMake build directory and with `-DGGML_CCACHE=OFF`.
1313
If the compilation succeeds with ccache disabled you should be able to permanently fix the issue
1414
by clearing `~/.cache/ccache` (on Linux).
15+
16+
Please fill out this template yourself, copypasting language model outputs is [strictly prohibited](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md#ai-usage-policy).
1517
- type: textarea
1618
id: commit
1719
attributes:

.github/ISSUE_TEMPLATE/011-bug-results.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Bug (model use)
2-
description: Something goes wrong when using a model (in general, not specific to a single llama.cpp module).
2+
description: Something goes wrong when running a model (crashes, garbled outputs, etc.).
33
title: "Eval bug: "
44
labels: ["bug-unconfirmed", "model evaluation"]
55
body:
@@ -12,6 +12,8 @@ body:
1212
If you encountered the issue while using an external UI (e.g. ollama),
1313
please reproduce your issue using one of the examples/binaries in this repository.
1414
The `llama-completion` binary can be used for simple and reproducible model inference.
15+
16+
Please fill out this template yourself, copypasting language model outputs is [strictly prohibited](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md#ai-usage-policy).
1517
- type: textarea
1618
id: version
1719
attributes:

.github/ISSUE_TEMPLATE/019-bug-misc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ body:
1010
This issue template is intended for miscellaneous bugs that don't fit into any other category.
1111
If you encountered the issue while using an external UI (e.g. ollama),
1212
please reproduce your issue using one of the examples/binaries in this repository.
13+
14+
Please fill out this template yourself, copypasting language model outputs is [strictly prohibited](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md#ai-usage-policy).
1315
- type: textarea
1416
id: version
1517
attributes:

.github/ISSUE_TEMPLATE/020-enhancement.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ body:
88
value: |
99
[Please post your idea first in Discussion if there is not yet a consensus for this enhancement request. This will help to keep this issue tracker focused on enhancements that the community has agreed needs to be implemented.](https://github.com/ggml-org/llama.cpp/discussions/categories/ideas)
1010
11+
Please fill out this template yourself, copypasting language model outputs is [strictly prohibited](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md#ai-usage-policy).
12+
1113
- type: checkboxes
1214
id: prerequisites
1315
attributes:

.github/ISSUE_TEMPLATE/030-research.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ body:
88
value: |
99
Don't forget to check for any [duplicate research issue tickets](https://github.com/ggml-org/llama.cpp/issues?q=is%3Aopen+is%3Aissue+label%3A%22research+%F0%9F%94%AC%22)
1010
11+
Please fill out this template yourself, copypasting language model outputs is [strictly prohibited](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md#ai-usage-policy).
12+
1113
- type: checkboxes
1214
id: research-stage
1315
attributes:

.github/ISSUE_TEMPLATE/040-refactor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ body:
99
Don't forget to [check for existing refactor issue tickets](https://github.com/ggml-org/llama.cpp/issues?q=is%3Aopen+is%3Aissue+label%3Arefactoring) in case it's already covered.
1010
Also you may want to check [Pull request refactor label as well](https://github.com/ggml-org/llama.cpp/pulls?q=is%3Aopen+is%3Apr+label%3Arefactoring) for duplicates too.
1111
12+
Please fill out this template yourself, copypasting language model outputs is [strictly prohibited](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md#ai-usage-policy).
13+
1214
- type: textarea
1315
id: background-description
1416
attributes:

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<!-- You can provide more details and link related discussions here. Delete this section if not applicable -->
88

9-
# Requirements
9+
## Requirements
1010

1111
<!-- IMPORTANT: Please do NOT delete this section, otherwise your PR may be rejected -->
1212

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: CI (snapdragon)
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- '.github/workflows/build-and-test-snapdragon.yml'
10+
- 'ggml/include/ggml-hexagon.h'
11+
- 'ggml/src/ggml-hexagon/**'
12+
- 'docs/backend/snapdragon/**'
13+
- 'scripts/snapdragon/**'
14+
- 'CMakePresets.json'
15+
16+
pull_request:
17+
types: [opened, synchronize, reopened]
18+
paths:
19+
- '.github/workflows/build-and-test-snapdragon.yml'
20+
- 'ggml/include/ggml-hexagon.h'
21+
- 'ggml/src/ggml-hexagon/**'
22+
- 'docs/backend/snapdragon/**'
23+
- 'scripts/snapdragon/**'
24+
- 'CMakePresets.json'
25+
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
28+
cancel-in-progress: true
29+
30+
jobs:
31+
android-ndk-snapdragon:
32+
runs-on: ubuntu-latest
33+
container:
34+
image: 'ghcr.io/snapdragon-toolchain/arm64-android:v0.3'
35+
defaults:
36+
run:
37+
shell: bash
38+
39+
steps:
40+
- name: Clone
41+
uses: actions/checkout@v6
42+
with:
43+
fetch-depth: 0
44+
lfs: false
45+
46+
- name: Build Llama.CPP for Snapdragon Android
47+
id: build_llama_cpp_snapdragon_android
48+
run: |
49+
cp docs/backend/snapdragon/CMakeUserPresets.json .
50+
cmake --preset arm64-android-snapdragon-release -B build
51+
cmake --build build
52+
cmake --install build --prefix pkg-snapdragon/llama.cpp
53+
54+
- name: Upload Llama.CPP Snapdragon Android Build Artifact
55+
if: ${{ always() && steps.build_llama_cpp_snapdragon_android.outcome == 'success' }}
56+
uses: actions/upload-artifact@v6
57+
with:
58+
name: llama-cpp-android-arm64-snapdragon
59+
path: pkg-snapdragon/llama.cpp
60+
61+
test-snapdragon-qdc:
62+
name: Test on QDC Android Device (${{ matrix.device }})
63+
needs: [android-ndk-snapdragon]
64+
runs-on: ubuntu-slim
65+
strategy:
66+
fail-fast: false
67+
matrix:
68+
device: [SM8750, SM8650, SM8850]
69+
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v6
73+
74+
- name: Download build artifact
75+
uses: actions/download-artifact@v7
76+
with:
77+
name: llama-cpp-android-arm64-snapdragon
78+
path: pkg-snapdragon/llama.cpp
79+
80+
- name: Set up Python
81+
uses: actions/setup-python@v5
82+
with:
83+
python-version: '3.x'
84+
cache: pip
85+
86+
- name: Install system dependencies
87+
run: |
88+
sudo apt-get update
89+
sudo apt-get install -y curl unzip
90+
91+
- name: Install QDC SDK wheel
92+
run: |
93+
curl -fSL -o qdc_sdk.zip https://softwarecenter.qualcomm.com/api/download/software/tools/Qualcomm_Device_Cloud_SDK/All/0.2.3/qualcomm_device_cloud_sdk-0.2.3.zip
94+
unzip qdc_sdk.zip -d qdc_sdk
95+
pip install qdc_sdk/qualcomm_device_cloud_sdk-0.2.3-py3-none-any.whl
96+
97+
- name: Check QDC API key
98+
id: check_secret
99+
env:
100+
QDC_API_KEY: ${{ secrets.QDC_API_KEY }}
101+
run: echo "has-qdc-key=${{ env.QDC_API_KEY != '' }}" >> "$GITHUB_OUTPUT"
102+
103+
- name: Run QDC tests (${{ matrix.device }})
104+
if: steps.check_secret.outputs.has-qdc-key == 'true'
105+
run: |
106+
python scripts/snapdragon/qdc/run_qdc_jobs.py \
107+
--test all \
108+
--pkg-dir pkg-snapdragon/llama.cpp \
109+
--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 }}
111+
env:
112+
QDC_API_KEY: ${{ secrets.QDC_API_KEY }}
113+
114+
- name: Cleanup
115+
if: always()
116+
run: rm -rf pkg-snapdragon qdc_sdk qdc_sdk.zip

.github/workflows/build-android.yml

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
name: CI (android)
22

33
on:
4-
workflow_dispatch: # allows manual triggering
4+
workflow_dispatch:
55
push:
66
branches:
77
- master
8-
paths: [
9-
'.github/workflows/build-android.yml',
10-
'**/CMakeLists.txt',
11-
'**/.cmake',
12-
'**/*.h',
13-
'**/*.hpp',
14-
'**/*.c',
15-
'**/*.cpp'
16-
]
8+
paths:
9+
- '.github/workflows/build-android.yml'
10+
- '**/CMakeLists.txt'
11+
- '**/.cmake'
12+
- '**/*.h'
13+
- '**/*.hpp'
14+
- '**/*.c'
15+
- '**/*.cpp'
1716

1817
pull_request:
1918
types: [opened, synchronize, reopened]
20-
paths: [
21-
'.github/workflows/build-android.yml',
22-
'examples/llama.android/**'
23-
]
19+
paths:
20+
- '.github/workflows/build-android.yml'
21+
- 'examples/llama.android/**'
2422

2523
concurrency:
2624
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
@@ -67,35 +65,24 @@ jobs:
6765
defaults:
6866
run:
6967
shell: bash
70-
strategy:
71-
matrix:
72-
include:
73-
- build: 'arm64-cpu'
74-
defines: '-D ANDROID_ABI=arm64-v8a -D ANDROID_PLATFORM=android-31 -D CMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -D GGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv8.5-a+fp16+i8mm -G Ninja -D LLAMA_OPENSSL=OFF -D GGML_OPENMP=OFF'
75-
- build: 'arm64-snapdragon'
76-
defines: '--preset arm64-android-snapdragon-release'
7768

7869
steps:
7970
- name: Clone
80-
id: checkout
8171
uses: actions/checkout@v6
8272
with:
8373
fetch-depth: 0
8474
lfs: false
8575

86-
- name: Build Llama.CPP for Hexagon Android
87-
id: build_llama_cpp_hexagon_android
76+
- name: Build
77+
id: ndk_build
8878
run: |
89-
if [[ "${{ matrix.build }}" == "arm64-snapdragon" ]]; then
90-
cp docs/backend/snapdragon/CMakeUserPresets.json .
91-
fi
92-
cmake ${{ matrix.defines }} -B build
79+
cmake -D ANDROID_ABI=arm64-v8a -D ANDROID_PLATFORM=android-31 -D CMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -D GGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv8.5-a+fp16+i8mm -G Ninja -D LLAMA_OPENSSL=OFF -D GGML_OPENMP=OFF -B build
9380
cmake --build build
9481
cmake --install build --prefix pkg-adb/llama.cpp
9582
96-
- name: Upload Llama.CPP Hexagon Android Build Artifact
97-
if: ${{ always() && steps.build_llama_cpp_hexagon_android.outcome == 'success' }}
83+
- name: Upload Android Build Artifact
84+
if: ${{ always() && steps.ndk_build.outcome == 'success' }}
9885
uses: actions/upload-artifact@v6
9986
with:
100-
name: llama-cpp-android-${{ matrix.build }}
87+
name: llama-cpp-android-arm64-cpu
10188
path: pkg-adb/llama.cpp

0 commit comments

Comments
 (0)