Split libcudf benchmark packages and share C++ test helpers #25532
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.48) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 556 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.378
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #25532"
general
weight: 0.35
robertmaynard
Description
Currently the packaged libcudf tests and benchmarks all statically link gtest, gmock, gbench, and nvbench. We switched this behavior across all of RAPIDS in general as part of an effort to make these easier to consume for end-users in https://github.com/rapidsai/build-planning/issues/32. One of the main underlying motivations was a desire to avoid imposing any of these as runtime library requirements for anyone installing our test/benchmark packages as discussed in https://github.com/NVIDIA/cudf/pull/15534. gtest proved particularly challenging because the cudftestutil library that we shipped with helpers could not be reconciled with the various potential user requirements as discussed at https://github.com/NVIDIA/cudf/pull/16644#issuecomment-2307287035. Our solution was to stop providing a cudftestutil library at all and to instead make it an interface CMake target that would be compiled into any consumer's library. The downside of this approach is that it bloats the binaries. While the per-binary bloat is small, we have a large number of test and benchmark binaries, which results in the total size of libcudf-tests package being extremely large. That, in turn, is proving problematic for us in CI, where intermittently slow downloads result in up to an hour of time being spent just downloading this one archive. Here are some artifact download timings from a 15-day sample of 2,366 conda-cpp-tests jobs across 459 first-attempt PR runs.
| Metric | Result |
| --- | ---: |
| Median download time | 1m 33s |
| Downloads taking at least 10 minutes | 208 of 2,366 (8.8%) |
| Downloads taking at least 20 minutes | 129 of 2,366 (5.5%) |
| PR runs estimated to finish at least 10 minutes earlier with typical download times | 68 of 459 (14.8%) |
Example of a slow download
This PR reduces duplication by sharing test and benchmark support through two private libraries.
libcudf-testsships the test helper, andlibcudf-benchmarksships the benchmark executables and their helper. External consumers continue to use the existingcudftestutilinterface targets and can supply their own GoogleTest.Full Conda PR builds compile and upload
libcudf-benchmarksso reviewers can run benchmarks from the CI artifacts without building from source. The shared Conda archive contains both packages, and the packaged C++ test jobs install only their test dependencies. CI skips benchmark smoke tests for PRs and continues to run them in nightly builds.Earlier artifact sizes
The earlier PR build at
e558a648omittedlibcudf-benchmarksfrom the Conda C++ archives. Under that policy, the four archives were 66.0% smaller in total, saving 3.12 GiB relative to the exactmainbase commit (31f1f49e). Current full PR archives also include the standalone benchmark package. Main build · Earlier PR build| Conda C++ artifact | Main | PR | Reduction |
| --- | ---: | ---: | ---: |
| CUDA 12 x86-64 | 1,389.43 MiB | 488.95 MiB | 64.8% |
| CUDA 12 Arm64 | 1,392.17 MiB | 481.48 MiB | 65.4% |
| CUDA 13 x86-64 | 1,026.61 MiB | 341.88 MiB | 66.7% |
| CUDA 13 Arm64 | 1,029.59 MiB | 333.30 MiB | 67.6% |
The CUDA 13.4 x86-64 package measurements below include both the test and standalone benchmark packages. The standalone benchmark package measured 26.76 MiB compressed in the nightly-mode build. Package measurement sources
| Payload | Before | After | Reduction |
| --- | ---: | ---: | ---: |
| Tests, unpacked | 871.80 MiB | 483.09 MiB | 44.6% |
| Benchmarks, unpacked | 875.46 MiB | 138.10 MiB | 84.2% |
| Tests + benchmarks, unpacked | 1,747.26 MiB | 621.19 MiB | 64.5% |
| Tests + benchmarks, compressed Conda packages | 776.52 MiB | 118.76 MiB | 84.7% |
| Compressed
libcudf-testspackage in the PR artifact | 776.52 MiB | 92.00 MiB | 88.2% ||
libcudf_test_helpers.so| N/A | 4.75 MiB | N/A ||
libcudf_benchmark_helpers.so| N/A | 16.19 MiB | N/A |Checklist