Skip to main content
CenXiv.org
此网站处于试运行阶段,支持我们!
我们衷心感谢所有贡献者的支持。
贡献
赞助
cenxiv logo > cs > arXiv:2507.11331

帮助 | 高级搜索

计算机科学 > 硬件架构

arXiv:2507.11331 (cs)
[提交于 2025年7月15日 (v1) ,最后修订 2025年7月16日 (此版本, v2)]

标题: SystolicAttention:在单个脉冲阵列中融合FlashAttention

标题: SystolicAttention: Fusing FlashAttention within a Single Systolic Array

Authors:Jiawei Lin, Guokai Chen, Yuanlong Li, Thomas Bourgeat
摘要: Transformer模型高度依赖缩放点积注意力(SDPA),通常使用FlashAttention算法实现。 然而,当前基于行波阵列的加速器在执行FlashAttention时面临重大挑战。 行波阵列只能在连续且大规模的矩阵乘法中实现高利用率。 相比之下,FlashAttention需要频繁交错的矩阵乘法和softmax操作。 行波阵列与外部向量单元之间的频繁数据交换导致行波阵列利用率低下。 此外,softmax涉及大量非矩阵操作,这使得其不太适合行波阵列,进一步加剧了这一问题。 而且,在行波阵列上同时执行矩阵乘法和在向量单元上执行softmax会导致寄存器文件和SRAM端口冲突,进一步降低性能。 为了克服这些限制,我们提出了FSA,一种增强的行波阵列架构,使整个FlashAttention算法能够在单个行波阵列内运行,无需外部向量单元。 FSA的核心是SystolicAttention,这是一种新的调度算法,能够以细粒度、逐元素重叠的方式将FlashAttention操作映射到行波阵列上。 这显著提高了阵列利用率,同时保留了原始的浮点运算顺序,以保持数值稳定性。 我们在可综合的RTL中实现了FSA,并将其性能与最先进的商用加速器进行了对比。 我们的结果表明,与AWS NeuronCore-v2和Google TPUv5e相比,FSA的注意力FLOPs/s利用率分别提高了1.77倍和4.83倍,仅增加了约10%的面积开销。
摘要: Transformer models rely heavily on scaled dot-product attention (SDPA), typically implemented using the FlashAttention algorithm. However, current systolic-array-based accelerators face significant challenges when executing FlashAttention. Systolic arrays can only achieve high utilization for consecutive and large matrix multiplications. In contrast, FlashAttention requires frequently interleaved matrix multiplications and softmax operations. The frequent data swaps between the systolic array and external vector units result in low systolic array utilization. This is further exacerbated by the fact that softmax involves numerous non-matrix operations, which are not well-suited for systolic arrays. Moreover, the concurrent execution of matrix multiplication on systolic arrays and softmax on vector units leads to register file and SRAM port contention, further degrading performance. To overcome these limitations, we propose FSA, an enhanced systolic array architecture that enables the entire FlashAttention algorithm to run entirely within a single systolic array, eliminating the need for external vector units. At the core of FSA is SystolicAttention, a novel scheduling algorithm that maps FlashAttention operations onto systolic arrays with fine-grained, element-wise overlap. This significantly improves array utilization while preserving the original floating-point operation order to maintain numerical stability. We implement FSA in synthesizable RTL and evaluate its performance against state-of-the-art commercial accelerators. Our results show that FSA achieves 1.77x and 4.83x higher attention FLOPs/s utilization compared to AWS NeuronCore-v2 and Google TPUv5e, respectively, with only about 10% area overhead.
主题: 硬件架构 (cs.AR) ; 人工智能 (cs.AI)
引用方式: arXiv:2507.11331 [cs.AR]
  (或者 arXiv:2507.11331v2 [cs.AR] 对于此版本)
  https://doi.org/10.48550/arXiv.2507.11331
通过 DataCite 发表的 arXiv DOI

提交历史

来自: Jiawei Lin [查看电子邮件]
[v1] 星期二, 2025 年 7 月 15 日 14:04:17 UTC (529 KB)
[v2] 星期三, 2025 年 7 月 16 日 13:36:16 UTC (529 KB)
全文链接:

获取论文:

    查看标题为《》的 PDF
  • 查看中文 PDF
  • 查看 PDF
  • HTML(实验性)
  • TeX 源代码
  • 其他格式
许可图标 查看许可
当前浏览上下文:
cs.AR
< 上一篇   |   下一篇 >
新的 | 最近的 | 2025-07
切换浏览方式为:
cs
cs.AI

参考文献与引用

  • NASA ADS
  • 谷歌学术搜索
  • 语义学者
a 导出 BibTeX 引用 加载中...

BibTeX 格式的引用

×
数据由提供:

收藏

BibSonomy logo Reddit logo

文献和引用工具

文献资源探索 (什么是资源探索?)
连接的论文 (什么是连接的论文?)
Litmaps (什么是 Litmaps?)
scite 智能引用 (什么是智能引用?)

与本文相关的代码,数据和媒体

alphaXiv (什么是 alphaXiv?)
CatalyzeX 代码查找器 (什么是 CatalyzeX?)
DagsHub (什么是 DagsHub?)
Gotit.pub (什么是 GotitPub?)
Hugging Face (什么是 Huggingface?)
带有代码的论文 (什么是带有代码的论文?)
ScienceCast (什么是 ScienceCast?)

演示

复制 (什么是复制?)
Hugging Face Spaces (什么是 Spaces?)
TXYZ.AI (什么是 TXYZ.AI?)

推荐器和搜索工具

影响之花 (什么是影响之花?)
核心推荐器 (什么是核心?)
IArxiv 推荐器 (什么是 IArxiv?)
  • 作者
  • 地点
  • 机构
  • 主题

arXivLabs:与社区合作伙伴的实验项目

arXivLabs 是一个框架,允许合作伙伴直接在我们的网站上开发和分享新的 arXiv 特性。

与 arXivLabs 合作的个人和组织都接受了我们的价值观,即开放、社区、卓越和用户数据隐私。arXiv 承诺这些价值观,并且只与遵守这些价值观的合作伙伴合作。

有一个为 arXiv 社区增加价值的项目想法吗? 了解更多关于 arXivLabs 的信息.

这篇论文的哪些作者是支持者? | 禁用 MathJax (什么是 MathJax?)
  • 关于
  • 帮助
  • contact arXivClick here to contact arXiv 联系
  • 订阅 arXiv 邮件列表点击这里订阅 订阅
  • 版权
  • 隐私政策
  • 网络无障碍帮助
  • arXiv 运营状态
    通过...获取状态通知 email 或者 slack

京ICP备2025123034号