Skip to content

Commit 5154233

Browse files
authored
Merge branch 'ggml-org:master' into master
2 parents b6e2146 + 0021a77 commit 5154233

215 files changed

Lines changed: 3432 additions & 20846 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.

‎.github/actions/linux-setup-vulkan/action.yml‎

Lines changed: 0 additions & 20 deletions
This file was deleted.

‎.github/workflows/build-cache.yml‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,6 @@ concurrency:
1010
cancel-in-progress: true
1111

1212
jobs:
13-
ubuntu-24-vulkan-cache:
14-
runs-on: ubuntu-24.04
15-
16-
steps:
17-
- name: Clone
18-
id: checkout
19-
uses: actions/checkout@v6
20-
21-
- name: Get latest Vulkan SDK version
22-
id: vulkan_sdk_version
23-
run: |
24-
echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV"
25-
26-
- name: Setup Cache
27-
uses: actions/cache@v5
28-
id: cache-sdk
29-
with:
30-
path: ./vulkan_sdk
31-
key: cache-gha-vulkan-sdk-${{ env.VULKAN_SDK_VERSION }}-${{ runner.os }}
32-
33-
- name: Setup Vulkan SDK
34-
if: steps.cache-sdk.outputs.cache-hit != 'true'
35-
uses: ./.github/actions/linux-setup-vulkan
36-
with:
37-
path: ./vulkan_sdk
38-
version: ${{ env.VULKAN_SDK_VERSION }}
39-
4013
#ubuntu-24-spacemit-cache:
4114
# runs-on: ubuntu-24.04
4215

‎.github/workflows/build-cpu.yml‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ on:
2121
paths: [
2222
'.github/workflows/build-cpu.yml',
2323
'.github/workflows/build-cmake-pkg.yml',
24+
'ggml/src/ggml-rpc/**',
2425
'**/CMakeLists.txt',
2526
'**/.cmake',
2627
'**/*.h',
@@ -123,7 +124,6 @@ jobs:
123124
env:
124125
OPENBLAS_VERSION: 0.3.23
125126
SDE_VERSION: 9.33.0-2024-01-07
126-
VULKAN_VERSION: 1.4.357.0
127127

128128
strategy:
129129
matrix:
@@ -134,9 +134,6 @@ jobs:
134134
- build: 'x64-openblas'
135135
arch: 'x64'
136136
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
137-
- build: 'x64-vulkan'
138-
arch: 'x64'
139-
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON'
140137
- build: 'arm64'
141138
arch: 'arm64'
142139
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'
@@ -167,15 +164,6 @@ jobs:
167164
$lib = $(join-path $msvc 'bin\Hostx64\x64\lib.exe')
168165
& $lib /machine:x64 "/def:${env:RUNNER_TEMP}/openblas/lib/libopenblas.def" "/out:${env:RUNNER_TEMP}/openblas/lib/openblas.lib" /name:openblas.dll
169166
170-
- name: Install Vulkan SDK
171-
id: get_vulkan
172-
if: ${{ matrix.build == 'x64-vulkan' }}
173-
run: |
174-
curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/vulkansdk-windows-X64-${env:VULKAN_VERSION}.exe"
175-
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
176-
Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
177-
Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
178-
179167
- name: Install Ninja
180168
id: install_ninja
181169
run: |

‎.github/workflows/build-rpc.yml‎

Lines changed: 0 additions & 66 deletions
This file was deleted.

‎.github/workflows/build-vulkan.yml‎

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,13 @@ jobs:
9393
run: |
9494
echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV"
9595
96-
- name: Use Vulkan SDK Cache
97-
uses: actions/cache@v5
98-
id: cache-sdk
99-
with:
100-
path: ./vulkan_sdk
101-
key: cache-gha-vulkan-sdk-${{ env.VULKAN_SDK_VERSION }}-${{ runner.os }}
102-
10396
- name: Setup Vulkan SDK
104-
if: steps.cache-sdk.outputs.cache-hit != 'true'
105-
uses: ./.github/actions/linux-setup-vulkan
97+
id: setup
98+
uses: ./.github/actions/unarchive-tar
10699
with:
100+
url: https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_SDK_VERSION }}/linux/vulkan_sdk.tar.xz
107101
path: ./vulkan_sdk
108-
version: ${{ env.VULKAN_SDK_VERSION }}
102+
strip: 1
109103

