Transformer神经网络(TNN)已广泛应用于包括自然语言处理(NLP)、机器翻译和计算机视觉(CV)在内的多种领域。其广泛采用主要得益于多头自注意力模块的卓越性能,该模块用于从序列数据中提取关键特征。多头自注意力模块之后是前馈神经网络,在引入非线性以帮助模型学习复杂模式方面发挥着关键作用。尽管TNN很受欢迎,但针对这两个关键模块的硬件加速器数量有限。大多数先前的工作集中在稀疏架构上,对流行的TNN变体不够灵活。本文介绍了ProTEA,这是一种运行时可编程加速器,专为大多数最先进的transformer编码器的密集计算量身定制。ProTEA旨在通过最大化并行性来降低延迟。我们引入了大型矩阵的高效分块,可以在FPGA内的不同硬件组件之间分配内存和计算资源。我们在Xilinx Alveo U55C高性能数据中心加速卡上对ProTEA进行了运行时评估。实验结果表明,ProTEA可以托管各种流行的transformer网络,并在U55C上配置8个并行注意力头、12层和768的嵌入维度时,在多头自注意力块中使用64的分块大小,在前馈神经网络块中使用6的分块大小,实现接近最优的性能。提供了比较结果,显示ProTEA比NVIDIA Titan XP GPU快2.5倍。结果还表明,与当前最先进的定制FPGA加速器相比,它实现了1.3到2.8倍的加速。
英文摘要:
Transformer neural networks (TNN) have been widely utilized on a diverse range of applications, including natural language processing (NLP), machine translation, and computer vision (CV). Their widespread adoption has been primarily driven by the exceptional performance of their multi-head self-attention block used to extract key features from sequential data. The multi-head self-attention block is followed by feedforward neural networks, which play a crucial role in introducing non-linearity to assist the model in learning complex patterns. Despite the popularity of TNNs, there has been limited numbers of hardware accelerators targeting these two critical blocks. Most prior works have concentrated on sparse architectures that are not flexible for popular TNN variants. This paper introduces \textit{ProTEA}, a runtime programmable accelerator tailored for the dense computations of most of state-of-the-art transformer encoders. \textit{ProTEA} is designed to reduce latency by maximizing parallelism. We introduce an efficient tiling of large matrices that can distribute memory and computing resources across different hardware components within the FPGA. We provide run time evaluations of \textit{ProTEA} on a Xilinx Alveo U55C high-performance data center accelerator card. Experimental results demonstrate that \textit{ProTEA} can host a wide range of popular transformer networks and achieve near optimal performance with a tile size of 64 in the multi-head self-attention block and 6 in the feedforward networks block when configured with 8 parallel attention heads, 12 layers, and an embedding dimension of 768 on the U55C. Comparative results are provided showing \textit{ProTEA} is 2.5$\times$ faster than an NVIDIA Titan XP GPU. Results also show that it achieves 1.3 -- 2.8$\times$ speed up compared with current state-of-the-art custom designed FPGA accelerators.
Unsupervised Recycled FPGA Detection Using Symmetry Analysis
Institute of Information and Communication Technology, Bangladesh University of Engineering and Technology(孟加拉国工程技术大学信息与通信技术研究所);Tallinn University of Technology(塔林理工大学)
FPGA-based Acceleration for Convolutional Neural Networks: A Comprehensive Review
Key Laboratory of Low-Dimensional Quantum Structures and Quantum Control of Ministry of Education, School of Physics and Electronics, Hunan Normal University(教育部低维量子结构与量子控制重点实验室,物理电子学院,湖南师范大学)