Skip to content

Enable sccache preprocessor-cache mode for wheel builds - #1826

Open
ramakrishnap-nv wants to merge 1 commit into
mainfrom
enable-wheel-sccache-preprocessor-cache
Open

Enable sccache preprocessor-cache mode for wheel builds#1826
ramakrishnap-nv wants to merge 1 commit into
mainfrom
enable-wheel-sccache-preprocessor-cache

Conversation

@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator

Summary

  • ci/build_wheel.sh already sources rapids-configure-sccache (shared with ci/build_cpp.sh), so sccache itself was already active for wheel-build-libcuopt's C++ compile. What was missing: SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE / SCCACHE_S3_PREPROCESSOR_CACHE_KEY_PREFIX.
  • Without preprocessor-cache mode, sccache's default "direct mode" keys the cache on the literal compiler invocation (e.g. include paths), which tends to miss across CI runs that check out into a fresh container path each time — exactly wheel-build-libcuopt's situation. Preprocessor-cache mode keys on the preprocessed source content instead, so path differences don't cause cache misses.
  • Confirmed this is the established RAPIDS pattern, not a guess: cudf's ci/build_wheel.sh and rmm's ci/build_wheel_cpp.sh both set exactly these two vars in the same place. rapids-configure-sccache (gha-tools) does not set them itself, so it's expected to be opt-in per repo.
  • ci/build_wheel.sh is shared across libcuopt/cuopt/cuopt_server/cuopt_sh_client wheel builds; package_name is always passed as the first positional arg by all four callers, so this is safe. It's a no-op for the pure-Python packages (cuopt, cuopt_server, cuopt_sh_client) since sccache is never invoked for them anyway — only libcuopt's C++ compile is affected.

Test plan

  • wheel-build-libcuopt CI passes
  • Compare sccache --show-adv-stats output (already printed at the end of the script) across two PR runs touching the same C++ source, to confirm cache hit rate improves versus the current baseline

🤖 Generated with Claude Code

Wheel builds run in a fresh container path on every CI run, which
defeats sccache's default direct-mode cache key (it hashes the literal
compiler invocation, including include paths). Preprocessor-cache mode
hashes the preprocessed source instead, so it survives that.

sccache itself was already configured here via rapids-configure-sccache
(shared with the conda build), but the preprocessor-cache env vars were
never set. cudf's and rmm's wheel builds set the same two vars in the
same place; rapids-configure-sccache (gha-tools) does not set them
itself, so they're expected to be opt-in per repo.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ramakrishnap-nv
ramakrishnap-nv requested a review from a team as a code owner August 28, 2026 16:34
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6bd7efed-2987-4e8d-930f-176e4d3284ad

📥 Commits

Reviewing files that changed from the base of the PR and between 05a208e and d1a2d8b.

📒 Files selected for processing (1)
  • ci/build_wheel.sh

Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Wheel build caching

Layer / File(s) Summary
Configure wheel build cache
ci/build_wheel.sh
The wheel build exports sccache S3 preprocessor-cache settings with a package-, architecture-, and CUDA-version-specific key prefix.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to d1a2d

This change enables sccache preprocessor-cache mode for wheel builds, with no actionable merge-blocking risk remaining beyond normal checks and review.

Suggested reviewers: msarahan, jameslamb

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: enabling sccache preprocessor-cache mode for wheel builds.
Description check ✅ Passed The description directly explains the sccache configuration changes, their purpose, scope, and test plan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enable-wheel-sccache-preprocessor-cache

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

CI Test Summary

✅ All 13 test job(s) passed. (2 skipped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant