Skip to content

[BUG]: cub::DeviceReduce tunings do not apply to real-world API calls #6576

Closed

Description

@bernhardmgruber

The benchmarks for cub::DeviceReduce on which all tunings are based target cub::DispatchReduce (the dispatcher), and provided the input range's value type as accumulator type explicitly (the dispatcher has this know). This is not realistic, since a user cannot set the accumulator type the same way at the public API (the accumulator type is not exposed).

For example, reducing I8 over cuda::std::plus deduces accumulator type I32 (because cuda::std::plus{}(I8, I8) -> I32 due to promotion) at the public API, but the benchmark forces it to I8. This skews the MemBoundScaling of the tunings (which were gathered using an accumulator type of I8 but are now scaled to I32), leading to 20% regression for the same tuning when the public API is called (with deduced accum_t I32) over calling via the dispatcher (forced accum_t of I8).

The benchmarks for cub::DeviceReduce should be changed to test realistic workloads which cover uses of the public CUB API.

Activity

  1. bernhardmgruber commented on Apr 16, 2026

    @bernhardmgruber
    ContributorAuthor

    The benchmarks for cub::DeviceScan have the same issue.

  2. moved this from Todo to In Progress in CCCLon May 8, 2026
  3. moved this from In Progress to In Review in CCCLon May 8, 2026
  4. added a commit that references this issue on May 11, 2026
    f03f805
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

No type

Projects

  • Status
    In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions