Skip to content

ci: re-enable ubuntu-22-rocm release build with larger ccache - #91

Open
jimw567 wants to merge 5 commits into
masterfrom
jimwu.restore-ubuntu-rocm-release
Open

ci: re-enable ubuntu-22-rocm release build with larger ccache#91
jimw567 wants to merge 5 commits into
masterfrom
jimwu.restore-ubuntu-rocm-release

Conversation

@jimw567

@jimw567 jimw567 commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Re-enables the ROCm Ubuntu release build that upstream disabled in ggml-org#26969, and fixes the underlying cause instead of just turning the job back on.

Root cause

The ROCm 7.14 switch (ggml-org#25775) doubled the Linux GPU target count from 11 to 22. Each HIP translation unit is compiled once per target arch, so both build time and ccache footprint roughly doubled.

ggml-org/ccache-action defaults to max-size: 500MB. That was sufficient for the 11 targets of ROCm 7.2.1 (builds were ~11 min warm), but too small for 22 targets. CI logs from the 7.14 era (before the cache was disabled) show the cache pinned at the 500MB cap:

  • restored 306 MB, cap 500 MB (78% full)
  • 10 cache evictions (Cleanups) during a single build
  • only ~45% direct hit rate -> never warm
  • build step ~93 min wall-clock

So the cache self-evicted every run and never converged. Upstream disabled the cache (ggml-org#26962), then the whole job (ggml-org#26969), citing "ccache does not work and build takes 2hrs+".

Fix

  • Re-enable the ubuntu-22-rocm job (byte-identical to upstream's pre-ci : disable ubuntu-rocm ggml-org/llama.cpp#26969 job) and its ccache save/restore steps.
  • Raise ccache max-size to 2G so the 22-target cache fits and builds stay warm across runs.
  • Restore the job in the release job's needs: list and the release-notes download link.

Evaluation

Local reproduction (22 targets, ROCm 7.14, uncapped ccache):

  • cold build: ~19 min (16-core)
  • warm build: ~11 s, 100% ccache hits
  • full cache on disk: 176 MB uncompressed

This confirms a 2G cap is more than enough. The Release workflow triggers on push-to-master / manual dispatch (not on PRs), so this needs a manual workflow_dispatch run on the branch to validate build time on stock GitHub runners.

Test plan

  • Manually dispatch the Release workflow on this branch and confirm the ubuntu-22-rocm job builds successfully on a stock GitHub runner
  • Confirm ccache hit rate climbs across two consecutive runs (cold -> warm)
  • Confirm the ROCm artifact is produced and attached

Jim Wu added 5 commits August 18, 2026 15:50
Revert ggml-org#26969 (which disabled the ROCm Ubuntu release job) and address the
underlying cause rather than just turning the job back on.

Root cause of the 2h+ builds: the ROCm 7.14 switch (ggml-org#25775) doubled the Linux
GPU target count from 11 to 22. Each HIP translation unit is compiled once per
target arch, so both build time and ccache size roughly doubled. The
ggml-org/ccache-action defaults to max-size 500MB, which was enough for the 11
targets of ROCm 7.2.1 but too small for 22: CI logs from the 7.14 era show the
cache pinned at the 500MB cap (78% full, 10 evictions mid-build, only ~45%
hit rate), so it never went warm and every run took ~90-135 min.

Fix: re-enable the ubuntu-22-rocm job and its ccache steps, and raise the
ccache max-size to 2G so the 22-target cache fits and builds stay warm across
runs. Also restores the job in the release job's needs: list and the
release-notes download link.
Standalone workflow_dispatch job that runs only the ubuntu-22-rocm build
(22 targets, ROCm 7.14, ccache max-size 2G) so build time and cold->warm
ccache behavior can be measured on stock GitHub runners without triggering
the full release matrix or publishing a release.

Prints ccache -s before/after and BUILD_SECONDS to the job summary. Remove
before merging the parent change.
Add a push trigger scoped to this branch so the timing job runs without
needing workflow_dispatch registration on the default branch.
The ROCm toolchain is pip-installed fresh on every run, so the clang binary's
mtime changes each time. With ccache's default compiler_check=mtime that
invalidates the whole cache and warm builds only reached ~70% hits. Hash the
compiler contents instead so the cache survives toolchain reinstalls.

Also applied to the temp timing workflow for measurement.
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.

1 participant