arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1708.00117cs.DCcs.LG
收藏

为定制硬件加速器编译深度学习模型

Compiling Deep Learning Models for Custom Hardware Accelerators

Purdue University(普渡大学)

Andre Xian Ming Chang, Aliasger Zaidy, Vinayak Gokhale, Eugenio Culurciello

摘要:

卷积神经网络(CNN)是大多数最先进的深度学习算法的核心,专门用于目标检测和分类。CNN在计算上既复杂又并行。这两个属性为嵌入式系统的潜在软件和硬件优化留下了空间。给定具有面向CNN的自定义指令集的可编程硬件加速器,编译器的任务是利用硬件的全部潜力,同时遵守硬件约束并保持通用性以运行具有不同工作负载属性的不同CNN模型。Snowflake是一个在可编程逻辑器件上实现的高效、可扩展的硬件加速器。它实现了一个自定义指令集的控制流水线。本文的目的是介绍Snowflake的编译器,它可以从Torch 7模型描述文件生成机器级指令。在这项工作中探索的主要软件设计要点是:模型结构解析,CNN工作负载分解,循环重排内存带宽优化和内存访问平衡。编译器生成的指令所实现的性能与卷积层的手动优化代码相匹配。生成的指令还可以有效地在Snowflake上执行AlexNet和ResNet 18推理。具有$256$处理单元的Snowflake在Xilinx的Zynq XC 7Z 045 FPGA上合成。在$250$ MHz下,AlexNet实现了$93.6$ frames/s和$1.2$ GB/s的片外存储器带宽,ResNet 18实现了$21.4$ frames/s和$2.2$ GB/s。片内总功耗为$5$ W。

英文摘要:

Convolutional neural networks (CNNs) are the core of most state-of-the-art deep learning algorithms specialized for object detection and classification. CNNs are both computationally complex and embarrassingly parallel. Two properties that leave room for potential software and hardware optimizations for embedded systems. Given a programmable hardware accelerator with a CNN oriented custom instructions set, the compiler's task is to exploit the hardware's full potential, while abiding with the hardware constraints and maintaining generality to run different CNN models with varying workload properties. Snowflake is an efficient and scalable hardware accelerator implemented on programmable logic devices. It implements a control pipeline for a custom instruction set. The goal of this paper is to present Snowflake's compiler that generates machine level instructions from Torch7 model description files. The main software design points explored in this work are: model structure parsing, CNN workload breakdown, loop rearrangement for memory bandwidth optimizations and memory access balancing. The performance achieved by compiler generated instructions matches against hand optimized code for convolution layers. Generated instructions also efficiently execute AlexNet and ResNet18 inference on Snowflake. Snowflake with $256$ processing units was synthesized on Xilinx's Zynq XC7Z045 FPGA. At $250$ MHz, AlexNet achieved in $93.6$ frames/s and $1.2$ GB/s of off-chip memory bandwidth, and $21.4$ frames/s and $2.2$ GB/s for ResNet18. Total on-chip power is $5$ W.

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

↑