Skip to content

Decoupled lookahead warpspeed scan MVP #6644

Closed
28 of 28 issues completed
Closed

Description

@bernhardmgruber

Christmas came early and @ahendriksen gifted us a faster implementation of inclusive scan using a new algorithm called decoupled lookahead. Let's implement it as part of the Munich hackathon.

For an internal presentation+recording of the new algorithm and the source code of the prototype, checkout the discussion on: https://github.com/NVIDIA/cccl_private/issues/404. The most recent scan implementation is based on warpspeed, a small library of utilities for kernel authoring.

For the beginning, we should understand the various techniques and optimizations used and how we can integrate those into CUB:

  • warp specialization
  • 1D TMA loads and their alignment and size requirements (UBLKCP), and how to work around that (overcopy, etc.)
  • pipelining of TMA loads (overlapping multiple TMA stages)
  • persistent CTAs and work stealing (UGETNEXTWORKID)
  • the decoupled look ahead algorithm
  • dynamic SMEM allocation, interplay with static SMEM, SMEM alignment, using arch specific SMEM, setting custom utilitization (cudaFuncAttributeMaxDynamicSharedMemorySize)
  • SMEM layout of the new algorithm including multiple mbarriers, aligned copy destinations, stages, partial aggregates, work ids, etc.
  • maybe fast block reductions, maybe we can just use CUB's BlockReduce or WarpReduce, remains to be seen

To get us started, we will have a presentation of warpspeed and current scan kernel from @ahendriksen.

Based on the internal prototype, this issue now contains sub issues breaking down the integration. We will split the tasks as we see fit after the initial discussion. We should focus on tasks first that could impact performance.

The goal is create an (almost) production ready PR that we can merge into CUB. We should focus an implementation for Blackwell. If we can, it should also run on Hopper. Ampere is not necessary, since the status quo is fine there. We should support CTK >= 12.0.

Sub-issues

Sub-issues

28 of 28 Issues completed
Loading 28 sub-issues

Activity

  1. 28 remaining items

  2. bernhardmgruber commented on Jan 9, 2026

    @bernhardmgruber
    ContributorAuthor

    Is there a video presentation of this algorithm?

    We have a recorded talk internally, but nothing public. Maybe @ahendriksen should do a public talk about the new warpspeed library at some point, since it's awesome ;)

  3. changed the title [-]Decoupled lookahead scan MVP[/-] [+]Decoupled lookahead warpspeed scan MVP[/+] on Jan 29, 2026
  4. bernhardmgruber commented on Jan 29, 2026

    @bernhardmgruber
    ContributorAuthor
  5. added theissue type on Feb 3, 2026
  6. moved this from In Review to In Progress in CCCLon Feb 5, 2026
  7. moved this from In Progress to Done in CCCLon Feb 10, 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