Skip to main content
QUICK REVIEW

[论文解读] Vis-TOP: Visual Transformer Overlay Processor

Wei Hu, Dian Xu|arXiv (Cornell University)|Oct 21, 2021
Advanced Image and Video Retrieval Techniques参考文献 28被引用 4
一句话总结

Vis-TOP 是一种用于视觉 Transformer 模型的可重构叠加处理器,采用三层两级转换架构,可在多种视觉 Transformer 模型间实现灵活高效的硬件映射。其吞吐量比 GPU 高 1.5 倍,每 DSP 的吞吐量比现有加速器高 2.2 倍至 11.7 倍,为边缘 AI 推理提供了节能且经济高效的解决方案。

ABSTRACT

In recent years, Transformer has achieved good results in Natural Language Processing (NLP) and has also started to expand into Computer Vision (CV). Excellent models such as the Vision Transformer and Swin Transformer have emerged. At the same time, the platform for Transformer models was extended to embedded devices to meet some resource-sensitive application scenarios. However, due to the large number of parameters, the complex computational flow and the many different structural variants of Transformer models, there are a number of issues that need to be addressed in its hardware design. This is both an opportunity and a challenge. We propose Vis-TOP (Visual Transformer Overlay Processor), an overlay processor for various visual Transformer models. It differs from coarse-grained overlay processors such as CPU, GPU, NPE, and from fine-grained customized designs for a specific model. Vis-TOP summarizes the characteristics of all visual Transformer models and implements a three-layer and two-level transformation structure that allows the model to be switched or changed freely without changing the hardware architecture. At the same time, the corresponding instruction bundle and hardware architecture are designed in three-layer and two-level transformation structure. After quantization of Swin Transformer tiny model using 8-bit fixed points (fix_8), we implemented an overlay processor on the ZCU102. Compared to GPU, the TOP throughput is 1.5x higher. Compared to the existing Transformer accelerators, our throughput per DSP is between 2.2x and 11.7x higher than others. In a word, the approach in this paper meets the requirements of real-time AI in terms of both resource consumption and inference speed. Vis-TOP provides a cost-effective and power-effective solution based on reconfigurable devices for computer vision at the edge.

研究动机与目标

  • 为在功耗和面积受限的边缘设备上部署多样化、资源密集型的视觉 Transformer 模型提供解决方案。
  • 通过实现无需硬件重新设计的可重构性,克服通用加速器(如 GPU)和固定架构加速器的局限性。
  • 通过软硬件协同设计的栈,实现高吞吐量和高效的资源利用率,以支持视觉 Transformer 模型。
  • 通过可编程指令包和模块化硬件组件,支持模型演进和新型架构。

提出的方法

  • 本文提出一种三层两级转换架构:模型层、容器层和组件层,实现从神经网络操作到硬件的透明映射。
  • 提出一种自定义指令包,支持在不同 Transformer 块之间动态重构计算和数据流。
  • 硬件设计采用通用模块单元(固定批处理大小)和可重构模块单元(可重构结构),以支持多种注意力和前馈运算。
  • 从硬件视角对模型进行切分,实现在注意力层和 FFN 层之间的细粒度并行处理和流水线操作。
  • 支持将 Swin Transformer tiny 模型进行 8 位定点量化(fix_8),以实现在 ZCU102 FPGA 上的高效部署。
  • 通过指令级调度和跨模型变体的硬件资源复用,优化吞吐量和 DSP 效率。

实验结果

研究问题

  • RQ1单一硬件架构如何高效支持结构各异的多种视觉 Transformer 模型?
  • RQ2在 FPGA 上进行视觉 Transformer 推理时,硬件可重构性与计算效率之间应如何实现最优平衡?
  • RQ3叠加处理器能否在每 DSP 上实现比现有专用加速器更高的吞吐量?
  • RQ4所提出的三层两级转换模型如何实现从软件到硬件的透明映射?
  • RQ5模块化、可组合的硬件单元对资源利用率和推理速度有何影响?

主要发现

  • 在 ZCU102 FPGA 上,Vis-TOP 对量化后的 Swin Transformer tiny 模型实现了 11.83 帧/秒的推理帧率。
  • 与 GPU(Tesla T4)相比,Vis-TOP 的吞吐量高出 1.5 倍,分别为 55.86 帧/秒和 55.86 帧/秒。
  • 与 FTRANS、NPE 和 FQ-BERT 等其他加速器相比,Vis-TOP 的每 DSP 吞吐量高出 2.2 倍至 11.7 倍。
  • Vis-TOP 的每 DSP 吞吐量为 0.1515,显著优于 FTRANS(0.0148)、NPE(0.0669)和 FQ-BERT(0.0129)。
  • Vis-TOP 仅使用 558 个 DSP 切片,远少于 FTRANS 的 6840 个,展现出高资源效率,同时保持高吞吐量。
  • 该设计支持无需更改硬件即可实现模型重构,通过指令更新或新增模块接口,可支持未来的视觉 Transformer 模型。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。