Design: ccache accuracy for release builds (fingerprint coverage vs remote cache) #7259
subodh-dubey-amd
started this conversation in
Ideas
Replies: 2 comments
|
I have opened a discussion here. |
0 replies
|
Based on today's standup discussion with @ScottTodd , the recommendation is to continue using a local cache, as it remains important for build performance and reliability. Scott noted that we've seen Windows runners fail midway through jobs when the self-hosted runner loses connection to the server. Additionally, removing the local cache could place excessive load on the CPU. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Moving the design conversation here (out of issue #7248, which stays as the general problem statement) so we can weigh approaches in the open before landing anything.
Problem
Release builds read the shared ccache remote cache, so a cached object's correctness depends on the
compiler_checkfingerprint capturing everything that affects output. The POSIX fingerprint (build_tools/posix_ccache_compiler_check.py) hashes the compiler binary and itslddshared libraries, but not the device bitcode libraries (ROCm-Device-Libs*.bc) orlld. A change confined to those (clang unchanged) would not invalidate the cache, so a stale object could be reused - worst for builds whose artifacts ship (prereleases promoted to stable).Evidence (fingerprint works, with a gap)
Recent nightlies on the release cache:
LLVM caches well (stable host compiler); math-libs is mostly misses because each night's rebuilt clang changes the fingerprint (invalidation working). Residual concern = the uncovered inputs.
Clarified requirement (from review)
Release (prerelease) builds should have zero remote cache hits, but keep the local cache (some builds, notably Windows, need at least a local cache for performance and runner stability).
Options
lldto fingerprintLocal-only meets the requirement best: zero remote hits, local cache retained.
recacheand full-disable were considered but both kill local hits.Prototype
Local-only for prereleases is prototyped in PR #7249 (draft, not a merge request): a
--no-remote-cacheflag insetup_ccache.pygated onrelease_type == 'prerelease'.Open questions
All reactions