Skip to content

Commit 7af3fd9

Browse files
committed
Merge branch 'master' into xsn/ggml_scale_bias
2 parents 50f88fc + 6efcd65 commit 7af3fd9

File tree

223 files changed

+9788
-7498
lines changed

Some content is hidden

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

223 files changed

+9788
-7498
lines changed

.devops/tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -e
33

44
# Read the first argument into a variable

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ body:
4040
attributes:
4141
label: GGML backends
4242
description: Which GGML backends do you know to be affected?
43-
options: [AMX, BLAS, CPU, CUDA, HIP, Kompute, Metal, Musa, RPC, SYCL, Vulkan]
43+
options: [AMX, BLAS, CPU, CUDA, HIP, Metal, Musa, RPC, SYCL, Vulkan, OpenCL]
4444
multiple: true
4545
validations:
4646
required: true

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ body:
4242
attributes:
4343
label: GGML backends
4444
description: Which GGML backends do you know to be affected?
45-
options: [AMX, BLAS, CPU, CUDA, HIP, Kompute, Metal, Musa, RPC, SYCL, Vulkan]
45+
options: [AMX, BLAS, CPU, CUDA, HIP, Metal, Musa, RPC, SYCL, Vulkan, OpenCL]
4646
multiple: true
4747
validations:
4848
required: true

