Study note
FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
Properties
- Type
- Blogs
- Status
- 待读
- Domain
- AI / ML
- Category
- GPU、CUDA 与内核优化
- Source
- arxiv.org
- Vault note
library/articles/ai_ml/FlashAttention-Fast-and-Memory-Efficient-Exact-Attention-with-IO-Awareness-413f3975f289fdd0.md
Summary
FlashAttention 原始论文,从 GPU 内存层级和 IO 复杂度出发,通过分块计算与 online softmax 避免把完整注意力矩阵写回高带宽显存,在保持精确注意力语义的同时减少 HBM 访问。
Highlights
核心不只是“融合算子”,而是以 SRAM 容量约束重新安排 Q、K、V 和 Softmax 的数据流。阅读时应手推分块 online softmax 的最大值、归一化分母与输出更新,并能解释数学等价不代表浮点逐位一致。
Comments
Loading comments...