Skip to main content
QUICK REVIEW

[论文解读] DNNVM : End-to-End Compiler Leveraging Heterogeneous Optimizations on FPGA-based CNN Accelerators

Yu Xing, Shuang Liang|arXiv (Cornell University)|Feb 20, 2019
Advanced Neural Network Applications参考文献 37被引用 9
一句话总结

DNNVM 是一种端到端的FPGA编译器,通过统一图、循环和数据布局优化来加速CNN推理。通过将优化建模为图级变换并使用启发式子图同构算法,DNNVM在Xilinx FPGA上实现了比原始实现最高1.26倍的加速,并在VGG(2.82 TOPs/s)和ResNet50(1.38 TOPs/s)上达到业界领先性能,同时资源占用更低。

ABSTRACT

The convolutional neural network (CNN) has become a state-of-the-art method for several artificial intelligence domains in recent years. The increasingly complex CNN models are both computation-bound and I/O-bound. FPGA-based accelerators driven by custom instruction set architecture (ISA) achieve a balance between generality and efficiency, but there is much on them left to be optimized. We propose the full-stack compiler DNNVM, which is an integration of optimizers for graphs, loops and data layouts, and an assembler, a runtime supporter and a validation environment. The DNNVM works in the context of deep learning frameworks and transforms CNN models into the directed acyclic graph: XGraph. Based on XGraph, we transform the optimization challenges for both the data layout and pipeline into graph-level problems. DNNVM enumerates all potentially profitable fusion opportunities by a heuristic subgraph isomorphism algorithm to leverage pipeline and data layout optimizations, and searches for the best choice of execution strategies of the whole computing graph. On the Xilinx ZU2 @330 MHz and ZU9 @330 MHz, we achieve equivalently state-of-the-art performance on our benchmarks by naïve implementations without optimizations, and the throughput is further improved up to 1.26x by leveraging heterogeneous optimizations in DNNVM. Finally, with ZU9 @330 MHz, we achieve state-of-the-art performance for VGG and ResNet50. We achieve a throughput of 2.82 TOPs/s and an energy efficiency of 123.7 GOPs/s/W for VGG. Additionally, we achieve 1.38 TOPs/s for ResNet50 and 1.41 TOPs/s for GoogleNet.

研究动机与目标

  • 为解决由于次优数据布局和流水线调度导致的FPGA加速器在CNN推理中的性能与效率差距。
  • 通过在多个抽象层次上自动化优化,降低为多样化CNN模型手动调优FPGA内核的复杂性。
  • 通过统一的编译器栈实现在资源受限FPGA上的高吞吐量、高能效推理。
  • 在不依赖大容量片上内存的前提下,实现对VGG和ResNet50等标准CNN模型的业界领先性能。

提出的方法

  • DNNVM将CNN模型编译为一种与框架无关的中间图表示形式,称为XGraph。
  • 它将数据布局和流水线优化问题形式化为图级问题,从而实现对融合机会的全局探索。
  • 采用启发式子图同构算法,枚举跨层和操作的所有潜在高效融合模式。
  • 编译器联合优化循环分块、数据布局和操作融合,以最大化并行性和数据局部性。
  • 汇编器从优化后的调度中生成定制硬件内核,运行时环境支持动态模型加载与执行。
  • 系统包含一个验证框架,以确保在多种CNN架构上的正确性与性能。

实验结果

研究问题

  • RQ1如何在FPGA加速器的编译器栈中系统性地探索数据布局、循环分块和操作融合等异构优化?
  • RQ2图级建模在减少CNN编译中最佳执行策略搜索空间方面有何影响?
  • RQ3统一的编译器基础设施是否能在不依赖大容量片上内存的前提下,实现对VGG和ResNet50等复杂模型的业界领先性能?
  • RQ4与现有编译器相比,该方法在资源受限FPGA上的吞吐量和能效效率方面表现如何?
  • RQ5与原始的手动优化实现相比,自动化融合与调度带来的性能提升是多少?

主要发现

  • 在Xilinx ZU9@330 MHz平台上,DNNVM在VGG上实现了2.82 TOPs/s的吞吐量和123.7 GOPs/s/W的能效,创下新纪录。
  • 在ResNet50上,DNNVM实现了1.38 TOPs/s的吞吐量,同样达到该FPGA平台的业界领先水平。
  • 在GoogLeNet上,通过异构优化,该编译器实现了最高1.26倍于原始实现的加速。
  • 与先前基于FPGA的CNN加速器相比,该系统在保持或提升性能的同时,显著降低了硬件资源消耗。
  • 采用启发式子图同构算法可高效探索融合机会,避免组合爆炸问题。
  • 该编译器栈可跨多种深度学习框架使用,并支持将多样化CNN模型自动映射到定制FPGA硬件上。

更好的研究,从现在开始

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

无需绑定信用卡

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