From f0172fd9b966f826a53bd69212bdadcaaa078802 Mon Sep 17 00:00:00 2001 From: Pascal Wachowski Date: Mon, 10 Aug 2026 21:32:56 +0200 Subject: [PATCH 1/2] ci: run the CUDA compile check in a devel container Installing the CUDA toolkit onto a bare runner cannot work: the cuda-12-6 meta-package depends on the NVIDIA kernel driver, dkms cannot build it on a GitHub runner, and dpkg then fails the entire install including nvcc and cuBLAS. Switching to the full toolkit made this worse, not better. nvidia/cuda:12.6.2-devel-ubuntu24.04 ships nvcc and cuBLAS and needs no driver, which is the right shape for a compile-only check. This mirrors the upstream ubuntu-latest-cuda job. Also enables LLAMA_FATAL_WARNINGS, since -Werror is what surfaced two of the build errors this workflow exists to catch. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Q5jMcvdevae8j4T36C9h2z --- .github/workflows/turboquant-ci.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/turboquant-ci.yml b/.github/workflows/turboquant-ci.yml index bd01bff84..68c18e55b 100644 --- a/.github/workflows/turboquant-ci.yml +++ b/.github/workflows/turboquant-ci.yml @@ -59,22 +59,22 @@ jobs: cuda: name: CUDA compile check runs-on: ubuntu-latest + # Same approach as the upstream ubuntu-latest-cuda job. Installing the toolkit + # onto a bare runner does not work: the cuda-12-6 meta-package depends on the + # NVIDIA kernel driver, which cannot build there, and dpkg then fails the whole + # install. A devel image ships nvcc and cuBLAS and needs no driver at all — + # correct for a compile-only check. + container: nvidia/cuda:12.6.2-devel-ubuntu24.04 steps: - uses: actions/checkout@v4 - - uses: Jimver/cuda-toolkit@v0.2.19 - id: cuda-toolkit - with: - cuda: "12.6.2" - method: network - # No sub-packages filter: ggml-cuda needs cuBLAS in addition to nvcc and - # the runtime, and guessing package names cost two failed runs. A full - # install is slower but does not break on naming. - - name: Install dependencies + env: + DEBIAN_FRONTEND: noninteractive + # No sudo: the container runs as root. run: | - sudo apt-get update - sudo apt-get install -y build-essential cmake + apt-get update + apt-get install -y build-essential cmake git libgomp1 - name: Configure run: | @@ -82,6 +82,8 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DGGML_CUDA=ON \ -DCMAKE_CUDA_ARCHITECTURES=75 \ + -DGGML_NATIVE=OFF \ + -DLLAMA_FATAL_WARNINGS=ON \ -DLLAMA_BUILD_TESTS=OFF \ -DLLAMA_BUILD_EXAMPLES=OFF \ -DLLAMA_BUILD_SERVER=OFF From 9870239b0437e0a7a1c4eea26d8580f39405656c Mon Sep 17 00:00:00 2001 From: Pascal Wachowski Date: Mon, 10 Aug 2026 21:47:11 +0200 Subject: [PATCH 2/2] ci: cache compilation results with ccache ggml-cuda is 131 translation units, ~70 of them generated template instances, and nvcc compiles each one several times over (device to PTX, PTX to SASS, then the host pass). On a four-core runner starting from an empty build directory that dominates the entire job. ggml's CMake enables ccache automatically once the binary is present, so the action only has to carry the cache between runs. Saving is restricted to pushes on master so pull requests read from a stable cache instead of each writing its own. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Q5jMcvdevae8j4T36C9h2z --- .github/workflows/turboquant-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/turboquant-ci.yml b/.github/workflows/turboquant-ci.yml index 68c18e55b..844c1a8b5 100644 --- a/.github/workflows/turboquant-ci.yml +++ b/.github/workflows/turboquant-ci.yml @@ -35,6 +35,12 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential cmake ccache + - uses: ggml-org/ccache-action@v1.2.21 + with: + key: turboquant-ci-cpu + evict-old-files: 1d + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + - name: Configure run: | cmake -B build \ @@ -76,6 +82,16 @@ jobs: apt-get update apt-get install -y build-essential cmake git libgomp1 + # ggml's CMake picks ccache up automatically once the binary exists, so this + # only has to provide the cache. It matters here more than anywhere else: + # ggml-cuda is 131 translation units, and nvcc compiles each one several + # times over (PTX, SASS, host). Must run before Configure. + - uses: ggml-org/ccache-action@v1.2.21 + with: + key: turboquant-ci-cuda + evict-old-files: 1d + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + - name: Configure run: | cmake -B build \