fastvideo-kernel/benchmarks/bench_attn_kernels.py benches all four
attention kernels on the real logged Wan2.1-1.3B shapes plus an L sweep
(1k/4k/16k/32760, H=12 D=128 B=1):
bf16_flash_attn|bf16_sdpa high-precision baseline (labels which ran)
fp8_sageattn SageAttention qk-int8/pv-fp8 (PR #1496 path)
nvfp4_local attn_qat_infer sageattn_blackwell (sm_120a)
nvfp4_flashinfer flashinfer nvfp4_attention_sm120 (SM 12.0/12.1)
Per kernel x shape: CUDA-event latency (mean/std), TFLOPS
(4*B*H*L^2*D), and accuracy (cos / max abs err / mean rel err) vs a
query-chunked fp32 SDPA reference. Inputs are biased (+1.0 mean shift
on q/k) by default because zero-mean randn is blind to the flashinfer
per-block-mean qk-correction head-broadcast bug; --include-zeromean
adds the zero-mean rows for contrast. Lanes probe availability + arch
gates and skip with a printed reason; oversized shapes are preflighted
(chunked reference, qk_correction workspace check) instead of OOMing.
Replaces bench_nvfp4_fp8_attention.py (logic folded in; docs pointer
updated, CPU unit tests renamed to test_attn_kernels_bench.py and
extended for the new --shapes/--bias surface).