Skip to content

Comments

Use sccache-dist build cluster for conda and wheel builds#848

Open
trxcllnt wants to merge 15 commits intoNVIDIA:mainfrom
trxcllnt:fea/sccache-dist
Open

Use sccache-dist build cluster for conda and wheel builds#848
trxcllnt wants to merge 15 commits intoNVIDIA:mainfrom
trxcllnt:fea/sccache-dist

Conversation

@trxcllnt
Copy link
Member

@trxcllnt trxcllnt commented Feb 11, 2026

Description

RAPIDS has deployed an autoscaling cloud build cluster that can be used to accelerate building large RAPIDS projects.

This PR updates the conda and wheel builds to use the build cluster.

Summary by CodeRabbit

  • Chores

    • Expanded build configuration with new options for distributed compilation caching, S3 preprocessor caching, parallelism, timeouts and logging to improve build performance and reliability.
    • Updated ignore list to exclude generated compilation database files.
  • Bug Fixes

    • Corrected hex formatting in verification output to ensure accurate seed display.

@trxcllnt trxcllnt requested a review from a team as a code owner February 11, 2026 01:23
@trxcllnt trxcllnt requested a review from msarahan February 11, 2026 01:23
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds compile_commands.json to .gitignore; expands sccache-related secrets and environment defaults in conda recipes; updates CMake to add argparse and CUDA options and link CUDA runtime in a test; and fixes a printf format specifier for a size_t seed in cuts.cpp.

Changes

Cohort / File(s) Summary
Gitignore
.gitignore
Added compile_commands.json entry (placed after token_cache.json) to ignore Clang compilation database.
Conda build recipes
conda/recipes/cuopt/recipe.yaml, conda/recipes/libcuopt/recipe.yaml
Added secret SCCACHE_DIST_AUTH_TOKEN; introduced/expanded many SCCACHE-related env vars and defaults (bucket, auth type, fallback, retries, request timeout, scheduler URL, error log, idle timeout, no-cache/recache flags, region, S3 options including preprocessor cache prefix and SSL, server log); added NVCC_APPEND_FLAGS and PARALLEL_LEVEL.
Top-level CMake and CLI
cpp/CMakeLists.txt
Added rapids_cpm_find for argparse, created GLOBAL_TARGET argparse::argparse, and linked argparse::argparse privately to cuopt_cli.
Test CMake changes
cpp/libmps_parser/tests/CMakeLists.txt, cpp/tests/linear_programming/CMakeLists.txt
In libmps_parser tests, set CUDA target properties (CUDA_STANDARD 20, CUDA_STANDARD_REQUIRED ON, POSITION_INDEPENDENT_CODE ON); in linear_programming tests, added PRIVATE CUDA::cudart linkage to c_api_tester.
Source fix
cpp/src/cuts/cuts.cpp
Changed printf format specifier for a size_t seed from %20x to %20zx to match size_t hex formatting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main objective: configuring conda and wheel builds to use sccache-dist. It is specific, concise, and directly reflects the primary changes in the conda recipe files and build configuration.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@trxcllnt trxcllnt requested a review from a team as a code owner February 11, 2026 19:42
@trxcllnt trxcllnt requested a review from tmckayus February 11, 2026 19:42
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@cpp/tests/CMakeLists.txt`:
- Around line 40-47: The CMake snippet sets INTERFACE_POSITION_INDEPENDENT_CODE
on the test target ${CMAKE_TEST_NAME}, which is a transitive property and
ineffective for executables; change the property to POSITION_INDEPENDENT_CODE so
the test target itself is built with PIC. Locate the set_target_properties call
for ${CMAKE_TEST_NAME} and replace INTERFACE_POSITION_INDEPENDENT_CODE with
POSITION_INDEPENDENT_CODE (keeping the other properties like CXX_STANDARD and
CXX_STANDARD_REQUIRED unchanged).

@trxcllnt trxcllnt added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Feb 11, 2026
@trxcllnt trxcllnt requested review from rgsl888prabhu and removed request for msarahan February 18, 2026 16:53
@trxcllnt trxcllnt requested a review from a team as a code owner February 19, 2026 04:33
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cpp/CMakeLists.txt (1)

520-528: ⚠️ Potential issue | 🟠 Major

Use argparse::argparse instead of bare argparse for CMake target linking.

When rapids_cpm_find resolves argparse via find_package (e.g., system-installed in a conda environment), the CMake config exports only the namespaced argparse::argparse target. The bare argparse target would be unavailable, causing link failures. Using argparse::argparse is compatible with both paths: the CPM-fetched source (which creates both the target and alias) and pre-installed packages (which export the namespaced target).

♻️ Proposed fix
 target_link_libraries(cuopt_cli
   PUBLIC
   cuopt
   OpenMP::OpenMP_CXX
   ${CUDSS_LIBRARIES}
   TBB::tbb
   PRIVATE
-  argparse
+  argparse::argparse
 )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cpp/CMakeLists.txt` around lines 520 - 528, Change the CMake link target for
