arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.09879cs.LG
收藏

面向Tensix架构的LLM推理算子融合

Operator Fusion for LLM Inference on the Tensix Architecture

KylinSoft Co., Ltd, Tianjin, China(KylinSoft有限公司,天津,中国);openKylin Community, Tianjin, China(openKylin社区,天津,中国);College of Computer Science and Technology, National University of Defense Technology, Changsha, China(计算机科学与技术学院,国防科技大学,长沙,中国)

Qingbo Wu, Ke Li, Wenzhu Wang, Jie Yu, Ruian Zhang, Lili Liu

AI总结:

针对Tensix架构的LLM推理瓶颈,提出RMSNorm与矩阵乘法融合的算子融合策略,利用片上SRAM和NoC多播减少DRAM读写与调度开销,在Wormhole平台上实现注意力延迟降低37.44%、MLP延迟降低15.89%,且数值一致性保持98.75%以上。

摘要:

本研究解决了Tenstorrent Tensix架构上Transformer模型的设备端推理瓶颈,并提出了一种增强数据局部性的算子融合策略。RMSNorm与自注意力和FFN中的矩阵乘法融合,使得内存受限和计算受限的算子能够在片上SRAM中连续执行,从而显著减少中间结果的DRAM读写次数和调度开销。为了支持多核并行,利用基于NoC的多播机制,其中行/列主节点高效地将输入和权重分发到核心网格,缓解DRAM带宽争用。在Wormhole平台上使用Qwen2.5-0.5B、Qwen3-0.6B和Qwen3-4B进行的实验显示,注意力延迟降低高达37.44%,MLP延迟降低15.89%,每解码层延迟降低高达7.91%,同时皮尔逊相关系数(PCC)保持在98.75%以上,证实了在数值一致性下显著的端到端效率提升。

英文摘要:

This study addresses on-device inference bottlenecks of Transformer models on Tenstorrent's Tensix architecture and proposes an operator fusion strategy that enhances data locality. RMSNorm is fused with matrix multiplication in self-attention and in the FFN, enabling back-to-back execution of memory-bound and compute-bound operators in on-chip SRAM to significantly reduce DRAM reads/writes of intermediate results and scheduling overhead. To support multi-core parallelism, a NoC-based multicast mechanism is leveraged in which row/column master nodes efficiently distribute inputs and weights across the core mesh, alleviating DRAM bandwidth contention. Experiments on the Wormhole platform with Qwen2.5-0.5B, Qwen3-0.6B, and Qwen3-4B show up to 37.44% latency reduction for attention and 15.89% for MLP, with up to 7.91% reduction per decoder layer, while Pearson Correlation Coefficient (PCC) remains above 98.75%, confirming significant end-to-end efficiency gains under numerical consistency.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