110104
- name: ccache
111105
uses: ggml-org/ccache-action@v1.2.21
@@ -133,3 +127,56 @@ jobs:
133127
# This is using llvmpipe and runs slower than other backends
134128
# test-backend-ops is too slow on llvmpipe, skip it
135129
ctest -L main -E test-backend-ops --verbose --timeout 900
130+
131+
windows:
132+
runs-on: windows-2025
133+
134+
env:
135+
VULKAN_VERSION: 1.4.357.0
136+
137+
steps:
138+
- name: Clone
139+
id: checkout
140+
uses: actions/checkout@v6
141+
142+
- name: ccache
143+
uses: ggml-org/ccache-action@v1.2.21
144+
with:
145+
key: cpu-windows-2025-x64-vulkan
146+
variant: ccache
147+
evict-old-files: 1d
148+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
149+
150+
- name: Install Vulkan SDK
151+
id: get_vulkan
152+
run: |
153+
curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/vulkansdk-windows-X64-${env:VULKAN_VERSION}.exe"
154+
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
155+
Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
156+
Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
157+
158+
- name: Install Ninja
159+
id: install_ninja
160+
run: |
161+
choco install ninja
162+
163+
- name: Build
164+
id: cmake_build
165+
run: |
166+
cmake -S . -B build -G "Ninja Multi-Config" `
167+
-D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake `
168+
-DCMAKE_BUILD_TYPE=Release `
169+
-DGGML_NATIVE=OFF `
170+
-DLLAMA_BUILD_SERVER=ON `
171+
-DGGML_RPC=ON `
172+
-DGGML_BACKEND_DL=ON `
173+
-DGGML_CPU_ALL_VARIANTS=ON `
174+
-DGGML_VULKAN=ON `
175+
-DLLAMA_BUILD_BORINGSSL=ON
176+
cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}
177+
178+
- name: Test
179+
id: cmake_test
180+
run: |
181+
cd build
182+
ctest -L main -C Release --verbose --timeout 900

‎.github/workflows/docker.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
uses: actions/checkout@v6
4545
with:
4646
fetch-depth: 0
47+
ssh-key: ${{ secrets.DEPLOY_KEY_RELEASE }}
4748

4849
- name: Determine source tag name
4950
id: srctag

‎.github/workflows/make-release.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Make Release
33
on:
44
workflow_dispatch:
55
inputs:
6+
commit:
7+
description: 'Commit SHA to release (empty = branch HEAD)'
8+
required: false
9+
default: ''
10+
type: string
611
dry_run:
712
description: 'Dry run - validate without creating the tag'
813
required: true
@@ -22,12 +27,17 @@ jobs:
2227
steps:
2328
- name: Checkout
2429
uses: actions/checkout@v6
30+
with:
31+
ssh-key: ${{ secrets.DEPLOY_KEY_RELEASE }}
32+
ref: ${{ inputs.commit != '' && inputs.commit || github.ref_name }}
33+
fetch-depth: 0
2534

2635
- name: Run release checks
2736
id: checks
2837
run: bash scripts/make-release-checks.sh ${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}
2938
env:
3039
GITHUB_REPOSITORY: ${{ github.repository }}
40+
RELEASE_BRANCH: ${{ github.ref_name }}
3141

3242
- name: Create release tag
3343
if: ${{ github.event.inputs.dry_run == 'false' }}

‎.github/workflows/release.yml‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,9 @@ jobs:
14391439
- name: xcodebuild for swift package
14401440
id: xcodebuild
14411441
run: |
1442-
./build-xcframework.sh
1442+
# note: only macos and ios-device due to long build time
1443+
# ref: https://github.com/ggml-org/llama.cpp/pull/27252
1444+
./build-xcframework.sh macos ios-device
14431445
14441446
- name: Build Xcode project
14451447
run: xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build
@@ -1598,6 +1600,7 @@ jobs:
15981600
uses: actions/checkout@v6
15991601
with:
16001602
fetch-depth: 0
1603+
ssh-key: ${{ secrets.DEPLOY_KEY_RELEASE }}
16011604

16021605
- name: Determine tag name
16031606
id: tag
@@ -1659,6 +1662,16 @@ jobs:
16591662
run: |
16601663
tar -czvf release/llama-${{ steps.tag.outputs.name }}-ui.tar.gz --transform "s,^\.,llama-${{ steps.tag.outputs.name }}," -C ./ui-dist .
16611664
1665+
- name: Create and push git tag
1666+
run: |
1667+
TAG="${{ steps.tag.outputs.name }}"
1668+
if git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null 2>&1; then
1669+
echo "Tag ${TAG} already exists, skipping creation"
1670+
else
1671+
git tag "${TAG}"
1672+
git push origin "${TAG}"
1673+
fi
1674+
16621675
- name: Create release
16631676
id: create_release
16641677
uses: ggml-org/action-create-release@v1

‎.pi/gg/SYSTEM.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ You are a coding agent. Here are some very important rules that you must follow:
22

33
General:
44
- Be very precise and concise when writing code, comments, explanations, etc.
5+
- If an inline comment exceeds 2 lines, replace it with: `// note: TODO LATER`
56
- PR and commit titles format: `<module> : <title>`. Lookup recents for examples
67
- Don't try to build or run the code unless you are explicitly asked to do so
78
- Use the `gh` CLI tool when querying PRs, issues, or other GitHub resources

‎CMakeLists.txt‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include(CheckIncludeFileCXX)
55
### llama.cpp version
66
set(LLAMA_VERSION_MAJOR 0)
77
set(LLAMA_VERSION_MINOR 1)
8-
set(LLAMA_VERSION_PATCH 0)
8+
set(LLAMA_VERSION_PATCH 1)
99
set(LLAMA_VERSION_BASE "${LLAMA_VERSION_MAJOR}.${LLAMA_VERSION_MINOR}.${LLAMA_VERSION_PATCH}")
1010

1111
# whether this is a development/nightly build
@@ -224,6 +224,9 @@ add_subdirectory(src)
224224
# utils, programs, examples and tests
225225
#
226226

227+
# mtmd needs this even when common is not built
228+
add_subdirectory(vendor/hash)
229+
227230
if (LLAMA_BUILD_COMMON)
228231
add_subdirectory(common)
229232
add_subdirectory(vendor/cpp-httplib)

0 commit comments

Comments
 (0)