Repository navigation
Fix sccache summary to count CUDA sub-tool cache hits/misses - #8858
Merged
Merged
Conversation
The rapidsai/sccache fork tracks CUDA compilation sub-phases under separate language keys in the JSON stats: "CUDA" (nvcc driver), "CUDA (Device code)" (cudafe++), "PTX" (cicc), and "CUBIN" (ptxas). The summary script only counted hits from "C/C++" and "CUDA", and used compile_requests as the denominator. Since compile_requests only counts top-level nvcc invocations, sub-tool cache misses were invisible to both numerator and denominator, inflating the reported hit rate (e.g. 99% when the true rate was ~93%). Fix both issues: - Include all CUDA-related language keys in the filter - Use hits + misses as the denominator (matching sccache's own "Cache hits rate" calculation)
Contributor
Member
Author
|
/ok to test 0420eda |
Contributor
🥳 CI Workflow Results🟩 Finished in 3h 28m: Pass: 100%/500 | Total: 5d 23h | Max: 3h 27m | Hits: 65%/1125770See results here. |
alliepiper
approved these changes
May 7, 2026
Member
Author
|
Thanks, Allison! |
This was referenced May 7, 2026
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
The sccache execution summary inflates the reported cache hit rate because CUDA sub-tool compilations are invisible to the metric.
The rapidsai/sccache fork tracks CUDA compilation sub-phases under separate language keys in its JSON stats:
"CUDA"— nvcc driver pass"CUDA (Device code)"— cudafe++ pass"PTX"— cicc pass"CUBIN"— ptxas passThe summary script only counted hits from
{"C/C++", "CUDA"}and usedcompile_requestsas the denominator. Sincecompile_requestsonly counts top-level nvcc invocations, sub-tool cache misses were invisible to both numerator and denominator — inflating the reported rate.Concrete example from run 25468002551, job CY (
cudax nvcc GCC / [CTK13.2 GCC15 C++20] Build):compile_requests)hits + misses)This PR:
"CUDA (Device code)","PTX", and"CUBIN"to the language filtercompile_requeststohits + misses(matching sccache's own "Cache hits rate" calculation)Related: NVIDIA/numba-cuda#878 (same fix for numba-cuda's sccache summary action)
Test plan