Skip to content

Commit 57f6b93

Browse files
authored
Merge pull request #92 from TheTom/fix/hip-fa-pool-retention
hip: bypass memory pool for FA f16 temp buffers
2 parents e439700 + 0b05974 commit 57f6b93

479 files changed

Lines changed: 55673 additions & 20130 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/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/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [TheTom]

.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: 14 additions & 24 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

@@ -50,17 +50,18 @@ jobs:
5050
sudo apt-get update
5151
5252
# Install necessary packages
53-
sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 rustup cmake build-essential wget ccache git-lfs
53+
sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 cmake build-essential wget git-lfs
5454
5555
# Set gcc-14 and g++-14 as the default compilers
5656
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
5757
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++
6058
61-
# Install Rust stable version
62-
rustup install stable
63-
rustup default stable
59+
if ! which rustc; then
60+
# Install Rust stable version
61+
sudo apt-get install -y rustup
62+
rustup install stable
63+
rustup default stable
64+
fi
6465
6566
git lfs install
6667
@@ -73,23 +74,12 @@ jobs:
7374
id: checkout
7475
uses: actions/checkout@v6
7576

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
77+
# FIXME: Enable when ggml-org/ccache-action works on riscv64
78+
# - name: ccache
79+
# uses: ggml-org/ccache-action@v1.2.21
80+
# with:
81+
# key: ubuntu-riscv64-native-sanitizer-${{ matrix.sanytizer }}-${{ matrix.build_type }}
82+
# save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
9383

9484
- name: Build
9585
id: cmake_build

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

Lines changed: 53 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]

.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: 19 additions & 30 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,29 @@ 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: |
10041004
sudo apt-get update
10051005
10061006
# 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
1007+
sudo apt-get install -y libatomic1 libtsan2 gcc-14 g++-14 cmake build-essential libssl-dev wget git-lfs
10081008
10091009
# Set gcc-14 and g++-14 as the default compilers
10101010
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
10111011
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++
10141012
1015-
# Install Rust stable version
1016-
rustup install stable
1017-
rustup default stable
1013+
if ! which rustc; then
1014+
# Install Rust stable version
1015+
sudo apt-get install -y rustup
1016+
rustup install stable
1017+
rustup default stable
1018+
fi
10181019
10191020
git lfs install
10201021
1021-
- name: Clone
1022-
id: checkout
1023-
uses: actions/checkout@v6
1024-
10251022
- name: Check environment
10261023
run: |
10271024
uname -a
@@ -1031,25 +1028,17 @@ jobs:
10311028
cmake --version
10321029
rustc --version
10331030
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
1031+
- name: Clone
1032+
id: checkout
1033+
uses: actions/checkout@v6
10491034

1050-
# Export for subsequent steps
1051-
echo "CCACHE_DIR=$CCACHE_DIR" >> $GITHUB_ENV
1052-
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
1035+
# FIXME: Enable when ggml-org/ccache-action works on riscv64
1036+
# - name: ccache
1037+
# uses: ggml-org/ccache-action@v1.2.21
1038+
# with:
1039+
# key: ubuntu-cpu-riscv64-native
1040+
# evict-old-files: 1d
1041+
# save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
10531042

10541043
- name: Build
10551044
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)