Skip to content

Tuning policy cleanup 1/2#9710

Merged
bernhardmgruber merged 11 commits into
NVIDIA:mainfrom
bernhardmgruber:policy_cleanup
Jul 9, 2026
Merged

Tuning policy cleanup 1/2#9710
bernhardmgruber merged 11 commits into
NVIDIA:mainfrom
bernhardmgruber:policy_cleanup

Conversation

@bernhardmgruber

@bernhardmgruber bernhardmgruber commented Jul 6, 2026

Copy link
Copy Markdown
Contributor
  • Proper designated init for ReducePolicy
  • Extend all tests with the missing sub policy tests
  • Rename policy tests
  • Test operator<<

Fixes part of: #9378

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

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Device policy Catch2 tests were renamed to a properties naming scheme, and several tests now verify operator<< output while composite policy tests also compare named sub-policies built through aggregate and designated initialization paths.

Changes

Policy property test updates

Layer / File(s) Summary
Simple test name and stream checks
cub/test/catch2_test_device_adjacent_difference_env.cu, cub/test/catch2_test_device_find_bound_sorted_values_env.cu, cub/test/catch2_test_device_find_env.cu, cub/test/catch2_test_device_for_env.cu, cub/test/catch2_test_device_histogram_env.cu, cub/test/catch2_test_device_merge_env.cu, cub/test/catch2_test_device_merge_sort_env.cu, cub/test/catch2_test_device_run_length_encode_env.cu, cub/test/catch2_test_device_scan_by_key_env.cu, cub/test/catch2_test_device_select_env.cu, cub/test/catch2_test_device_segmented_radix_sort_env.cu
C2H_TEST labels were updated to the properties naming scheme, and these tests now assert non-empty operator<< output with std::ostringstream.
Nested policy construction and comparisons
cub/test/catch2_test_device_memcpy_env.cu, cub/test/catch2_test_device_transform_env.cu, cub/test/catch2_test_device_partition_env.cu, cub/test/catch2_test_device_reduce_env.cu, cub/test/catch2_test_device_scan_env.cu, cub/test/catch2_test_device_segmented_scan_env.cu, cub/test/catch2_test_device_segmented_sort_keys_env.cu, cub/test/catch2_test_device_segmented_reduce_env.cu, cub/test/catch2_test_device_radix_sort_env.cu
Composite policy tests now build named sub-policies, compare aggregate and designated initialization paths, and add component-level equality and stream-output checks.

Possibly related PRs

  • NVIDIA/cccl#8863: Updates the same ReducePassPolicy and ReducePolicy property tests in cub/test/catch2_test_device_reduce_env.cu.
  • NVIDIA/cccl#9685: Adds the segmented radix sort policy type and its operator<<, matching the updated segmented radix sort test here.
  • NVIDIA/cccl#9686: Updates the segmented reduce policy types and their streaming support, which this PR exercises in tests.

Suggested reviewers: shwina, NaderAlAwar, srinivasyadav18


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

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
cub/test/catch2_test_device_segmented_sort_keys_env.cu (1)

613-663: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

suggestion: no STATIC_REQUIRE(p1 == p2) (or partitioning_threshold-specific check) is added alongside the new per-sub-policy comparisons. The component checks don't verify the top-level SegmentedSortPolicy aggregate equality/inequality operator itself.

diff
   STATIC_REQUIRE(p1_medium == p2_medium);
   STATIC_REQUIRE_FALSE(p1_medium != p2_medium);
+
+  STATIC_REQUIRE(p1 == p2);
+  STATIC_REQUIRE_FALSE(p1 != p2);

Source: Path instructions


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7733a74a-f8a2-4126-960e-d8ac82405dd5

📥 Commits

Reviewing files that changed from the base of the PR and between a60fbe3 and 20a2890.

📒 Files selected for processing (20)
  • cub/test/catch2_test_device_adjacent_difference_env.cu
  • cub/test/catch2_test_device_find_bound_sorted_values_env.cu
  • cub/test/catch2_test_device_find_env.cu
  • cub/test/catch2_test_device_for_env.cu
  • cub/test/catch2_test_device_histogram_env.cu
  • cub/test/catch2_test_device_memcpy_env.cu
  • cub/test/catch2_test_device_merge_env.cu
  • cub/test/catch2_test_device_merge_sort_env.cu
  • cub/test/catch2_test_device_partition_env.cu
  • cub/test/catch2_test_device_radix_sort_env.cu
  • cub/test/catch2_test_device_reduce_env.cu
  • cub/test/catch2_test_device_run_length_encode_env.cu
  • cub/test/catch2_test_device_scan_by_key_env.cu
  • cub/test/catch2_test_device_scan_env.cu
  • cub/test/catch2_test_device_segmented_radix_sort_env.cu
  • cub/test/catch2_test_device_segmented_reduce_env.cu
  • cub/test/catch2_test_device_segmented_scan_env.cu
  • cub/test/catch2_test_device_segmented_sort_keys_env.cu
  • cub/test/catch2_test_device_select_env.cu
  • cub/test/catch2_test_device_transform_env.cu

