Skip to content

Switch the remaining C++17 components to C++20#2063

Merged
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
achirkin:enh-cpp-20
May 8, 2026
Merged

Switch the remaining C++17 components to C++20#2063
rapids-bot[bot] merged 4 commits into
NVIDIA:mainfrom
achirkin:enh-cpp-20

Conversation

@achirkin

@achirkin achirkin commented May 6, 2026

Copy link
Copy Markdown
Contributor

Update to C++20 CMake components that are still C++17:

  • C tests
  • benchmarks

Also add a small workaround for a known nvcc issue.

Supersedes #1795 and #1796

@achirkin achirkin self-assigned this May 6, 2026
@achirkin achirkin added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels May 6, 2026
@copy-pr-bot

copy-pr-bot Bot commented May 6, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@achirkin

achirkin commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@achirkin achirkin marked this pull request as ready for review May 7, 2026 03:37
@achirkin achirkin requested review from a team as code owners May 7, 2026 03:37
@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR upgrades C/CUDA language standards from 17 to 20 across test and benchmark CMake configurations, refactors test parameterization in an ANN test suite to use direct Values(...) instead of a named vector, and adjusts JSON diagnostics macro ordering in a benchmark source file.

Changes

C++20 Language Standard Upgrade

Layer / File(s) Summary
CMake Configuration
c/tests/CMakeLists.txt, cpp/bench/ann/CMakeLists.txt
CXX_STANDARD and CUDA_STANDARD are upgraded from 17 to 20 with CXX_STANDARD_REQUIRED and CUDA_STANDARD_REQUIRED set to ON for test executables and ANN benchmark targets.

Test Suite and Benchmark Refinements

Layer / File(s) Summary
Test Parameterization
c/tests/neighbors/ann_mg_c.cu
INSTANTIATE_TEST_SUITE_P is refactored to use ::testing::Values(...) directly instead of building and passing a named test_inputs vector, removing indirection while preserving parameter coverage for IVF-Flat, IVF-PQ, and CAGRA algorithms.
Benchmark Compilation
cpp/bench/ann/src/diskann/diskann_benchmark.cpp
JSON_DIAGNOSTICS macro definition is positioned before the nlohmann/json.hpp include to ensure compile-time JSON library configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Switch the remaining C++17 components to C++20' accurately reflects the main change of updating CMake components from C++17 to C++20 across C tests and benchmarks.
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.
Description check ✅ Passed The PR description clearly describes the changeset: updating C++17 components to C++20 for C tests and benchmarks, plus adding an nvcc workaround.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@achirkin

achirkin commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot rapids-bot Bot merged commit 5f7d5a6 into NVIDIA:main May 8, 2026
242 of 246 checks passed
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

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants