Home Knowledge Base CUDA Cooperative Groups

CUDA Cooperative Groups is the programming model extension that provides flexible, hierarchical thread synchronization and communication beyond the traditional warp and thread block boundaries — enabling grid-wide synchronization, dynamic sub-warp grouping, and multi-block cooperation that were previously impossible or required awkward workarounds in standard CUDA.

Traditional CUDA Hierarchy Limitations

Cooperative Groups Hierarchy

Group LevelSizeSync SupportSince
Thread (1)1 threadN/A
Coalesced Group1-32 threadsYesCUDA 9
Tile (sub-warp)1,2,4,8,16,32YesCUDA 9
Thread BlockUp to 1024Yes (replaces __syncthreads)CUDA 9
Thread Block ClusterMultiple blocksYesCUDA 12 / H100
Grid GroupEntire gridYes (cooperative launch)CUDA 9
Multi-GridMultiple GPUsYesCUDA 9

Key Features

Tiled Partition (Sub-Warp Groups)

auto tile = cg::tiled_partition<16>(this_thread_block());
tile.sync();  // Synchronize 16 threads
int val = tile.shfl(data, 0);  // Shuffle within 16-thread tile

Grid-Wide Synchronization

auto grid = cg::this_grid();
// ... phase 1 computation ...
grid.sync();  // ALL blocks in grid synchronize
// ... phase 2 uses results from phase 1 ...

Thread Block Clusters (CUDA 12 / H100)

Use Cases

CUDA Cooperative Groups is a fundamental evolution of the GPU programming model — it replaces the rigid warp/block/grid hierarchy with flexible, composable thread groups that enable algorithms requiring cross-block cooperation to run efficiently without kernel launch overhead.

cuda cooperative groupsthread block clustercooperative launchgrid syncgpu thread cooperation

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.