argparse to use the namespaced target so linking works with both CPM-fetched and
system-installed packages: in the target_link_libraries call for cuopt_cli,
replace the bare argparse entry with argparse::argparse (i.e., update the
target_line that currently lists argparse to argparse::argparse) so CMake links
the correct exported target when find_package provides only the namespaced
target.
🧹 Nitpick comments (1)
cpp/CMakeLists.txt (1)

256-263: Consider guarding the argparse fetch within the NOT BUILD_LP_ONLY block.

argparse is only consumed by cuopt_cli, which is compiled only when NOT BUILD_LP_ONLY. The unconditional rapids_cpm_find will fetch/resolve argparse even in LP-only builds where it is never used.

♻️ Suggested refactor

Move the rapids_cpm_find(argparse ...) block inside the existing guard (around line 495):

-rapids_cpm_find(
-  argparse 3.2.0
-  CPM_ARGS
-  GIT_REPOSITORY https://github.com/p-ranav/argparse.git
-  GIT_TAG v3.2
-  GIT_SHALLOW TRUE
-  OPTIONS "ARGPARSE_INSTALL TRUE"
-)
-
 find_package(CUDSS REQUIRED)
 ...
 if(NOT BUILD_LP_ONLY)
+  rapids_cpm_find(
+    argparse 3.2.0
+    CPM_ARGS
+    GIT_REPOSITORY https://github.com/p-ranav/argparse.git
+    GIT_TAG v3.2
+    GIT_SHALLOW TRUE
+    OPTIONS "ARGPARSE_INSTALL TRUE"
+  )
   add_executable(cuopt_cli cuopt_cli.cpp)
   ...
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cpp/CMakeLists.txt` around lines 256 - 263, The rapids_cpm_find call for the
argparse dependency is unconditional but argparse is only used by cuopt_cli
which is built when NOT BUILD_LP_ONLY; move the rapids_cpm_find(argparse 3.2.0
...) block into the existing conditional that guards the cuopt_cli target (the
NOT BUILD_LP_ONLY branch) so argparse is only fetched for builds that actually
compile cuopt_cli (update the block that checks BUILD_LP_ONLY accordingly and
keep the existing CPM_ARGS/GIT_REPOSITORY/GIT_TAG/OPTIONS fields intact).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cpp/src/cuts/cuts.cpp`:
- Line 2749: Replace the non-portable printf format specifiers for the size_t
variable seed: in the printf call printing the solution hash (currently using
"%20lx") change it to use "%20zx" (portable size_t specifier), and also update
the matching specifier inside read_saved_solution_for_cut_verification (which
currently uses "%20x" for size_t seed) to "%20zx"; ensure both uses reference
the same variable name seed and compile to verify no warnings remain.

In `@cpp/tests/linear_programming/CMakeLists.txt`:
- Around line 33-36: The target_link_libraries for the static target
c_api_tester is currently linking the entire CUOPT_PRIVATE_CUDA_LIBS set; change
it so c_api_tester links only CUDA::cudart because c_api_test.c (which includes
cuopt_c.h and cuda_runtime.h) does not directly use cuBLAS-Lt, cuRAND, cuSOLVER,
TBB, or OpenMP—those are provided by the cuopt shared library. Update the
target_link_libraries invocation for c_api_tester to reference only CUDA::cudart
instead of ${CUOPT_PRIVATE_CUDA_LIBS}, leaving the cuopt shared library to keep
the full private link set.

---

Outside diff comments:
In `@cpp/CMakeLists.txt`:
- Around line 520-528: Change the CMake link target for argparse to use the
namespaced target so linking works with both CPM-fetched and system-installed
packages: in the target_link_libraries call for cuopt_cli, replace the bare
argparse entry with argparse::argparse (i.e., update the target_line that
currently lists argparse to argparse::argparse) so CMake links the correct
exported target when find_package provides only the namespaced target.

---

Nitpick comments:
In `@cpp/CMakeLists.txt`:
- Around line 256-263: The rapids_cpm_find call for the argparse dependency is
unconditional but argparse is only used by cuopt_cli which is built when NOT
BUILD_LP_ONLY; move the rapids_cpm_find(argparse 3.2.0 ...) block into the
existing conditional that guards the cuopt_cli target (the NOT BUILD_LP_ONLY
branch) so argparse is only fetched for builds that actually compile cuopt_cli
(update the block that checks BUILD_LP_ONLY accordingly and keep the existing
CPM_ARGS/GIT_REPOSITORY/GIT_TAG/OPTIONS fields intact).

Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, yes we totally should do this.

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

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants