Skip to content

Persistent CAGRA: benchmark group and bad config warnings#2091

Open
achirkin wants to merge 1 commit into
rapidsai:release/26.06from
achirkin:enh-benchmark-persistent-cagra
Open

Persistent CAGRA: benchmark group and bad config warnings#2091
achirkin wants to merge 1 commit into
rapidsai:release/26.06from
achirkin:enh-benchmark-persistent-cagra

Conversation

@achirkin
Copy link
Copy Markdown
Contributor

@achirkin achirkin commented May 15, 2026

Improve user experience with CAGRA search persistent kernel mode:

  • make sure SINGLE_CTA algo is selected in persistent mode if it is not passed explicitly
  • warn about incompatible configuration
  • add a cuvs benchmarking group for reference

@achirkin achirkin self-assigned this May 15, 2026
@achirkin achirkin requested review from a team as code owners May 15, 2026 12:15
@achirkin achirkin added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels May 15, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

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: b6030dc5-e6fd-41f0-b357-79fa8aa4254f

📥 Commits

Reviewing files that changed from the base of the PR and between 75136b7 and d81bdc8.

📒 Files selected for processing (3)
  • cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h
  • cpp/src/neighbors/detail/cagra/search_plan.cuh
  • python/cuvs_bench/cuvs_bench/config/algos/cuvs_cagra.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • python/cuvs_bench/cuvs_bench/config/algos/cuvs_cagra.yaml
  • cpp/src/neighbors/detail/cagra/search_plan.cuh

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added logging notifications for persistent CAGRA search concurrency optimization hints when enabled.
  • Improvements

    • Updated algorithm selection strategy for persistent search mode with enhanced debug messaging.
    • Expanded persistent search configuration options for benchmark testing.

Walkthrough

The PR adds persistent CAGRA search support by introducing one-time benchmark logging when persistent search is enabled, implementing persistent-aware algorithm strategy selection with debug and warning logs, and defining the benchmark configuration for persistent testing.

Changes

Persistent CAGRA Search Feature

Layer / File(s) Summary
Benchmark persistent throughput hint logging
cpp/bench/ann/src/cuvs/cuvs_cagra_wrapper.h
Added <atomic> header and a new maybe_log_cagra_persistent_concurrency_hint inline function that uses a static atomic gate to emit a one-time throughput hint when persistent CAGRA search is enabled and benchmark thread concurrency is low. The helper is invoked during set_search_param after dynamic batching updates.
Persistent algorithm strategy selection and validation
cpp/src/neighbors/detail/cagra/search_plan.cuh
Added RAFT logger include and updated strategy selection: when persistent is true with search_algo::AUTO, forces algo = SINGLE_CTA with a debug log; when persistent is true with a non-SINGLE_CTA algorithm, emits a warning that the persistent kernel has no effect.
Persistent group benchmark configuration
python/cuvs_bench/cuvs_bench/config/algos/cuvs_cagra.yaml
Added a new persistent configuration group defining persistent build algorithm (IVF_PQ with updated degree ranges) and persistent search parameters (persistent_device_usage, algo: single_cta, max_iterations, itopk, and search_width ranges).

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.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 accurately describes the main changes: adding a benchmark group for persistent CAGRA and configuration warnings.
Description check ✅ Passed The description is directly related to the changeset and explains the key improvements to persistent CAGRA functionality.
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.

✏️ 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.

Copy link
Copy Markdown
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Artem!

@tfeher tfeher changed the base branch from main to release/26.06 May 15, 2026 13:31
@tfeher tfeher requested review from a team as code owners May 15, 2026 13:31
@tfeher tfeher requested review from KyleFromNVIDIA and removed request for KyleFromNVIDIA May 15, 2026 13:31
@achirkin achirkin force-pushed the enh-benchmark-persistent-cagra branch from 75136b7 to d81bdc8 Compare May 15, 2026 14:18
@achirkin achirkin removed request for a team May 15, 2026 14:18
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: No status

Development

Successfully merging this pull request may close these issues.

2 participants