From bc3c17a5b11463d205eead18d89b11ac16890fe3 Mon Sep 17 00:00:00 2001 From: Robert Esclapez Garcia Date: Mon, 13 Jul 2026 03:02:56 -0700 Subject: [PATCH 1/3] ci(gfx11): cache HIP builds with ggml-org/ccache-action The gfx11 ROCm workflow recompiles all 7 RDNA3/3.5 arches from scratch on every run. Add the repo-standard ggml-org/ccache-action before the build so object output persists across runs via actions/cache. llama.cpp's CMake auto-wires ccache as the compile launcher (GGML_CCACHE defaults ON), so no cmake flags are needed. Cache writes are gated to pushes on gfx11 so PRs read the shared store without thrashing it. Co-Authored-By: Claude Opus 4 (1M context) --- .github/workflows/build-gfx11-rocm.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build-gfx11-rocm.yml b/.github/workflows/build-gfx11-rocm.yml index 6106d4353fa4..95db9c563e8e 100644 --- a/.github/workflows/build-gfx11-rocm.yml +++ b/.github/workflows/build-gfx11-rocm.yml @@ -198,6 +198,19 @@ jobs: echo "Current llama.cpp commit:" git log --oneline -1 + - name: ccache + # Auto-consumed by the build: llama.cpp's CMake sets ccache as the compile + # launcher when GGML_CCACHE is ON (default) and ccache is on PATH, so no + # cmake flags are needed. Persists across runs via actions/cache. Nightly + # ROCm bumps change the compiler and will miss (expected); incremental + # commits on the same ROCm hit. Only write the cache from pushes to gfx11 + # so PRs read but don't thrash the shared store. + uses: ggml-org/ccache-action@v1.2.21 + with: + key: gfx11-rocm-multiarch + evict-old-files: 1d + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/gfx11' }} + - name: Build Llama.cpp + ROCm run: | gpu_targets="${{ env.GPU_TARGETS }}" From ac6777215548755af880a4d9ef2476f44f376513 Mon Sep 17 00:00:00 2001 From: Robert Esclapez Garcia Date: Mon, 13 Jul 2026 03:15:33 -0700 Subject: [PATCH 2/3] ci(gfx11): rename ccache step to "Setup ccache" Co-Authored-By: Claude Opus 4 (1M context) --- .github/workflows/build-gfx11-rocm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-gfx11-rocm.yml b/.github/workflows/build-gfx11-rocm.yml index 95db9c563e8e..1a6bd6cb8845 100644 --- a/.github/workflows/build-gfx11-rocm.yml +++ b/.github/workflows/build-gfx11-rocm.yml @@ -198,7 +198,7 @@ jobs: echo "Current llama.cpp commit:" git log --oneline -1 - - name: ccache + - name: Setup ccache # Auto-consumed by the build: llama.cpp's CMake sets ccache as the compile # launcher when GGML_CCACHE is ON (default) and ccache is on PATH, so no # cmake flags are needed. Persists across runs via actions/cache. Nightly From 8bec806fcc31592ddc0767ef70d82803b520b282 Mon Sep 17 00:00:00 2001 From: Robert Esclapez Garcia Date: Mon, 13 Jul 2026 13:37:45 -0700 Subject: [PATCH 3/3] ci(gfx11): widen ccache eviction to 7d gfx11 saves the cache only on push (infrequent, plus the daily nightly), so a 1d eviction window prunes still-useful objects between runs. 7d keeps hot objects across the branch's lower push cadence. Co-Authored-By: Claude Opus 4 (1M context) --- .github/workflows/build-gfx11-rocm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-gfx11-rocm.yml b/.github/workflows/build-gfx11-rocm.yml index 1a6bd6cb8845..037572f3909c 100644 --- a/.github/workflows/build-gfx11-rocm.yml +++ b/.github/workflows/build-gfx11-rocm.yml @@ -208,7 +208,7 @@ jobs: uses: ggml-org/ccache-action@v1.2.21 with: key: gfx11-rocm-multiarch - evict-old-files: 1d + evict-old-files: 7d save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/gfx11' }} - name: Build Llama.cpp + ROCm