Skip to content

Commit ce1167d

Browse files
committed
Merge branch 'master' into dev-refactoring
# Conflicts: # ggml/src/ggml-backend-reg.cpp
2 parents a29243e + 576c82e commit ce1167d

File tree

220 files changed

+35600
-6729
lines changed

Some content is hidden

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

220 files changed

+35600
-6729
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: 4 additions & 12 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
@@ -739,9 +740,6 @@ jobs:
739740
- build: 'llvm-arm64-opencl-adreno'
740741
arch: 'arm64'
741742
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'
742-
# - build: 'kompute-x64'
743-
# arch: 'x64'
744-
# 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'
745743

746744
steps:
747745
- name: Clone
@@ -755,12 +753,6 @@ jobs:
755753
variant: ccache
756754
evict-old-files: 1d
757755

758-
- name: Clone Kompute submodule
759-
id: clone_kompute
760-
if: ${{ matrix.build == 'kompute-x64' }}
761-
run: |
762-
git submodule update --init ggml/src/ggml-kompute/kompute
763-
764756
- name: Download OpenBLAS
765757
id: get_openblas
766758
if: ${{ matrix.build == 'openblas-x64' }}
@@ -776,7 +768,7 @@ jobs:
776768
777769
- name: Install Vulkan SDK
778770
id: get_vulkan
779-
if: ${{ matrix.build == 'kompute-x64' || matrix.build == 'vulkan-x64' }}
771+
if: ${{ matrix.build == 'vulkan-x64' }}
780772
run: |
781773
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"
782774
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install

.github/workflows/release.yml

Lines changed: 8 additions & 2 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 \
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Update Operations Documentation
2+
3+
on:
4+
push:
5+
paths:
6+
- 'docs/ops/**'
7+
- 'scripts/create_ops_docs.py'
8+
pull_request:
9+
paths:
10+
- 'docs/ops/**'
11+
- 'scripts/create_ops_docs.py'
12+
13+
jobs:
14+
update-ops-docs:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: '3.x'
25+
26+
- name: Generate operations documentation to temporary file
27+
run: |
28+
mkdir -p /tmp/ops_check
29+
./scripts/create_ops_docs.py /tmp/ops_check/ops.md
30+
31+
- name: Check if docs/ops.md matches generated version
32+
run: |
33+
if ! diff -q docs/ops.md /tmp/ops_check/ops.md; then
34+
echo "Operations documentation (docs/ops.md) is not up to date with the backend CSV files."
35+
echo "To fix: run ./scripts/create_ops_docs.py and commit the updated docs/ops.md along with your changes"
36+
echo "Differences found:"
37+
diff docs/ops.md /tmp/ops_check/ops.md || true
38+
exit 1
39+
fi
40+
echo "Operations documentation is up to date."

.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

0 commit comments

Comments
 (0)