Repository navigation
Description
We designed a new tuning API for CUB with the goal to simplify the internal implementation of the CUB dispatchers, improve the CCCL.C integration, and eventually allow users to supply custom tunings to CUB algorithms. The design and first implementation to test the feasibility are documented here: #6368. The entire design is described in this document: https://docs.google.com/document/u/1/d/1KtrSsMk2LAXSB5cdAUnmn3BMow5y6B8BhC5-XVA434g
This issue tracks the implementation status across CUB.
The new tuning API has been internally implemented in CUB and CCCL.C for:
- Implement the new tuning API for
DeviceRadixSort#6767 - Implement the new tuning API for
DeviceReduce#6544 - Implement the new tuning API for
DeviceSegmentedReduce#7334 - Implement the new tuning API for
DeviceTransform#6914 - [CUB]: Use the new tuning API for nondeterministic reduce #6932
- Implement the new tuning API for
DispatchAdjacentDifference#7522 - Implement the new tuning API for DeviceAdjacentDifference part 2 #7918
- Implement the new tuning API for
detail::for_each::dispatch_t#7525 - Implement the new tuning API for
DeviceRleDispatch#7532 - Implement the new tuning API for
detail::merge::dispatch_t#7638 - Implement the new tuning API for deterministic (rfa) reduce dispatch #7346
- Implement the new tuning API for
detail::reduce::dispatch_streaming_arg_reduce_t#7645 - Implement the new tuning API for
DispatchReduceByKey#7531 - Implement the new tuning API for
detail::find::dispatch_t#7812 - Implement the new tuning API for
DispatchSegmentedRadixSort#7642 - Implement the new tuning API for
DispatchStreamingReduceByKey#7533 - Implement the new tuning API for
DispatchTopK#7648 - Implement the new tuning API for
DispatchSegmentedSort#7643 - Implement the new tuning API for
DispatchThreeWayPartitionIf#7646 - Implement the new tuning API for
DeviceScan#7521 - Implement the new tuning API for
DispatchMergeSort#7639 - Implement the new tuning API for
DispatchBatchMemcpy#7636 - Implement the new tuning API for
DispatchHistogram#7637 - Implement the new tuning API for
DispatchSelectIf#7644 - Implement the new tuning API for
DispatchScanByKey#7640 - Implement the new tuning API for
DispatchUniqueByKey#7647 - Implement the new tuning API for
detail::batched_topk::dispatch_batched_topk#8479 - Implement the new tuning API for
DispatchFixedSizeSegmentedReduce#7641 - Implement the new tuning API for
detail::segmented_scan::dispatch_segmented_scan#8424
We furthermore need to add tests for users using the dispatcher directly to specify custom tunings:
To proceed further, we require environment overloads for all CUB APIs.
When we have those, we can start using the new tuning APIs already internally: #7464
After all above tasks are complete, we are ready to publicly roll it out, which continues in: #7465
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-][EPIC] Implement the new tuning API for CUB[/-][+][EPIC] Finalize public API design for tuning CUB algorithms[/+]histogramto use new tuning API #7475DeviceScan#7521bernhardmgruber commentedon Feb 6, 2026
I have tried to approach the reduce by key dispatchers from a few angles, but it seems we have to refactor #7531, #7532 and #7533 together, since they interdepend on each other.
[-][EPIC] Finalize public API design for tuning CUB algorithms[/-][+][EPIC] Tuning API for CUB algorithms[/+]13 remaining items
DispatchSelectIf#7644detail::reduce::dispatch_streaming_arg_reduce_t#7645DispatchThreeWayPartitionIf#7646DispatchTopK#7648DispatchUniqueByKey#7647[-][EPIC] Tuning API for CUB algorithms[/-][+][EPIC] Internal Tuning API for CUB algorithms[/+]detail::find::dispatch_t#7812detail::segmented_scan::dispatch_segmented_scan#8424bernhardmgruber commentedon Apr 15, 2026
Here is the prompt that I usually started a refactoring with:
detail::batched_topk::dispatch_batched_topk#8479