ad6863ed8497a5f87cc8dce0b4a5d56b87b3fc0c
Verified on real BI-V100: flash_attn_func works with head_dim=256 (diff < 0.004, no NaN) flash_attn_varlen_func works for variable-length batching seq=1024: 1.7x faster than PyTorch matmul The profiling-stage _run_sdpa_fallback now tries flash_attn_varlen_func first, falls back to Python Q-tiling only on exception. This addresses the 10-50x attention slowdown identified in the analysis: Python Q-tiling: O(L^2) per-tile matmul in Python loop flash_attn: fused kernel, O(L) memory, hardware-optimized
project_6
Description
Languages
C++
41.8%
Cuda
31.6%
Python
22.2%
C
2.1%
CMake
1.1%
Other
1.1%