Skip to content

Prepare scan-by-key tuning policy for lookahead - #10079

Merged
bernhardmgruber merged 4 commits into
NVIDIA:mainfrom
bernhardmgruber:tune_scan_by_key
Jul 22, 2026
Merged

Prepare scan-by-key tuning policy for lookahead#10079
bernhardmgruber merged 4 commits into
NVIDIA:mainfrom
bernhardmgruber:tune_scan_by_key

Conversation

@bernhardmgruber

Copy link
Copy Markdown
Contributor

Fixes part of: #10075

Fixes part of: NVIDIA#10075

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bernhardmgruber
bernhardmgruber requested review from a team as code owners July 22, 2026 10:29
@bernhardmgruber
bernhardmgruber requested a review from shwina July 22, 2026 10:29
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jul 22, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 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: def1c13f-f5ca-47f1-8eb2-ff125b133cb2

📥 Commits

Reviewing files that changed from the base of the PR and between 4d8580a and def9fa4.

📒 Files selected for processing (1)
  • cub/cub/device/dispatch/tuning/tuning_scan_by_key.cuh
🚧 Files skipped from review as they are similar to previous changes (1)
  • cub/cub/device/dispatch/tuning/tuning_scan_by_key.cuh

📝 Walkthrough

Summary by CodeRabbit

  • Improvements
    • Updated scan-by-key tuning policy to introduce a dedicated lookback policy and an explicit algorithm selector.
    • Improved consistency between lookback settings and kernel launch/tile sizing, including related debug output.
    • Preserved scan-by-key behavior and existing tuning values.
  • Tests
    • Updated scan-by-key device tests to validate the revised nested policy structure and updated policy string formatting.
  • Chores
    • Reformatted a scan-by-key benchmark policy initializer.

Walkthrough

Changes

The scan-by-key tuning policy now contains an explicit algorithm discriminator and nested lookback configuration. Dispatch, benchmarks, and tests use the nested fields for policy selection, kernel setup, tile sizing, and serialization.

Scan-by-key policy refactor

Layer / File(s) Summary
Policy model and selection
cub/cub/device/dispatch/tuning/tuning_scan_by_key.cuh
Adds ScanByKeyLookbackPolicy, nests it in ScanByKeyPolicy, and updates policy conversion and compute-capability selection.
Dispatch and kernel configuration
cub/cub/device/dispatch/dispatch_scan_by_key.cuh
Reads launch bounds, agent parameters, tile sizes, logging, and launcher arguments from policy.lookback.
Policy consumers and validation
cub/benchmarks/bench/scan/exclusive/by_key.cu, cub/test/catch2_test_device_scan_by_key_env.cu, cub/test/catch2_test_device_scan_by_key_env_api.cu
Updates policy initializers, block-size access, designated members, and serialized expectations.

Possibly related PRs

  • NVIDIA/cccl#10077: Refactors a related tuning policy into an algorithm discriminator with nested lookback parameters.
  • NVIDIA/cccl#10081: Applies the same nested lookback policy pattern to dispatch, launch configuration, and tests.

Suggested reviewers: shwina, pauleonix


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

@github-actions

This comment has been minimized.

@davebayer
davebayer enabled auto-merge (squash) July 22, 2026 13:49
@davebayer
davebayer disabled auto-merge July 22, 2026 13:52
Fully-qualify the @ref to ScanByKeyPolicy in the ScanByKeyAlgorithm enum
comment so Doxygen can resolve it from the enum's documentation scope.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bernhardmgruber
bernhardmgruber enabled auto-merge (squash) July 22, 2026 16:08
@github-actions

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 57m: Pass: 100%/287 | Total: 3d 22h | Max: 1h 24m | Hits: 96%/209463

See results here.

@bernhardmgruber
bernhardmgruber merged commit b877315 into NVIDIA:main Jul 22, 2026
306 of 307 checks passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Jul 22, 2026
@bernhardmgruber
bernhardmgruber deleted the tune_scan_by_key branch July 22, 2026 17:58
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.

3 participants