951afd0c02a2ce78a0570b2d528ea0bdf2ceb41a
Source: cccl_upstream/cub/cub/device/dispatch/dispatch_reduce.cuh
cccl_upstream/cub/cub/grid/grid_even_share.cuh
Replace ad-hoc V1/V2 heuristic with CCCL's precise work distribution:
- max_blocks = sm_occupancy × sm_count × subscription_factor (1×16×5=80)
- total_tiles = ceil_div(max_seq_len, PARTITION_SIZE)
- grid_size = min(total_tiles, max_blocks)
- V1 when grid_size==1 OR seq×head parallelism saturates GPU
CCCL kernel_reduce.cuh insight: !StableReductionOrder uses atomicAdd
for single-kernel finish. BI-V100 with 16 SMs -> max 80 CTAs ->
atomic contention negligible -> nondeterministic path is optimal.
project_6
Description
Languages
C++
41.8%
Cuda
31.6%
Python
22.2%
C
2.1%
CMake
1.1%
Other
1.1%