Comment thread cub/test/catch2_test_device_segmented_scan_env.cu

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (1)
cub/test/catch2_test_device_segmented_reduce_env.cu (1)

648-650: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

suggestion: unscoped enumerators (cub::BLOCK_REDUCE_WARP_REDUCTIONS, cub::LOAD_LDG) here vs. scoped cub::BlockReduceAlgorithm::.../cub::CacheLoadModifier::... in the reduce test. Harmless but inconsistent within the same cohort.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1e01a70b-781d-4707-9548-e3ed2a081365

📥 Commits

Reviewing files that changed from the base of the PR and between 20a2890 and 56b9822.

📒 Files selected for processing (3)
  • cub/test/catch2_test_device_reduce_env.cu
  • cub/test/catch2_test_device_segmented_radix_sort_env.cu
  • cub/test/catch2_test_device_segmented_reduce_env.cu
🚧 Files skipped from review as they are similar to previous changes (1)
  • cub/test/catch2_test_device_segmented_radix_sort_env.cu

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (1)
cub/test/catch2_test_device_adjacent_difference_env.cu (1)

275-282: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

suggestion: this to_string lambda + REQUIRE(!to_string(p1).empty()) pattern is duplicated verbatim across ~9 policy test files in this PR stack. Consider hoisting it into a shared test header (e.g. a require_streamable_nonempty(p) helper) to avoid maintaining N copies.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 33425755-662a-4616-af59-05307a84af03

📥 Commits

Reviewing files that changed from the base of the PR and between 56b9822 and 88011d7.

📒 Files selected for processing (20)
  • cub/test/catch2_test_device_adjacent_difference_env.cu
  • cub/test/catch2_test_device_find_bound_sorted_values_env.cu
  • cub/test/catch2_test_device_find_env.cu
  • cub/test/catch2_test_device_for_env.cu
  • cub/test/catch2_test_device_histogram_env.cu
  • cub/test/catch2_test_device_memcpy_env.cu
  • cub/test/catch2_test_device_merge_env.cu
  • cub/test/catch2_test_device_merge_sort_env.cu
  • cub/test/catch2_test_device_partition_env.cu
  • cub/test/catch2_test_device_radix_sort_env.cu
  • cub/test/catch2_test_device_reduce_env.cu
  • cub/test/catch2_test_device_run_length_encode_env.cu
  • cub/test/catch2_test_device_scan_by_key_env.cu
  • cub/test/catch2_test_device_scan_env.cu
  • cub/test/catch2_test_device_segmented_radix_sort_env.cu
  • cub/test/catch2_test_device_segmented_reduce_env.cu
  • cub/test/catch2_test_device_segmented_scan_env.cu
  • cub/test/catch2_test_device_segmented_sort_keys_env.cu
  • cub/test/catch2_test_device_select_env.cu
  • cub/test/catch2_test_device_transform_env.cu
🚧 Files skipped from review as they are similar to previous changes (11)
  • cub/test/catch2_test_device_find_env.cu
  • cub/test/catch2_test_device_merge_env.cu
  • cub/test/catch2_test_device_memcpy_env.cu
  • cub/test/catch2_test_device_segmented_reduce_env.cu
  • cub/test/catch2_test_device_segmented_sort_keys_env.cu
  • cub/test/catch2_test_device_transform_env.cu
  • cub/test/catch2_test_device_select_env.cu
  • cub/test/catch2_test_device_segmented_scan_env.cu
  • cub/test/catch2_test_device_partition_env.cu
  • cub/test/catch2_test_device_scan_env.cu
  • cub/test/catch2_test_device_radix_sort_env.cu

@bernhardmgruber bernhardmgruber mentioned this pull request Jul 6, 2026
1 task
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread cub/test/catch2_test_device_adjacent_difference_env.cu Outdated
@github-actions

This comment has been minimized.

@bernhardmgruber bernhardmgruber changed the title Tuning policy cleanup 1/N Tuning policy cleanup 1/2 Jul 8, 2026
@github-actions

This comment has been minimized.

@bernhardmgruber bernhardmgruber enabled auto-merge (squash) July 8, 2026 19:25
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🥳 CI Workflow Results

🟩 Finished in 9h 17m: Pass: 100%/242 | Total: 1d 08h | Max: 1h 08m | Hits: 99%/149992

See results here.

@bernhardmgruber bernhardmgruber merged commit a90b84c into NVIDIA:main Jul 9, 2026
519 of 524 checks passed
@bernhardmgruber bernhardmgruber deleted the policy_cleanup branch July 9, 2026 21:02
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