arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2106.14138cs.AR
收藏

OCCAM:卷积神经网络的最优数据重用

OCCAM: Optimal Data Reuse for Convolutional Neural Networks

Ashish Gondimalla, Jianqiao Liu, T. N. Vijaykumar, Mithuna Thottethodi

摘要:

卷积神经网络(CNN)正在重要的商业应用中作为图像处理的强大工具而出现。我们关注的重要问题,改善图像识别的延迟。CNN在每一层的输入、过滤和输出处的大数据造成了内存带宽问题。虽然以前的工作只捕获了大量数据重用中的一部分,但完全重用意味着初始输入图像和滤波器从片外读取一次,最终输出从片外写入一次,而不会将中间层的数据溢出到片外。我们建议Occam通过四个贡献来捕获完全重用。(1)我们确定了充分重用的必要条件。(2)我们确定的依赖封闭的充分条件,以捕捉充分重用使用最少的片上存储器。(3)由于依赖闭包往往太大,以适应片上存储器,我们提出了一个动态规划算法,最佳分区一个给定的CNN,以保证最少的片外流量在分区边界给定的片上容量。Occam的分区驻留在形成流水线的不同芯片上,使得分区的过滤器和依赖闭包在不同图像通过时保持在芯片上(即,每个分区仅为其输入和输出引起片外业务)。(4)由于最优划分可能导致流水线不平衡,我们提出了交错异步流水线(STAP),它通过在副本之间交错小批来复制瓶颈阶段以提高吞吐量。重要的是,STAP在不改变Occam最优划分的情况下实现了平衡的流水线。我们的模拟表明,Occam将片外传输减少了21倍,并实现了2.06倍和1.36倍的性能,以及分别比基本情况和层融合高出33%和24%的能量。在FPGA实现中,Occam的性能比基本情况高5.1倍。

英文摘要:

Convolutional neural networks (CNNs) are emerging as powerful tools for image processing in important commercial applications. We focus on the important problem of improving the latency of image recognition. CNNs' large data at each layer's input, filters, and output poses a memory bandwidth problem. While previous work captures only some of the enormous data reuse, full reuse implies that the initial input image and filters are read once from off chip and the final output is written once off chip without spilling the intermediate layers' data to off-chip. We propose Occam to capture full reuse via four contributions. (1) We identify the necessary condition for full reuse. (2) We identify the dependence closure as the sufficient condition to capture full reuse using the least on-chip memory. (3) Because the dependence closure is often too large to fit in on-chip memory, we propose a dynamic programming algorithm that optimally partitions a given CNN to guarantee the least off-chip traffic at the partition boundaries for a given on-chip capacity. Occam's partitions reside on different chips forming a pipeline so that a partition's filters and dependence closure remain on-chip as different images pass through (i.e., each partition incurs off-chip traffic only for its inputs and outputs). (4) because the optimal partitions may result in an unbalanced pipeline, we propose staggered asynchronous pipelines (STAP) which replicates the bottleneck stages to improve throughput by staggering the mini-batches across the replicas. Importantly, STAP achieves balanced pipelines without changing Occam's optimal partitioning. Our simulations show that Occam cuts off-chip transfers by 21x and achieves 2.06x and 1.36x better performance, and 33\% and 24\% better energy than the base case and Layer Fusion, respectively. On an FPGA implementation, Occam performs 5.1x better than the base case.

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

↑