Skip to content

Prebuilds: key ccache on the source tag to stop cache eviction - #35

Merged
oobabooga merged 5 commits into
unslothai:masterfrom
oobabooga:ccache-tag-key
Jul 21, 2026
Merged

oobabooga merged 5 commits into
unslothai:masterfrom
oobabooga:ccache-tag-key

Conversation

@oobabooga

@oobabooga oobabooga commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

Prebuilt jobs normally finish in about 20-25 minutes with a warm ccache, but can take 2-3 hours after their cache is evicted.

The eviction is caused by workflow reruns. GitHub limits cache storage to 10 GB per repository, and the current timestamped keys make every rerun save a new set of 21 cache entries. A few reruns can fill the repository and evict the large CUDA caches.

Change

This PR makes the source tag part of each cache key and disables timestamp appending. As a result:

  • A same-tag rerun restores the exact cache and cannot create a duplicate.
  • A new tag can start from the latest compatible cache through a prefix match.
  • A cache is saved only after a successful build, so failed builds cannot publish partial results.

This applies to the CUDA, CUDA Windows, CPU, and Vulkan workflows. ROCm and macOS do not use ccache.

Validation

The b10075 workflow was run twice at the same commit with the same 500 MB ccache limit. The first run had to start from an older b10043 cache and then saved the completed b10075 cache. The second run restored that exact b10075 cache.

cuda12-portable First b10075 run Same-tag rerun
Linux 2h02m, 5.5% cache hits 25m02s, 90.8% cache hits
Windows 3h19m, 9.4% cache hits 21m14s, 92.9% cache hits

After the rerun, b10075 still had exactly 21 cache entries totaling about 6.0 GiB. The rerun restored the fast path without adding another cache generation.

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: e7a8a1b021

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85bae215f2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 38777aff59

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@oobabooga

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 2fc7e86959

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@oobabooga
oobabooga merged commit 1e7fb16 into unslothai:master Jul 21, 2026
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