Study note

FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning

Properties

Type
Blogs
Status
待读
Domain
AI / ML
Category
GPU、CUDA 与内核优化
Source
arxiv.org
Vault note
library/articles/ai_ml/FlashAttention-2-Faster-Attention-with-Better-Parallelism-and-Work-Partitioning-c497b0fcc02dfc72.md

Summary

FlashAttention-2 在 FlashAttention 的 IO-aware 分块基础上,减少非矩阵乘浮点操作,调整 warp 间工作划分,并在序列长度维度提升并行度,以提高 GPU 占用和 Tensor Core 利用效率。

Highlights

适合用来回答“算法已经减少 HBM 访问后,为什么还需要继续优化”。重点比较 FA1/FA2 的并行划分、warp 通信与不同 batch/head/sequence shape 下的有效并行度,再与 Triton Fused Attention 实现对应阅读。

Comments

Loading comments...