Repository navigation
Radix sort policy name improvements - #9489
Conversation
Prefer num_private_partitions
SummaryThis PR refactors the CCCL library's radix sort tuning policies to improve naming consistency, standardize member ordering, and remove obsolete configuration options. The changes introduce an algorithm enumeration to replace a boolean flag and rename partition-related members across multiple policy structures. Key ChangesPolicy Structure UpdatesNaming improvements:
Algorithm selection refactor:
Member reordering:
Dispatch and Kernel UpdatesPolicy selection (dispatch_radix_sort.cuh):
Kernel wiring (kernel_radix_sort.cuh):
Benchmark and Policy Selection UpdatesPolicy selector (policy_selector.h):
Segmented radix sort tuning (tuning_segmented_radix_sort.cuh):
Test updates (catch2_test_device_radix_sort_env.cu):
Impact
WalkthroughReplaces the ChangesRadix Sort Policy Struct Refactor
Suggested reviewers
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cub/benchmarks/bench/radix_sort/policy_selector.h (1)
30-30: suggestion:__scale_num_partslacks documentation despite being used in benchmark policy tuning. While the function has_CCCL_HOST_DEVICE_APIattributes suggesting formal exposure, the double-underscore prefix and absence of comments create ambiguity about stability. Add a comment explaining the function's role in scaling histogram partitions based on key size, or consider moving it to a public location if it's a stable tuning interface.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 590ad3c6-49ea-4d85-888f-cb207c0fbdb5
📒 Files selected for processing (6)
cub/benchmarks/bench/radix_sort/policy_selector.hcub/cub/device/dispatch/dispatch_radix_sort.cuhcub/cub/device/dispatch/kernels/kernel_radix_sort.cuhcub/cub/device/dispatch/tuning/tuning_radix_sort.cuhcub/cub/device/dispatch/tuning/tuning_segmented_radix_sort.cuhcub/test/catch2_test_device_radix_sort_env.cu
🥳 CI Workflow Results🟩 Finished in 1h 41m: Pass: 100%/287 | Total: 6d 12h | Max: 1h 08m | Hits: 43%/479080See results here. |
Here are a few improvements to the radix sort tuning policies:
num_partsin radix histogram policy tonum_private_partitionsrank_num_partsin radix onesweep policy toranknum_private_partitionsradix_bitslast in all affected policiesradix_sort_onesweep_policyfor consistency with other tuning policiesonesweep_radix_bitsfromradix_sort_policy. It seems this was added by accident and it's unused.bool use_onesweepinto an algorithm enumerationcub.bench.radix_sort.pairs.basefor SM80;90;100