Skip to content

Prepare three-way partition tuning policies for lookahead - #10077

Merged
bernhardmgruber merged 2 commits into
NVIDIA:mainfrom
bernhardmgruber:tune_three-way
Jul 22, 2026
Merged

Prepare three-way partition tuning policies for lookahead#10077
bernhardmgruber merged 2 commits into
NVIDIA:mainfrom
bernhardmgruber:tune_three-way

Conversation

@bernhardmgruber

Copy link
Copy Markdown
Contributor

Fixes part of: #10075

@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: e94aaa11-6301-415a-a9fc-e2471933d9d0

📥 Commits

Reviewing files that changed from the base of the PR and between e9a6538 and 4581da4.

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

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added explicit algorithm selection for three-way partition tuning, with lookback-specific configuration encapsulated as a dedicated policy.
  • Bug Fixes
    • Fixed dispatch and kernel launch configuration to consistently derive threads/items per thread from the selected lookback sub-policy.
  • Refactor
    • Reworked the three-way partition policy structure to use an algorithm selector plus algorithm-specific lookback tuning.
  • Tests
    • Updated device partition policy tests and expected formatted output to match the revised policy representation.

Walkthrough

Changes

Three-way partition policies now include an explicit lookback algorithm selector and nested tuning configuration. Dispatch, kernels, tests, and benchmarks use the revised policy layout.

Three-way partition policy

Layer / File(s) Summary
Policy model and selection
cub/cub/device/dispatch/tuning/tuning_three_way_partition.cuh
Adds the algorithm enum and lookback sub-policy, updates formatting and comparisons, and wraps selected tuning results.
Dispatch and kernel wiring
cub/cub/device/dispatch/dispatch_three_way_partition.cuh, cub/cub/device/dispatch/kernels/kernel_three_way_partition.cuh
Constructs explicit lookback policies and reads launch and agent parameters from active_policy.lookback.
Selectors, tests, and benchmarks
cub/test/catch2_test_device_partition_env.cu, cub/test/catch2_test_device_partition_env_api.cu, cub/benchmarks/bench/partition/three_way.cu
Updates custom selectors, policy property expectations, string output, and benchmark initialization.

Possibly related issues

Possibly related PRs

  • NVIDIA/cccl#10076 — Applies the same explicit algorithm discriminator and nested policy structure to related partition policies.

Suggested reviewers: gonidelis, pauleonix


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

@github-actions

This comment has been minimized.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 1h 42m: Pass: 100%/287 | Total: 5d 19h | Max: 1h 36m | Hits: 50%/432725

See results here.

@bernhardmgruber
bernhardmgruber merged commit c7f951f into NVIDIA:main Jul 22, 2026
308 of 309 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_three-way branch July 22, 2026 14: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