Skip to main content
QUICK REVIEW

[论文解读] A Highly Configurable Hardware/Software Stack for DNN Inference Acceleration

Suvadeep Banerjee, Steve Burns|arXiv (Cornell University)|Nov 29, 2021
Parallel Computing and Optimization Techniques参考文献 35被引用 6
一句话总结

本文通过在 TVM/VTA 架构中增强流水线 ALU 和 GEMM 单元、参数化内存带宽(8–64 字节/周期)以及新增指令,提出了一套高度可配置的软硬件协同堆栈,用于 DNN 推理加速,在面积增加 12 倍的同时,将周期数降低至最多 11.5 倍,并实现了对 ResNet 和 MobileNet 的端到端支持。该敏捷的、逐项功能的开发方法,使得在数十种配置下快速探索面积-性能权衡成为可能。

ABSTRACT

This work focuses on an efficient Agile design methodology for domain-specific accelerators. We employ feature-by-feature enhancement of a vertical development stack and apply it to the TVM/VTA inference accelerator. We have enhanced the VTA design space and enabled end-to-end support for additional workloads. This has been accomplished by augmenting the VTA micro-architecture and instruction set architecture (ISA), as well as by enhancing the TVM compilation stack to support a wide range of VTA configs. The VTA tsim implementation (CHISEL-based) has been enhanced with fully pipelined versions of the ALU/GEMM execution units. In tsim, memory width can now range between 8-64 bytes. Field widths have been made more flexible to support larger scratchpads. New instructions have been added: element-wise 8-bit multiplication to support depthwise convolution, and load with a choice of pad values to support max pooling. Support for more layers and better double buffering has also been added. Fully pipelining ALU/GEMM helps significantly: 4.9x fewer cycles with minimal area change to run ResNet-18 under the default config. Configs featuring a further 11.5x decrease in cycle count at a cost of 12x greater area can be instantiated. Many points on the area-performance pareto curve are shown, showcasing the balance of execution unit sizing, memory interface width, and scratchpad sizing. Finally, VTA is now able to run Mobilenet 1.0 and all layers for ResNets, including the previously disabled pooling and fully connected layers. The TVM/VTA architecture has always featured end-to-end workload evaluation on RTL in minutes. With our modifications, it now offers a much greater number of feasible configurations with a wide range of cost vs. performance. All capabilities mentioned are available in opensource forks while a subset of these capabilities have already been upstreamed.

研究动机与目标

  • 通过支持快速、可配置的软硬件协同设计,降低领域专用加速器的非重复工程(NRE)成本。
  • 通过提升性能、可配置性以及对复杂 DNN 工作负载(如 ResNet 和 MobileNet)的端到端支持,增强 VTA 加速器堆栈。
  • 开发一种敏捷的、增量式的协同设计方法,支持持续集成与快速端到端验证。
  • 扩展 VTA 配置的设计空间,以探索面积-性能权衡,同时在 RTL、仿真和 FPGA 平台之间保持正确性。
  • 通过上游贡献和可重用流程,实现高效、开源的 DNN 推理加速器软硬件协同设计。

提出的方法

  • 采用敏捷的、逐项功能的开发方法,逐步增强 TVM/VTA 堆栈,从一个最小化的 VTA 实现开始。
  • 通过实现完全流水线化的 ALU 和 GEMM 单元,显著降低了周期数。
  • 对内存接口带宽(8–64 字节/周期)和指令集架构(ISA)中字段宽度进行参数化,以支持多样化配置和更大的寄存器堆。
  • 新增指令,包括 8 位逐元素乘法、用于最大池化的选择性加载指令,以及用于加速常见 ResNet 模tern 的截断指令。
  • 扩展 TVM 编译器堆栈,以生成优化的微操作(uops),支持双缓冲机制,并处理新层(如池化层和全连接层)。
  • 实现持续集成流水线,包含 fsim(行为模型)、tsim(基于 Verilator 的 RTL 仿真)和 FPGA 仿真,以确保所有阶段的正确性。

实验结果

研究问题

  • RQ1敏捷的、增量式的方法如何降低领域专用加速器开发中的 NRE 成本?
  • RQ2在可配置加速器上实现对复杂 DNN(如 ResNet 和 MobileNet)的端到端支持,需要哪些软硬件增强?
  • RQ3流水线化和参数化在最小面积开销下,能将性能提升到何种程度?
  • RQ4统一的软硬件协同设计流程如何实现对数十种配置下面积-性能权衡的快速探索?
  • RQ5仿真和持续集成在迭代式硬件与编译器增强过程中,如何维持正确性?

主要发现

  • 在默认配置下,完全流水线化的 ALU 和 GEMM 单元使 ResNet-18 的周期数降低了约 4.9 倍,面积增加极小。
  • 通过调优配置参数,周期数进一步降低了约 11.5 倍,代价约为 12 倍的面积增加,表明存在广阔的性能-面积权衡空间。
  • 在面积-性能帕累托曲线上暴露了数十个中间配置,支持对执行单元大小、内存带宽和寄存器堆大小的系统性探索。
  • 增强后的堆栈现已支持 ResNet 和 MobileNet 1.0 的所有层,包括此前不支持的池化层和全连接层。
  • 在 RTL 上的端到端工作负载评估现在仅需几分钟,支持快速反馈,用于协同设计与 DNN 架构探索。
  • 关键的内存时序错误仅在 FPGA 平台上被发现,凸显了尽管有快速 RTL 仿真,FPGA 级集成测试仍具有重要价值。

更好的研究,从现在开始

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

无需绑定信用卡

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