Files
project_6/vllm/attention
project_6 2c43eb524f [flash_attn] CCCL-derived autotune configs: num_stages=2 + small-tile
Two findings from CCCL benchmarks applied to Triton autotune configs:

1. num_stages=2 (from transform bif=8 finding):
   CCCL transform benchmark (babelstream.cu) search space includes
   TUNE_BIF_BIAS from -16 to +16. BI-V100 bench found bif=8 (64KB
   prefetch window) dominates across all problem sizes. Physical basis:
     BW_per_SM × memory_latency = 56 GB/s × 1100ns ≈ 62KB
   Triton's num_stages is the software pipelining equivalent of CCCL's
   bytes_in_flight. num_stages=2 doubles the prefetch window from ~32KB
   to ~64KB, matching the optimal BW×latency product.

2. Small-tile high-occupancy (from scan no_delay finding):
   CCCL scan benchmark (sum.cu) found dcid=0 (no_delay) optimal on
   BI-V100 because 16 SMs produce only ~32 CTAs, so the tile_status
   array fits entirely in 6MB L2 with zero inter-CTA contention.
   Implication: more smaller CTAs can saturate the 16 SMs better than
   fewer large CTAs, especially for short sequences.

Added 3 new configs, all with num_stages=2 or waves_per_eu=4.
Triton autotune will select the fastest; no risk of regression.

Source: cccl_upstream/cub/benchmarks/bench/transform/babelstream.cu
        cccl_upstream/cub/benchmarks/bench/scan/exclusive/sum.cu
2026-08-05 03:09:45 +00:00
..