Skip to content

Fix sccache summary to count CUDA sub-tool cache hits#2046

Open
leofang wants to merge 1 commit intoNVIDIA:mainfrom
leofang:fix/sccache-summary-cuda-subcounts
Open

Fix sccache summary to count CUDA sub-tool cache hits#2046
leofang wants to merge 1 commit intoNVIDIA:mainfrom
leofang:fix/sccache-summary-cuda-subcounts

Conversation

@leofang
Copy link
Copy Markdown
Member

@leofang leofang commented May 7, 2026

Summary

The sccache step summary under-reports the cache hit rate because CUDA sub-tool compilations are excluded from the count.

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 pass

The summary script only counted {"C/C++", "CUDA"}, which captures the nvcc driver pass only. That pass typically has 0 cache hits — the actual hits all land in the sub-tool categories.

This PR adds the missing keys so the reported rate matches sccache's own output.

Related:

Test plan

  • Verified locally with mock JSON matching real CI data
  • The fix will be validated on the next CI run that produces sccache stats

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 the "CUDA" key, which represents just
the top-level nvcc pass and typically shows 0 cache hits.  All the
actual cache hits land in the sub-tool categories.  This caused the
step summary to report 0% hit rate even when sccache's own stats
showed ~34%.

Include all CUDA-related language keys so the reported rate matches
sccache's own "Cache hits rate" output.
@copy-pr-bot
Copy link
Copy Markdown
Contributor

copy-pr-bot Bot commented May 7, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the CI/CD CI/CD infrastructure label May 7, 2026
@leofang leofang self-assigned this May 7, 2026
@leofang leofang added bug Something isn't working P1 Medium priority - Should do labels May 7, 2026
@leofang leofang added this to the cuda.bindings 13.3.0 & 12.9.7 milestone May 7, 2026
@leofang leofang marked this pull request as ready for review May 7, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working CI/CD CI/CD infrastructure P1 Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant