Skip to content

ci(gfx11): cache HIP builds with ggml-org/ccache-actio#45

Open
roberteg16 wants to merge 3 commits into
gfx11from
rogarcia.gfx11-ccache
Open

ci(gfx11): cache HIP builds with ggml-org/ccache-actio#45
roberteg16 wants to merge 3 commits into
gfx11from
rogarcia.gfx11-ccache

Conversation

@roberteg16

@roberteg16 roberteg16 commented Jul 13, 2026

Copy link
Copy Markdown

Summary

  • The build-gfx11-rocm workflow recompiles all 7 RDNA3/3.5 arches from scratch on every push/PR/dispatch — no build caching today.
  • Adds the repo-standard ggml-org/ccache-action@v1.2.21 (already used by the CUDA/HIP/SYCL/Vulkan/release workflows) before the build step, so object output persists across runs via GitHub's actions/cache.
  • No cmake changes needed: llama.cpp's CMake sets ccache as the compile launcher automatically when GGML_CCACHE is ON (default) and ccache is on PATH (ggml/src/CMakeLists.txt), wrapping the explicit /opt/rocm/llvm/bin/clang.

Behavior

  • Cache writes are gated to pushes on gfx11 (save: github.event_name == 'push' && github.ref == 'refs/heads/gfx11'), so PRs read the shared store without thrashing it.
  • evict-old-files: 1d bounds store growth.
  • Nightly ROCm bumps change the compiler and will miss (expected); incremental commits on the same ROCm version hit and rebuild fast.

Test plan

  • CI run on this PR shows the ccache step restoring/creating the cache and reports ccache stats at build end.
  • Confirm build log shows ccache found, compilation results will be cached.
  • Second run on same ROCm version shows a materially faster build (cache hits).

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
@roberteg16 roberteg16 changed the title ci(gfx11): cache HIP builds with ggml-org/ccache-action Setup ccache Jul 13, 2026
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
@roberteg16 roberteg16 changed the title Setup ccache ci(gfx11): cache HIP builds with ggml-org/ccache-actio Jul 13, 2026
@roberteg16 roberteg16 requested a review from mgehre-amd July 13, 2026 10:16
@roberteg16 roberteg16 marked this pull request as ready for review July 13, 2026 10:16
Comment thread .github/workflows/build-gfx11-rocm.yml Outdated
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) <noreply@anthropic.com>
@roberteg16 roberteg16 requested a review from mgehre-amd July 13, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants