Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: ccache for all github worfklows #11516

Merged
merged 9 commits into from
Jan 30, 2025
Merged

Conversation

ochafik
Copy link
Collaborator

@ochafik ochafik commented Jan 30, 2025

Use https://github.com/hendrikmuhs/ccache-action in all our ci jobs (was already used for cuda / hip jobs)

Example:

Notes:

  • Default seems to be using single cache (Looks like each job gets its own cache by default.)
  • May need sccache tweak on Windows?
  • May need to share caches between compatible jobs (assuming we can serialize them by group, as concurrent ccache updates are likely counter-productive) if hitting cache limits (update: don’t think there are compatible builds between jobs)
  • Expiring files unused in caches for more than 1d w/ Evict old files from the cache prior to saving hendrikmuhs/ccache-action#270 (cf. @slaren's suggestion below); hopefully will allow decent cross-PR caching (TBC in real life)

@slaren
Copy link
Member

slaren commented Jan 30, 2025

I would be wary about using too many caches, since there is a limited amount of cache space and it can be easily exceeded, which will cause other caches to be dropped.

Also the current caches keep growing until they hit the size limit, which makes this problem worse. I noticed that they added an option to the action recently that may help with this: hendrikmuhs/ccache-action#270

@ochafik
Copy link
Collaborator Author

ochafik commented Jan 30, 2025

I would be wary about using too many caches, since there is a limited amount of cache space and it can be easily exceeded, which will cause other caches to be dropped.

I'm not sure how concurrent "Post ccache" updates work, used distinct keys for fear of race conditions, otherwise we could just use a single cache (maybe let's do this if / when we hit the limits?)

@github-actions github-actions bot added the devops improvements to build systems and github actions label Jan 30, 2025
@ochafik ochafik marked this pull request as ready for review January 30, 2025 18:01
@ochafik ochafik changed the title ci: ccache to speed up github worfklows ci: ccache for all github worfklows Jan 30, 2025
@ochafik ochafik merged commit 553f1e4 into ggml-org:master Jan 30, 2025
40 of 41 checks passed
@ggerganov
Copy link
Member

This change might have broken the SYCL CI: https://github.com/ggerganov/llama.cpp/actions/runs/13062035808/job/36447068610. Not sure.

@ochafik
Copy link
Collaborator Author

ochafik commented Jan 31, 2025

This change might have broken the SYCL CI: https://github.com/ggerganov/llama.cpp/actions/runs/13062035808/job/36447068610. Not sure.

@ggerganov Indeed (example), thanks! I'll see if using sccache as recommended on https://github.com/hendrikmuhs/ccache-action for windows helps.

Also, ubuntu-22-cmake-vulkan & ubuntu-22-cmake-musa's ccache doesn't seem to work (seems to be amongst only jobs left to take 5min to build)

@ggerganov
Copy link
Member

These failures started happening recently:

https://github.com/ggerganov/llama.cpp/actions/runs/13178901793/job/36784659823?pr=11213#step:3:38

@ochafik
Copy link
Collaborator Author

ochafik commented Feb 8, 2025

These failures started happening recently:

https://github.com/ggerganov/llama.cpp/actions/runs/13178901793/job/36784659823?pr=11213#step:3:38

@ggerganov SSL certificate revocation on windows seems to be stricter (at least w/ the schannel layer), cf. curl/curl#12239 (comment)), with these failures possibly a transient flare on Github's Windows workers (experienced by others.

Possible options i'm evaluating

  • Disable ccache on windows (short term)
  • Request ccache-action to support setting curl's --ssl-revoke-best-effort flag (or even --ssl-no-revoke)
  • Install a different version of curl before running the action maybe (one using openssl instead of schannel)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops improvements to build systems and github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants