NVIDIA / NVIDIA/cccl

[FEA]: Widen CUB benchmarks to cover extended floating-point types

Open
#9,587 1 comment 0 reactions 0 assignees View on GitHub
cub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

### Is this a duplicate?

- [x] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this request and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)

### Area

CUB

### Is your feature request related to a problem? Please describe.

CUB currently has limited benchmark coverage for extended floating-point data types such as `__half` , `__nv_bfloat16`, FP8, FP4. These types are essential in LLMs, or more in general, in AI workloads. However, most CUB benchmarks still focus primarily on classical C++ integer and floating-point types.

Performance can differ significantly from C++ types due to conversion operations, vectorization, data movement, accumulation, and GPU-specific instructions.

CUB currently only covers `__half` , `__nv_bfloat16` for `DeviceTransform` + `WarpReduce::Sum/Min`.

Benchmarking such types would allow to keep track of regressions and would set baseline for optimization opportunities.

### Describe the solution you'd like

The issue can be closed by adding the benchmarks for:

- `__half` , `__nv_bfloat16`. (potentially FP8, FP4 types but out of scope.)
- Routines: Device/Block/Warp Reduce and Scan at least. To also strongly consider Sort

In order of relevance:

1. `{Device/Block/Warp}Reduce::Sum/Min`
2. `{Device/Block/Warp}Scan::Sum`
3. `{Device/Block}RadixSort` (partially covered by `int16_t`)
4. [optional] Segmented algorithms of the Reduce/Scan/Sort should already benefit from Block/Warp-level improvements of the previous points

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing CUB benchmarks for DeviceTransform and WarpReduce::Sum/Min, then inspect how benchmark coverage is organized for other types. Add coverage for __half and __nv_bfloat16 across the requested Reduce and Scan routines, with RadixSort as a lower priority, and verify the benchmarks build and provide regression baselines.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
hpc, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.