Skip to content

Allow public tuning of cub::DeviceFind::*BoundSortedValues - #9688

Merged
bernhardmgruber merged 1 commit into
NVIDIA:mainfrom
bernhardmgruber:tune_bound_sorted_values
Jul 3, 2026
Merged

bernhardmgruber merged 1 commit into
NVIDIA:mainfrom
bernhardmgruber:tune_bound_sorted_values

Conversation

@bernhardmgruber

Copy link
Copy Markdown
Contributor

Fixes: #9687

@bernhardmgruber
bernhardmgruber requested a review from a team as a code owner July 2, 2026 10:53
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jul 2, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

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: 46806654-2aa5-46b9-abe5-1a47875d2b5e

📥 Commits

Reviewing files that changed from the base of the PR and between 1eecc8a and c8d40d4.

📒 Files selected for processing (5)
  • cub/cub/device/device_find.cuh
  • cub/cub/device/dispatch/dispatch_find_bound_sorted_values.cuh
  • cub/cub/device/dispatch/tuning/tuning_find_bound_sorted_values.cuh
  • cub/test/catch2_test_device_find_bound_sorted_values_env.cu
  • cub/test/catch2_test_device_find_bound_sorted_values_env_api.cu
✅ Files skipped from review due to trivial changes (1)
  • cub/cub/device/device_find.cuh
🚧 Files skipped from review as they are similar to previous changes (3)
  • cub/test/catch2_test_device_find_bound_sorted_values_env.cu
  • cub/test/catch2_test_device_find_bound_sorted_values_env_api.cu
  • cub/cub/device/dispatch/tuning/tuning_find_bound_sorted_values.cuh

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Expanded tuning documentation for lower/upper bound sorted-value search, including new example snippets and clearer references to the bound-sorted-values tuning policy.
  • Tests
    • Added compile-time coverage validating the new bound-sorted-values tuning policy type traits and initialization/comparison behavior.
    • Added an end-to-end tuned lower-bound sorted-values test using the env-based tuning API to confirm correct results.

Walkthrough

Renames the bound-sorted-values tuning policy type, updates the dispatch path and documentation to use it, and adds compile-time plus runtime coverage for the env-based tuning API.

Changes

Bound-sorted-values tuning API

Layer / File(s) Summary
Policy type and selector updates
cub/cub/device/dispatch/tuning/tuning_find_bound_sorted_values.cuh
FindBoundSortedValuesPolicy replaces the old policy type across operators, selector concepts, and compute-capability return paths.
Dispatch references and tuning docs
cub/cub/device/dispatch/dispatch_find_bound_sorted_values.cuh, cub/cub/device/device_find.cuh
The dispatch kernels use the renamed policy identifier, and DeviceFind docs add tuning guidance plus new literalinclude examples.
Compile-time and API tests
cub/test/catch2_test_device_find_bound_sorted_values_env.cu, cub/test/catch2_test_device_find_bound_sorted_values_env_api.cu
Tests assert policy traits and exercise LowerBoundSortedValues through cuda::execution::tune with a custom selector.

Assessment against linked issues

Objective Addressed Explanation
Productize cub::DeviceFind::*BoundSortedValues tuning API [#9687] ✅
Policy type exposure, selector plumbing, and env-based tuning usage [#9687] ✅

Out-of-scope changes

None.

Suggested reviewers: shwina, NaderAlAwar


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

{
struct find_bound_sorted_values_policy
//! The tuning policy for the LowerBoundSortedValues and UpperBoundSortedValues algorithms in @ref DeviceFind.
struct FindBoundSortedValuesPolicy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important: This should be synched with the FindIf policy rename

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Which name would you suggest?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I mean you renamed FindMEOW to FindIfMEOW so FindIfBoundSortedValuesPolicy

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The If comes from DeviceFind::FindIf. The policy in this PR applies to DeviceFind::UpperBoundSortedValues, which does not contain an If. Is the status quo fine then?

@bernhardmgruber
bernhardmgruber force-pushed the tune_bound_sorted_values branch from 86d8f4e to 1eecc8a Compare July 2, 2026 12:06
@bernhardmgruber
bernhardmgruber enabled auto-merge (squash) July 2, 2026 12:07
@github-actions

This comment has been minimized.

@bernhardmgruber
bernhardmgruber force-pushed the tune_bound_sorted_values branch from 1eecc8a to c8d40d4 Compare July 3, 2026 07:55
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 2h 30m: Pass: 100%/287 | Total: 12d 12h | Max: 2h 30m | Hits: 20%/963357

See results here.

@bernhardmgruber
bernhardmgruber merged commit dedc03c into NVIDIA:main Jul 3, 2026
307 of 308 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Jul 3, 2026
@bernhardmgruber
bernhardmgruber deleted the tune_bound_sorted_values branch July 3, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Productize the cub::DeviceFind::*BoundSortedValues tuning API

2 participants