.github/labeler.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
# https://github.com/actions/labeler
2-
Kompute:
3-
- changed-files:
4-
- any-glob-to-any-file:
5-
- ggml/include/ggml-kompute.h
6-
- ggml/src/ggml-kompute/**
7-
- README-kompute.md
82
Apple Metal:
93
- changed-files:
104
- any-glob-to-any-file:
@@ -93,3 +87,8 @@ Ascend NPU:
9387
- ggml/include/ggml-cann.h
9488
- ggml/src/ggml-cann/**
9589
- docs/backend/CANN.md
90+
OpenCL:
91+
- changed-files:
92+
- any-glob-to-any-file:
93+
- ggml/include/ggml-opencl.h
94+
- ggml/src/ggml-opencl/**

.github/workflows/build.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ jobs:
8484
-DCMAKE_BUILD_RPATH="@loader_path" \
8585
-DLLAMA_FATAL_WARNINGS=ON \
8686
-DGGML_METAL_USE_BF16=ON \
87-
-DGGML_METAL_EMBED_LIBRARY=ON \
87+
-DGGML_METAL_EMBED_LIBRARY=OFF \
88+
-DGGML_METAL_SHADER_DEBUG=ON \
8889
-DGGML_RPC=ON
8990
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
9091
@@ -341,7 +342,7 @@ jobs:
341342
cd build
342343
export GGML_VK_VISIBLE_DEVICES=0
343344
# This is using llvmpipe and runs slower than other backends
344-
ctest -L main --verbose --timeout 3600
345+
ctest -L main --verbose --timeout 4200
345346
346347
ubuntu-22-cmake-hip:
347348
runs-on: ubuntu-22.04
@@ -664,7 +665,7 @@ jobs:
664665
./build-xcframework.sh
665666
666667
windows-msys2:
667-
runs-on: windows-latest
668+
runs-on: windows-2025
668669

669670
strategy:
670671
fail-fast: false
@@ -714,7 +715,7 @@ jobs:
714715
cmake --build build --config ${{ matrix.build }} -j $(nproc)
715716
716717
windows-latest-cmake:
717-
runs-on: windows-latest
718+
runs-on: windows-2025
718719

719720
env:
720721
OPENBLAS_VERSION: 0.3.23
@@ -725,17 +726,20 @@ jobs:
725726
matrix:
726727
include:
727728
- build: 'cpu-x64 (static)'
729+
arch: 'x64'
728730
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DBUILD_SHARED_LIBS=OFF'
729731
- build: 'openblas-x64'
732+
arch: 'x64'
730733
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"'
731734
- build: 'vulkan-x64'
735+
arch: 'x64'
732736
defines: '-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'
733737
- build: 'llvm-arm64'
738+
arch: 'arm64'
734739
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'
735740
- build: 'llvm-arm64-opencl-adreno'
741+
arch: 'arm64'
736742
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON'
737-
# - build: 'kompute-x64'
738-
# 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_KOMPUTE=ON -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON'
739743

740744
steps:
741745
- name: Clone
@@ -749,12 +753,6 @@ jobs:
749753
variant: ccache
750754
evict-old-files: 1d
751755

752-
- name: Clone Kompute submodule
753-
id: clone_kompute
754-
if: ${{ matrix.build == 'kompute-x64' }}
755-
run: |
756-
git submodule update --init ggml/src/ggml-kompute/kompute
757-
758756
- name: Download OpenBLAS
759757
id: get_openblas
760758
if: ${{ matrix.build == 'openblas-x64' }}
@@ -770,7 +768,7 @@ jobs:
770768
771769
- name: Install Vulkan SDK
772770
id: get_vulkan
773-
if: ${{ matrix.build == 'kompute-x64' || matrix.build == 'vulkan-x64' }}
771+
if: ${{ matrix.build == 'vulkan-x64' }}
774772
run: |
775773
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"
776774
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
@@ -805,6 +803,8 @@ jobs:
805803
- name: libCURL
806804
id: get_libcurl
807805
uses: ./.github/actions/windows-setup-curl
806+
with:
807+
architecture: ${{ matrix.arch == 'x64' && 'win64' || 'win64a' }}
808808

809809
- name: Build
810810
id: cmake_build
@@ -825,7 +825,7 @@ jobs:
825825
826826
- name: Test
827827
id: cmake_test
828-
if: ${{ matrix.build != 'llvm-arm64' && matrix.build != 'llvm-arm64-opencl-adreno' }}
828+
if: ${{ matrix.arch == 'x64' }}
829829
run: |
830830
cd build
831831
ctest -L main -C Release --verbose --timeout 900
@@ -930,7 +930,7 @@ jobs:
930930
cmake --build build --config Release
931931
932932
windows-latest-cmake-sycl:
933-
runs-on: windows-latest
933+
runs-on: windows-2022
934934

935935
defaults:
936936
run:
@@ -964,7 +964,7 @@ jobs:
964964

965965
windows-latest-cmake-hip:
966966
if: ${{ github.event.inputs.create_release != 'true' }}
967-
runs-on: windows-latest
967+
runs-on: windows-2022
968968

969969
steps:
970970
- name: Clone

.github/workflows/release.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ jobs:
4949
run: |
5050
sysctl -a
5151
cmake -B build \
52-
-DCMAKE_BUILD_RPATH="@loader_path" \
52+
-DCMAKE_INSTALL_RPATH='@loader_path' \
53+
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
5354
-DLLAMA_FATAL_WARNINGS=ON \
5455
-DGGML_METAL_USE_BF16=ON \
5556
-DGGML_METAL_EMBED_LIBRARY=ON \
@@ -103,7 +104,8 @@ jobs:
103104
# Metal is disabled due to intermittent failures with Github runners not having a GPU:
104105
# https://github.com/ggml-org/llama.cpp/actions/runs/8635935781/job/23674807267#step:5:2313
105106
cmake -B build \
106-
-DCMAKE_BUILD_RPATH="@loader_path" \
107+
-DCMAKE_INSTALL_RPATH='@loader_path' \
108+
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
107109
-DLLAMA_FATAL_WARNINGS=ON \
108110
-DGGML_METAL=OFF \
109111
-DGGML_RPC=ON
@@ -160,6 +162,8 @@ jobs:
160162
id: cmake_build
161163
run: |
162164
cmake -B build \
165+
-DCMAKE_INSTALL_RPATH='$ORIGIN' \
166+
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
163167
-DGGML_BACKEND_DL=ON \
164168
-DGGML_NATIVE=OFF \
165169
-DGGML_CPU_ALL_VARIANTS=ON \
@@ -211,6 +215,8 @@ jobs:
211215
id: cmake_build
212216
run: |
213217
cmake -B build \
218+
-DCMAKE_INSTALL_RPATH='$ORIGIN' \
219+
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
214220
-DGGML_BACKEND_DL=ON \
215221
-DGGML_NATIVE=OFF \
216222
-DGGML_CPU_ALL_VARIANTS=ON \
@@ -235,7 +241,7 @@ jobs:
235241
name: llama-bin-ubuntu-vulkan-x64.zip
236242

237243
windows-cpu:
238-
runs-on: windows-latest
244+
runs-on: windows-2025
239245

240246
strategy:
241247
matrix:
@@ -271,7 +277,7 @@ jobs:
271277
env:
272278
CURL_PATH: ${{ steps.get_libcurl.outputs.curl_path }}
273279
run: |
274-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }}
280+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch == 'x64' && 'x64' || 'amd64_arm64' }}
275281
cmake -S . -B build -G "Ninja Multi-Config" ^
276282
-D CMAKE_TOOLCHAIN_FILE=cmake/${{ matrix.arch }}-windows-llvm.cmake ^
277283
-DGGML_NATIVE=OFF ^
@@ -288,7 +294,7 @@ jobs:
288294
CURL_PATH: ${{ steps.get_libcurl.outputs.curl_path }}
289295
run: |
290296
Copy-Item $env:CURL_PATH\bin\libcurl-${{ matrix.arch }}.dll .\build\bin\Release\
291-
Copy-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.42.34433\debug_nonredist\${{ matrix.arch }}\Microsoft.VC143.OpenMP.LLVM\libomp140.${{ matrix.arch == 'x64' && 'x86_64' || 'aarch64' }}.dll" .\build\bin\Release\
297+
Copy-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.44.35112\debug_nonredist\${{ matrix.arch }}\Microsoft.VC143.OpenMP.LLVM\libomp140.${{ matrix.arch == 'x64' && 'x86_64' || 'aarch64' }}.dll" .\build\bin\Release\
292298
7z a llama-bin-win-cpu-${{ matrix.arch }}.zip .\build\bin\Release\*
293299
294300
- name: Upload artifacts
@@ -298,7 +304,7 @@ jobs:
298304
name: llama-bin-win-cpu-${{ matrix.arch }}.zip
299305

300306
windows:
301-
runs-on: windows-latest
307+
runs-on: windows-2025
302308

303309
env:
304310
OPENBLAS_VERSION: 0.3.23
@@ -448,7 +454,7 @@ jobs:
448454
name: cudart-llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip
449455

450456
windows-sycl:
451-
runs-on: windows-latest
457+
runs-on: windows-2022
452458

453459
defaults:
454460
run:
@@ -520,7 +526,7 @@ jobs:
520526
name: llama-bin-win-sycl-x64.zip
521527

522528
windows-hip:
523-
runs-on: windows-latest
529+
runs-on: windows-2022
524530

525531
strategy:
526532
matrix:

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "kompute"]
2-
path = ggml/src/ggml-kompute/kompute
3-
url = https://github.com/nomic-ai/kompute.git

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ endfunction()
120120

121121
llama_option_depr(FATAL_ERROR LLAMA_CUBLAS GGML_CUDA)
122122
llama_option_depr(WARNING LLAMA_CUDA GGML_CUDA)
123-
llama_option_depr(WARNING LLAMA_KOMPUTE GGML_KOMPUTE)
124123
llama_option_depr(WARNING LLAMA_METAL GGML_METAL)
125124
llama_option_depr(WARNING LLAMA_METAL_EMBED_LIBRARY GGML_METAL_EMBED_LIBRARY)
126125
llama_option_depr(WARNING LLAMA_NATIVE GGML_NATIVE)

build-xcframework.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# Options
44
IOS_MIN_OS_VERSION=16.4

ci/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
#
33
# sample usage:
44
#

0 commit comments

Comments
 (0)