Skip to content

[EPIC] Internal Tuning API for CUB algorithms #7165

Closed
30 of 30 issues completed
Closed

Description

@bernhardmgruber

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:

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

Sub-issues

30 of 30 Issues completed
Loading 30 sub-issues

Activity

  1. added theissue type on Feb 3, 2026
  2. changed the title [-][EPIC] Implement the new tuning API for CUB[/-] [+][EPIC] Finalize public API design for tuning CUB algorithms[/+] on Feb 3, 2026
  3. bernhardmgruber commented on Feb 6, 2026

    @bernhardmgruber
    ContributorAuthor

    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.

  4. changed the title [-][EPIC] Finalize public API design for tuning CUB algorithms[/-] [+][EPIC] Tuning API for CUB algorithms[/+] on Feb 9, 2026
  5. 13 remaining items

  6. changed the title [-][EPIC] Tuning API for CUB algorithms[/-] [+][EPIC] Internal Tuning API for CUB algorithms[/+] on Feb 13, 2026
  7. bernhardmgruber commented on Apr 15, 2026

    @bernhardmgruber
    ContributorAuthor

    Here is the prompt that I usually started a refactoring with:

    Let's look at commit f5ddc3c and a refactoring of it in 61ea9e8. It introduces a restructuring of the CUB dispatch layer to a new tuning API design for DispatchReduce.
    Please apply this rewrite to DispatchThreeWayPartitionIf as well.
    Define the `concept .._policy_selector` in terms of `policy_selector`, see `tuning_transform.cuh` for an example.
    Each policy object in the `tuning_...cuh` header must implement `operator==`, `operator!=` and `operator<<`.
    The policy_selector which replaces the policy_hub should not have any template parameters.
    
    EITHER: You may not introduce any API break into the class DispatchThreeWayPartitionIf. So please add a new dispatch function in a detail namespace below, look at `dispatch_reduce.cuh` for an example.
    OR: You should entirely replace the DispatchThreeWayPartitionIf class by a dispatch function, look at `dispatch_reduce.cuh` for an example.
    
    Run the tests and fix any errors.
    
  8. moved this from Todo to Done in CCCLon May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions