Skip to content

Commit cfb6c4c

Browse files
committed
Merge branch 'master' into pr/19493
2 parents 66f0ce2 + f772f6e commit cfb6c4c

535 files changed

Lines changed: 37743 additions & 21166 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/nix/package.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
vulkan-loader,
1919
openssl,
2020
shaderc,
21+
spirv-headers,
2122
useBlas ?
2223
builtins.all (x: !x) [
2324
useCuda
@@ -145,6 +146,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
145146
ninja
146147
pkg-config
147148
git
149+
spirv-headers
148150
]
149151
++ optionals useCuda [
150152
cudaPackages.cuda_nvcc

.devops/vulkan.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN apt update && apt install -y git build-essential cmake wget xz-utils
77

88
# Install SSL and Vulkan SDK dependencies
99
RUN apt install -y libssl-dev curl \
10-
libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libvulkan-dev glslc
10+
libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libvulkan-dev glslc spirv-headers
1111

1212
# Build it
1313
WORKDIR /app

.github/labeler.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,18 @@ android:
7373
- changed-files:
7474
- any-glob-to-any-file:
7575
- examples/llama.android/**
76+
server/webui:
77+
- changed-files:
78+
- any-glob-to-any-file:
79+
- tools/server/webui/**
80+
- tools/server/public/**
7681
server:
7782
- changed-files:
7883
- any-glob-to-any-file:
7984
- tools/server/**
85+
86+
87+
8088
ggml:
8189
- changed-files:
8290
- any-glob-to-any-file:

.github/workflows/build-riscv.yml

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ env:
3535

3636
jobs:
3737
ubuntu-riscv64-native-sanitizer:
38-
runs-on: RISCV64
38+
runs-on: ubuntu-24.04-riscv
3939

4040
continue-on-error: true
4141

@@ -47,20 +47,9 @@ jobs:
4747
steps:
4848
- name: Install dependencies
4949
run: |
50-
sudo apt-get update
51-
52-
# Install necessary packages
53-
sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 rustup cmake build-essential wget ccache git-lfs
54-
5550
# Set gcc-14 and g++-14 as the default compilers
5651
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
5752
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
58-
sudo ln -sf /usr/bin/gcc-14 /usr/bin/gcc
59-
sudo ln -sf /usr/bin/g++-14 /usr/bin/g++
60-
61-
# Install Rust stable version
62-
rustup install stable
63-
rustup default stable
6453
6554
git lfs install
6655
@@ -73,23 +62,12 @@ jobs:
7362
id: checkout
7463
uses: actions/checkout@v6
7564

76-
- name: Setup ccache
77-
run: |
78-
# Unique cache directory per matrix combination
79-
export CCACHE_DIR="$HOME/.ccache/sanitizer-${{ matrix.sanitizer }}-${{ matrix.build_type }}"
80-
mkdir -p "$CCACHE_DIR"
81-
82-
# Configure ccache
83-
ccache --set-config=max_size=5G
84-
ccache --set-config=compression=true
85-
ccache --set-config=compression_level=6
86-
ccache --set-config=cache_dir="$CCACHE_DIR"
87-
ccache --set-config=sloppiness=file_macro,time_macros,include_file_mtime,include_file_ctime
88-
ccache --set-config=hash_dir=false
89-
90-
# Export for subsequent steps
91-
echo "CCACHE_DIR=$CCACHE_DIR" >> $GITHUB_ENV
92-
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
65+
- name: ccache
66+
uses: ggml-org/ccache-action@afde29e5b5422e5da23cb1f639e8baecadeadfc3 # https://github.com/ggml-org/ccache-action/pull/1
67+
with:
68+
key: ubuntu-riscv64-native-sanitizer-${{ matrix.sanitizer }}-${{ matrix.build_type }}
69+
evict-old-files: 1d
70+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
9371

9472
- name: Build
9573
id: cmake_build

.github/workflows/build-self-hosted.yml

Lines changed: 74 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -141,61 +141,59 @@ jobs:
141141
# amd-smi static
142142
# GG_BUILD_ROCM=1 GG_BUILD_AMDGPU_TARGETS="gfx1101" bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
143143

144-
# TODO: sandbox Mac runners
145-
# ggml-ci-mac-metal:
146-
# runs-on: [self-hosted, macOS, ARM64]
147-
#
148-
# steps:
149-
# - name: Clone
150-
# id: checkout
151-
# uses: actions/checkout@v6
152-
#
153-
# - name: Test
154-
# id: ggml-ci
155-
# run: |
156-
# GG_BUILD_METAL=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
157-
#
158-
# ggml-ci-mac-webgpu:
159-
# runs-on: [self-hosted, macOS, ARM64]
160-
#
161-
# steps:
162-
# - name: Clone
163-
# id: checkout
164-
# uses: actions/checkout@v6
165-
#
166-
# - name: Dawn Dependency
167-
# id: dawn-depends
168-
# run: |
169-
# DAWN_VERSION="v2.0.0"
170-
# DAWN_OWNER="reeselevine"
171-
# DAWN_REPO="dawn"
172-
# DAWN_ASSET_NAME="Dawn-5e9a4865b1635796ccc77dd30057f2b4002a1355-macos-latest-Release"
173-
# echo "Fetching release asset from https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}.zip"
174-
# curl -L -o artifact.zip \
175-
# "https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}.zip"
176-
# mkdir dawn
177-
# unzip artifact.zip
178-
# tar -xvf ${DAWN_ASSET_NAME}.tar.gz -C dawn --strip-components=1
179-
#
180-
# - name: Test
181-
# id: ggml-ci
182-
# run: |
183-
# GG_BUILD_WEBGPU=1 GG_BUILD_WEBGPU_DAWN_PREFIX="$GITHUB_WORKSPACE/dawn" \
184-
# bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
185-
#
186-
# ggml-ci-mac-vulkan:
187-
# runs-on: [self-hosted, macOS, ARM64]
188-
#
189-
# steps:
190-
# - name: Clone
191-
# id: checkout
192-
# uses: actions/checkout@v6
193-
#
194-
# - name: Test
195-
# id: ggml-ci
196-
# run: |
197-
# vulkaninfo --summary
198-
# GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
144+
ggml-ci-mac-metal:
145+
runs-on: [self-hosted, macOS, ARM64]
146+
147+
steps:
148+
- name: Clone
149+
id: checkout
150+
uses: actions/checkout@v6
151+
152+
- name: Test
153+
id: ggml-ci
154+
run: |
155+
GG_BUILD_METAL=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
156+
157+
ggml-ci-mac-webgpu:
158+
runs-on: [self-hosted, macOS, ARM64]
159+
160+
steps:
161+
- name: Clone
162+
id: checkout
163+
uses: actions/checkout@v6
164+
165+
- name: Dawn Dependency
166+
id: dawn-depends
167+
run: |
168+
DAWN_VERSION="v20260317.182325"
169+
DAWN_OWNER="google"
170+
DAWN_REPO="dawn"
171+
DAWN_ASSET_NAME="Dawn-18eb229ef5f707c1464cc581252e7603c73a3ef0-macos-latest-Release"
172+
echo "Fetching release asset from https://github.com/google/dawn/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}.tar.gz"
173+
curl -L -o artifact.tar.gz \
174+
"https://github.com/google/dawn/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}.tar.gz"
175+
mkdir dawn
176+
tar -xvf artifact.tar.gz -C dawn --strip-components=1
177+
178+
- name: Test
179+
id: ggml-ci
180+
run: |
181+
GG_BUILD_WEBGPU=1 GG_BUILD_WEBGPU_DAWN_PREFIX="$GITHUB_WORKSPACE/dawn" \
182+
bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
183+
184+
ggml-ci-mac-vulkan:
185+
runs-on: [self-hosted, macOS, ARM64]
186+
187+
steps:
188+
- name: Clone
189+
id: checkout
190+
uses: actions/checkout@v6
191+
192+
- name: Test
193+
id: ggml-ci
194+
run: |
195+
vulkaninfo --summary
196+
GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
199197
200198
ggml-ci-linux-intel-vulkan:
201199
runs-on: [self-hosted, Linux, Intel]
@@ -213,6 +211,27 @@ jobs:
213211
vulkaninfo --summary
214212
GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
215213
214+
ggml-ci-win-intel-vulkan:
215+
runs-on: [self-hosted, Windows, X64, Intel]
216+
217+
steps:
218+
- name: Clone
219+
id: checkout
220+
uses: actions/checkout@v6
221+
222+
- name: Test
223+
id: ggml-ci
224+
shell: C:\msys64\usr\bin\bash.exe --noprofile --norc -eo pipefail "{0}"
225+
env:
226+
MSYSTEM: UCRT64
227+
CHERE_INVOKING: 1
228+
PATH: C:\msys64\ucrt64\bin;C:\msys64\usr\bin;C:\Windows\System32;${{ env.PATH }}
229+
run: |
230+
vulkaninfo --summary
231+
# Skip python related tests with GG_BUILD_LOW_PERF=1 since Windows MSYS2 UCRT64 currently fails to create
232+
# a valid python environment for testing
233+
LLAMA_FATAL_WARNINGS=OFF GG_BUILD_NINJA=1 GG_BUILD_VULKAN=1 GG_BUILD_LOW_PERF=1 ./ci/run.sh ./results/llama.cpp ./mnt/llama.cpp
234+
216235
ggml-ci-intel-openvino-gpu-low-perf:
217236
runs-on: [self-hosted, Linux, Intel, OpenVINO]
218237

.github/workflows/build-vulkan.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272

7373
- name: Setup Vulkan SDK
7474
if: steps.cache-sdk.outputs.cache-hit != 'true'
75-
uses: ./.github/actions/linux-setup-vulkan-llvmpipe
75+
uses: ./.github/actions/linux-setup-vulkan
7676
with:
7777
path: ./vulkan_sdk
7878
version: ${{ env.VULKAN_SDK_VERSION }}
@@ -93,4 +93,5 @@ jobs:
9393
export GGML_VK_DISABLE_F16=1
9494
export GGML_VK_DISABLE_COOPMAT=1
9595
# This is using llvmpipe and runs slower than other backends
96-
ctest -L main --verbose --timeout 4800
96+
# test-backend-ops is too slow on llvmpipe, skip it
97+
ctest -L main -E test-backend-ops --verbose --timeout 900

.github/workflows/build.yml

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ jobs:
318318
id: depends
319319
run: |
320320
sudo apt-get update
321-
sudo apt-get install -y gcc-14 g++-14 build-essential glslc libvulkan-dev libssl-dev ninja-build
321+
sudo apt-get install -y gcc-14 g++-14 build-essential glslc libvulkan-dev spirv-headers libssl-dev ninja-build
322322
echo "CC=gcc-14" >> "$GITHUB_ENV"
323323
echo "CXX=g++-14" >> "$GITHUB_ENV"
324324
@@ -996,32 +996,21 @@ jobs:
996996
cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
997997
998998
ubuntu-cpu-riscv64-native:
999-
runs-on: RISCV64
999+
runs-on: ubuntu-24.04-riscv
10001000

10011001
steps:
10021002
- name: Install dependencies
10031003
run: |
1004-
sudo apt-get update
1005-
10061004
# Install necessary packages
1007-
sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 rustup cmake build-essential libssl-dev wget ccache git-lfs
1005+
sudo apt-get update
1006+
sudo apt-get install -y libssl-dev
10081007
10091008
# Set gcc-14 and g++-14 as the default compilers
10101009
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
10111010
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
1012-
sudo ln -sf /usr/bin/gcc-14 /usr/bin/gcc
1013-
sudo ln -sf /usr/bin/g++-14 /usr/bin/g++
1014-
1015-
# Install Rust stable version
1016-
rustup install stable
1017-
rustup default stable
10181011
10191012
git lfs install
10201013
1021-
- name: Clone
1022-
id: checkout
1023-
uses: actions/checkout@v6
1024-
10251014
- name: Check environment
10261015
run: |
10271016
uname -a
@@ -1031,25 +1020,16 @@ jobs:
10311020
cmake --version
10321021
rustc --version
10331022
1034-
- name: Setup ccache
1035-
run: |
1036-
# Set unique cache directory for this job
1037-
export CCACHE_DIR="$HOME/.ccache/cpu-cmake-rv64-native"
1038-
mkdir -p "$CCACHE_DIR"
1039-
1040-
# Configure ccache for optimal performance
1041-
ccache --set-config=max_size=5G
1042-
ccache --set-config=compression=true
1043-
ccache --set-config=compression_level=6
1044-
ccache --set-config=cache_dir="$CCACHE_DIR"
1045-
1046-
# Enable more aggressive caching
1047-
ccache --set-config=sloppiness=file_macro,time_macros,include_file_mtime,include_file_ctime
1048-
ccache --set-config=hash_dir=false
1023+
- name: Clone
1024+
id: checkout
1025+
uses: actions/checkout@v6
10491026

1050-
# Export for subsequent steps
1051-
echo "CCACHE_DIR=$CCACHE_DIR" >> $GITHUB_ENV
1052-
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
1027+
- name: ccache
1028+
uses: ggml-org/ccache-action@afde29e5b5422e5da23cb1f639e8baecadeadfc3 # https://github.com/ggml-org/ccache-action/pull/1
1029+
with:
1030+
key: ubuntu-cpu-riscv64-native
1031+
evict-old-files: 1d
1032+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
10531033

10541034
- name: Build
10551035
id: cmake_build

.github/workflows/close-issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- uses: actions/stale@v10
1919
with:
20-
exempt-issue-labels: "refactoring,help wanted,good first issue,research 🔬,bug,roadmap"
20+
exempt-issue-labels: "refactoring,help wanted,good first issue,research 🔬,bug,roadmap,security"
2121
days-before-issue-stale: 30
2222
days-before-issue-close: 14
2323
stale-issue-label: "stale"

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ jobs:
7373
{ "tag": "cpu", "dockerfile": ".devops/cpu.Dockerfile", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04" },
7474
{ "tag": "cpu", "dockerfile": ".devops/cpu.Dockerfile", "platforms": "linux/arm64", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04-arm" },
7575
{ "tag": "cpu", "dockerfile": ".devops/s390x.Dockerfile", "platforms": "linux/s390x", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04-s390x" },
76-
{ "tag": "cuda cuda12", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "12.9.1", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04" },
77-
{ "tag": "cuda cuda12", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "12.9.1", "platforms": "linux/arm64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04-arm" },
76+
{ "tag": "cuda cuda12", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "12.8.1", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04" },
77+
{ "tag": "cuda cuda12", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "12.8.1", "platforms": "linux/arm64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04-arm" },
7878
{ "tag": "cuda13", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "13.1.1", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04" },
7979
{ "tag": "cuda13", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "13.1.1", "platforms": "linux/arm64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04-arm" },
8080
{ "tag": "musa", "dockerfile": ".devops/musa.Dockerfile", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04" },

0 commit comments

Comments
 (0)