Repository navigation
Cache the ROCm and plain-clang Windows builds through sccache - #557
Merged
bernardladenthin merged 1 commit intoOct 22, 2026
Merged
Conversation
The two ROCm jobs are the pipeline's critical path (Windows 2:40-4:15 h,
Linux ~2:50 h for the build step) and neither cached a single HIP TU:
- Windows: CMake's Platform/Windows-Clang.cmake implements
CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded for clang with the GNU front
end as `-Xclang -flto-visibility-public-std -D_MT -Xclang
--dependent-lib=libcmt`, and sccache (0.18.0 and main) refuses the
first flag ("Can't handle UnknownFlag arguments with -Xclang"). Every
TU of the ROCm module (TheRock's clang compiles HIP as C++ there) and
of the plain-clang CPU job was a miss; the CPU job had its sccache
install step removed for that reason.
- Linux: ggml compiles the HIP TUs as the CMake language HIP, which the
C/CXX launchers build.sh sets never reach (2 requests in the stats).
llama/cmake/msvc-runtime-gnu-clang.cmake, loaded through
CMAKE_USER_MAKE_RULES_OVERRIDE before project(), maps MultiThreaded and
MultiThreadedDebug to -fms-runtime-lib=static[_dbg] for that toolchain
only -- the driver flag llama/CMakeLists.txt already passed next to
CMake's sequence, which hands cc1 the same flags without -Xclang.
CMAKE_MSVC_RUNTIME_LIBRARY keeps its value: an empty one reached
try_compile and broke the C compiler check (mainCRTStartup undefined).
build.sh adds CMAKE_HIP_COMPILER_LAUNCHER for GGML_HIP builds, and
build-windows-x86_64 installs sccache again.
build.sh and build.bat default SCCACHE_IDLE_TIMEOUT to 0: with 600 s the
server stopped during long builds and the summary table counted only
what came after (67 of ~160 requests on Windows ROCm, 2 on Linux).
Measured before the change, one GPU target (gfx1100), sccache 0.18.0
over a local WebDAV server standing in for Depot:
- Windows, MSVC 14.44 (as windows-2022), TheRock 10.0.0 clang 23:
today 157 requests all refused, 325 s; with the override 0 refused,
377 s cold, 25 s warm.
- Linux, Docker, the CI wheels: 310 s uncached, 304 s cold, 157/157
hits and 10 s warm.
- Objects, nine TUs (C, C++, seven HIP) with a pinned -cuid: every
section identical between the old and the new flags except .drectve,
where CMake's sequence repeated /DEFAULTLIB:libcmt.lib; through
sccache and without it identical up to the COFF timestamp. Without a
pinned CUID HIP objects differ in the __hip_cuid_<hash> name, which
clang derives from the command line sccache slightly changes -- the
build.sh comment that called a hit bit-identical says so now.
- This tree (b11827) configured on Windows: no -Xclang on any Release
TU, ggml-base 9/9 requests cacheable.
A local build with sccache's disk backend hits mozilla/sccache#2788
(HIP --offload-compress vs. the preprocessor cache mode, "Failed to
parse included file path"); that mode does not exist for WebDAV, and
SCCACHE_DIRECT=false avoids it locally. Documented in CLAUDE.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VszvDmRRPP1UcwozsUMY1L
bernardladenthin
had a problem deploying
to
maven-central
October 22, 2026 21:23 — with
GitHub Actions
Failure
bernardladenthin
had a problem deploying
to
startgate
October 22, 2026 21:23 — with
GitHub Actions
Error
bernardladenthin
had a problem deploying
to
maven-central
October 22, 2026 21:23 — with
GitHub Actions
Failure
bernardladenthin
deleted the
sccache-rocm-hip-launcher-and-xclang-override
branch
October 22, 2026 21:25
|
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
-Xclang -flto-visibility-public-std, which sccache refuses, so every TU was a cache miss (the ROCm job is the pipeline's critical path, 2:40-4:15 h). Newllama/cmake/msvc-runtime-gnu-clang.cmake, loaded viaCMAKE_USER_MAKE_RULES_OVERRIDE, selects the same runtime with the driver flag-fms-runtime-lib=static;build-windows-x86_64installs sccache again.build.shaddsCMAKE_HIP_COMPILER_LAUNCHERforGGML_HIPbuilds.build.sh/build.batdefaultSCCACHE_IDLE_TIMEOUT=0, so the job summary's statistics count every request (they showed 67 resp. 2 of ~160).Test plan
Measured locally before the change (one GPU target, sccache 0.18.0 over a local WebDAV server as a stand-in for Depot):
-Xclang)-cuid): every section identical between old and new flags except.drectve(CMake repeated/DEFAULTLIB:libcmt.lib); through sccache vs. without identical up to the COFF timestamp. Unpinned, HIP objects differ only in the__hip_cuid_<hash>name (clang hashes the command line) -- documented inbuild.shand CLAUDE.md.-Xclangon any Release TU.check-natives.py,check-run-scripts.py,check-release-gate.py,check-shared-files.pyclean; workflow parses as YAML.build-windows-x86_64in the### sccache statisticssummary (the first run fills the cache) -- that run gives the real number for 23/27 targets.Related issues / PRs
--offload-compress. mozilla/sccache#2788 matters only for a local build with the disk backend (SCCACHE_DIRECT=false), not for CI over WebDAV.Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.md🤖 Generated with Claude Code
https://claude.ai/code/session_01VszvDmRRPP1UcwozsUMY1L