LLM inference in C/C++
C++ ggml
ci : move more jobs to ccache-buckets (#28375)
Sigbjørn Skjæret8b4b3558f145
diff --git a/.github/workflows/build-apple.yml b/.github/workflows/build-apple.ymlindex 6b9a79115d..c23f40f146 100644--- a/.github/workflows/build-apple.yml+++ b/.github/workflows/build-apple.yml@@ -50,8 +50,16 @@ jobs:uses: ggml-org/[email protected]with:key: apple-arm64- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false++ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: apple-arm64+ folder: llama.cpp+ hf_bucket: ggml-org/cache- name: Buildid: cmake_build@@ -67,6 +75,18 @@ jobs:-DCMAKE_OSX_DEPLOYMENT_TARGET=13.3time cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}+ with:+ key: apple-arm64+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: true+- name: Check for leaksrun: |cmd=(./build/bin/test-thread-safety -hf ggml-org/gemma-3-270m-qat-GGUF -ngl 99 -p "$(printf 'hello %.0s' {1..128})" -n 16 -c 512 -ub 32 -np 2 -t 2 -lv 1)@@ -80,16 +100,6 @@ jobs:cd buildctest -L main -E "test-llama-archs" --verbose --timeout 900- - name: ccache-clear- uses: ./.github/actions/ccache-clear- env:- GH_TOKEN: ${{ github.token }}- with:- key: apple-arm64- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}-macos-latest-x64:runs-on: macos-15-intel@@ -102,8 +112,16 @@ jobs:uses: ggml-org/[email protected]with:key: apple-x64- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false++ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: apple-x64+ folder: llama.cpp+ hf_bucket: ggml-org/cache- name: Buildid: cmake_build@@ -120,22 +138,24 @@ jobs:-DCMAKE_OSX_DEPLOYMENT_TARGET=13.3time cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}+ with:+ key: apple-x64+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: true+- name: Testid: cmake_testrun: |cd buildctest -L main --verbose --timeout 900- - name: ccache-clear- uses: ./.github/actions/ccache-clear- env:- GH_TOKEN: ${{ github.token }}- with:- key: apple-x64- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}-macos-latest-ios-xcode:runs-on: macos-latestdiff --git a/.github/workflows/build-cpu.yml b/.github/workflows/build-cpu.ymlindex fb412e3813..9e92314bc2 100644--- a/.github/workflows/build-cpu.yml+++ b/.github/workflows/build-cpu.yml@@ -65,8 +65,7 @@ jobs:uses: ggml-org/[email protected]with:key: cpu-${{ matrix.os }}- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false- name: Build Dependenciesid: build_depends@@ -91,6 +90,15 @@ jobs:python3 -m pip install --upgrade pip setuptoolspip3 install ./gguf-py+ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: cpu-${{ matrix.os }}+ folder: llama.cpp+ hf_bucket: ggml-org/cache+- name: Buildid: cmake_buildrun: |@@ -100,6 +108,18 @@ jobs:-DGGML_RPC=ONtime cmake --build build --config Release -j $(nproc)+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}+ with:+ key: cpu-${{ matrix.os }}+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: true+- name: Testid: cmake_testrun: |@@ -117,18 +137,6 @@ jobs:./bin/llama-convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf./bin/llama-completion -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256- # note: real deletion only on push to master (same condition as the ccache save),- # dry-run otherwise (the token is read-only on PRs from forks)- - name: ccache-clear- uses: ./.github/actions/ccache-clear- env:- GH_TOKEN: ${{ github.token }}- with:- key: cpu-${{ matrix.os }}- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}-windows:name: windows / ${{ matrix.build }}runs-on: windows-2025diff --git a/.github/workflows/build-cuda-ubuntu.yml b/.github/workflows/build-cuda-ubuntu.ymlindex 808702b296..da61b3353e 100644--- a/.github/workflows/build-cuda-ubuntu.yml+++ b/.github/workflows/build-cuda-ubuntu.yml@@ -61,7 +61,7 @@ jobs:- name: ccache-buckets-restoreuses: ./.github/actions/ccache-bucketsenv:- HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}with:key: cuda-ubuntu-24.04-cudafolder: llama.cpp@@ -116,7 +116,7 @@ jobs:- name: ccache-buckets-restoreuses: ./.github/actions/ccache-bucketsenv:- HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}with:key: cuda-ubuntu-22.04-hipfolder: llama.cpp@@ -167,7 +167,7 @@ jobs:- name: ccache-buckets-restoreuses: ./.github/actions/ccache-bucketsenv:- HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}with:key: cuda-ubuntu-22.04-musafolder: llama.cppdiff --git a/.github/workflows/build-sycl.yml b/.github/workflows/build-sycl.ymlindex ee42ca3a07..9ddb894f27 100644--- a/.github/workflows/build-sycl.yml+++ b/.github/workflows/build-sycl.yml@@ -78,8 +78,16 @@ jobs:uses: ggml-org/[email protected]with:key: sycl-ubuntu-24-${{ matrix.build }}- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false++ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: sycl-ubuntu-24-${{ matrix.build }}+ folder: llama.cpp+ hf_bucket: ggml-org/cache- name: Buildid: cmake_build@@ -96,15 +104,17 @@ jobs:-DGGML_SYCL_F16=${{ matrix.fp16 }}time cmake --build build --config Release -j $(nproc)- - name: ccache-clear- uses: ./.github/actions/ccache-clear+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-bucketsenv:- GH_TOKEN: ${{ github.token }}+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}with:key: sycl-ubuntu-24-${{ matrix.build }}- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: truewindows-latest-sycl:runs-on: windows-2022diff --git a/.github/workflows/build-vulkan.yml b/.github/workflows/build-vulkan.ymlindex fefd48b058..9de52e990a 100644--- a/.github/workflows/build-vulkan.yml+++ b/.github/workflows/build-vulkan.yml@@ -57,8 +57,16 @@ jobs:with:key: vulkan-ubuntu-24.04-armvariant: ccache- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false++ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: vulkan-ubuntu-24.04-arm+ folder: llama.cpp+ hf_bucket: ggml-org/cache- name: Configureid: cmake_configure@@ -73,15 +81,17 @@ jobs:run: |time cmake --build build -j $(nproc)- - name: ccache-clear- uses: ./.github/actions/ccache-clear+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-bucketsenv:- GH_TOKEN: ${{ github.token }}+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}with:key: vulkan-ubuntu-24.04-arm- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: trueubuntu-llvmpipe:runs-on: ubuntu-24.04@@ -115,8 +125,16 @@ jobs:uses: ggml-org/[email protected]with:key: vulkan-ubuntu-24.04-llvmpipe- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false++ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: vulkan-ubuntu-24.04-llvmpipe+ folder: llama.cpp+ hf_bucket: ggml-org/cache- name: Buildid: cmake_build@@ -127,6 +145,18 @@ jobs:-DGGML_VULKAN=ONcmake --build build --config Release -j $(nproc)+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}+ with:+ key: vulkan-ubuntu-24.04-llvmpipe+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: true+- name: Testid: cmake_testrun: |@@ -138,16 +168,6 @@ jobs:# test-backend-ops is too slow on llvmpipe, skip itctest -L main -E test-backend-ops --verbose --timeout 900- - name: ccache-clear- uses: ./.github/actions/ccache-clear- env:- GH_TOKEN: ${{ github.token }}- with:- key: vulkan-ubuntu-24.04-llvmpipe- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}-windows:runs-on: windows-2025diff --git a/.github/workflows/build-wasm.yml b/.github/workflows/build-wasm.ymlindex f1c975af01..81b943df7b 100644--- a/.github/workflows/build-wasm.yml+++ b/.github/workflows/build-wasm.yml@@ -57,8 +57,7 @@ jobs:uses: ggml-org/[email protected]with:key: webgpu-ubuntu-24.04-arm-wasm- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false- name: Install Emscriptenrun: |@@ -76,6 +75,15 @@ jobs:"https://github.com/google/dawn/releases/download/${DAWN_TAG}/${EMDAWN_PKG}"unzip emdawn.zip+ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: webgpu-ubuntu-24.04-arm-wasm+ folder: llama.cpp+ hf_bucket: ggml-org/cache+- name: Build WASM WebGPUrun: |source emsdk/emsdk_env.sh@@ -89,12 +97,14 @@ jobs:time cmake --build build-wasm --config Release --target test-backend-ops -j $(nproc)- - name: ccache-clear- uses: ./.github/actions/ccache-clear+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-bucketsenv:- GH_TOKEN: ${{ github.token }}+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}with:key: webgpu-ubuntu-24.04-arm-wasm- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: truediff --git a/.github/workflows/build-webgpu.yml b/.github/workflows/build-webgpu.ymlindex f2b7fed559..e624e3ba80 100644--- a/.github/workflows/build-webgpu.yml+++ b/.github/workflows/build-webgpu.yml@@ -72,8 +72,7 @@ jobs:uses: ggml-org/[email protected]with:key: webgpu-macos-latest- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false- name: Dawn Dependencyid: dawn-depends@@ -88,6 +87,15 @@ jobs:mkdir dawntar -xvf artifact.tar.gz -C dawn --strip-components=1+ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: webgpu-macos-latest+ folder: llama.cpp+ hf_bucket: ggml-org/cache+- name: Buildid: cmake_buildrun: |@@ -95,22 +103,24 @@ jobs:cmake -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DGGML_WEBGPU=ON -DGGML_METAL=OFF -DGGML_BLAS=OFFtime cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}+ with:+ key: webgpu-macos-latest+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: true+- name: Testid: cmake_testrun: |cd buildctest -L main --verbose --timeout 900- - name: ccache-clear- uses: ./.github/actions/ccache-clear- env:- GH_TOKEN: ${{ github.token }}- with:- key: webgpu-macos-latest- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}-ubuntu:runs-on: ubuntu-24.04@@ -123,8 +133,7 @@ jobs:uses: ggml-org/[email protected]with:key: webgpu-ubuntu-24.04- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false- name: Dependenciesid: depends@@ -148,6 +157,15 @@ jobs:mkdir dawntar -xvf artifact.tar.gz -C dawn --strip-components=1+ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: webgpu-ubuntu-24.04+ folder: llama.cpp+ hf_bucket: ggml-org/cache+- name: Buildid: cmake_buildrun: |@@ -156,6 +174,18 @@ jobs:-DGGML_WEBGPU=ONtime cmake --build build --config Release -j $(nproc)+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}+ with:+ key: webgpu-ubuntu-24.04+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: true+- name: Testid: cmake_testrun: |@@ -163,13 +193,3 @@ jobs:# This is using llvmpipe and runs slower than other backends# test-backend-ops is too slow on llvmpipe, skip itctest -L main -E test-backend-ops --verbose --timeout 900-- - name: ccache-clear- uses: ./.github/actions/ccache-clear- env:- GH_TOKEN: ${{ github.token }}- with:- key: webgpu-ubuntu-24.04- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}diff --git a/.github/workflows/hip-quality-check.yml b/.github/workflows/hip-quality-check.ymlindex b32accf276..ee4e746f2f 100644--- a/.github/workflows/hip-quality-check.yml+++ b/.github/workflows/hip-quality-check.yml@@ -49,14 +49,22 @@ jobs:id: dependsrun: |sudo apt-get update- sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libssl-dev python3+ sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libssl-dev python3 python3-venv python3-pip jq- name: ccacheuses: ggml-org/[email protected]with:key: hip-quality-check-ubuntu-22.04- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false++ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: hip-quality-check-ubuntu-22.04+ folder: llama.cpp+ hf_bucket: ggml-org/cache- name: Build with Werrorid: cmake_build@@ -85,12 +93,14 @@ jobs:make -j $(nproc) 2>&1 | tee metrics.log | grep -v 'Rpass-analysis=kernel-resource-usage\|remark:\|^$'python3 ../scripts/hip/gcn-cdna-vgpr-check.py metrics.log- - name: ccache-clear- uses: ./.github/actions/ccache-clear+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-bucketsenv:- GH_TOKEN: ${{ github.token }}+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}with:key: hip-quality-check-ubuntu-22.04- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: truediff --git a/.github/workflows/server.yml b/.github/workflows/server.ymlindex 3dde580339..77fe7dbd3a 100644--- a/.github/workflows/server.yml+++ b/.github/workflows/server.yml@@ -83,8 +83,16 @@ jobs:uses: ggml-org/[email protected]with:key: server-ubuntu-24.04-arm- evict-old-files: 1d- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ save: false++ - name: ccache-buckets-restore+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}+ with:+ key: server-ubuntu-24.04-arm+ folder: llama.cpp+ hf_bucket: ggml-org/cache- name: Buildid: cmake_build@@ -93,6 +101,18 @@ jobs:-DGGML_SCHED_NO_REALLOC=ONcmake --build build --config Release -j $(nproc) --target llama-server+ - name: ccache-buckets-save+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ uses: ./.github/actions/ccache-buckets+ env:+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}+ with:+ key: server-ubuntu-24.04-arm+ folder: llama.cpp+ evict-old-files: 1d+ hf_bucket: ggml-org/cache+ save: true+- name: Python setupid: setup_pythonuses: actions/setup-python@v6@@ -128,16 +148,6 @@ jobs:export LLAMA_ARG_BACKEND_SAMPLING=1SLOW_TESTS=1 ./tests.sh- - name: ccache-clear- uses: ./.github/actions/ccache-clear- env:- GH_TOKEN: ${{ github.token }}- with:- key: server-ubuntu-24.04-arm- older: 5m- min: 1- dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}-windows:runs-on: windows-2025