TL;DR
This paper tackles the dominant energy cost in CNN accelerators: memory communication. The authors derive theoretical lower bounds for both off-chip and on-chip communication in convolutional layers and propose a novel dataflow and architecture that practically achieves these bounds, leading to significant energy efficiency improvements.
What Problem Does This Paper Address?
Convolutional Neural Networks (CNNs) are computationally intensive, driving the development of specialized hardware accelerators. However, a critical bottleneck in these accelerators is the energy consumed by data movement (communication) between different levels of the memory hierarchy (DRAM, on-chip buffers, registers). This communication cost can far outweigh the energy spent on actual computation, especially for DRAM accesses which are orders of magnitude more energy-hungry than arithmetic operations. Existing research often focuses on optimizing performance or energy efficiency through heuristic dataflow designs without a solid theoretical foundation for minimizing communication. This paper aims to bridge this gap by establishing theoretical lower bounds for communication in CNN accelerators and proposing a practical design that approaches these bounds.
Methods
The core of this work lies in deriving theoretical lower bounds and then designing a communication-optimal dataflow and architecture.
- Theoretical Lower Bound Derivation: The authors leverage the red-blue pebble game, a model for estimating minimum data transmission volume between memory levels, and convert it to an S-partition problem. They establish a relationship between convolutional layers and matrix multiplications (MMs) by "unfolding" the input images. This conversion allows them to analyze data reuse patterns, particularly "sliding window reuse" (WndR), which is unique to convolutions compared to MMs. This analysis leads to a mathematical derivation of the off-chip communication lower bound, expressed as $\Omega(\frac{BWOHOCOWKHKCI}{\sqrt{RS}})$, where R is the input reuse factor due to WndR and S is the on-chip memory size.
- Communication-Optimal Dataflow: Based on the MM conversion and the derived lower bound, a dataflow is proposed that aims to read inputs and weights from off-chip DRAM exactly once per layer. This dataflow exploits output reuse (OutR) and combines sliding window reuse (WndR) with a balanced approach to input reuse (InR) and weight reuse (WtR).
- Communication-Optimal Architecture: The proposed architecture is designed to support the communication-optimal dataflow. It features a three-level memory hierarchy (DRAM, GBuf, GRegs/PE LRegs) and employs a workload and storage mapping scheme. This scheme minimizes GBuf communication by ensuring weights are read from GBuf once and inputs are read with minimal redundancy. It also minimizes Reg communication by storing partial sums (Psums) in PE local registers (LRegs) and utilizing global registers (GRegs) for sharing inputs and weights among PEs.
Datasets
The paper evaluates its proposed architecture using the VGGNet-16 benchmark.
Key Insights and Ideas
- Communication is the Dominant Bottleneck: The paper strongly reinforces that memory communication, not computation, is the primary driver of energy consumption in CNN accelerators.
- Convolution vs. Matrix Multiplication Data Reuse: While convolutions share some data reuse patterns with MMs (like input reuse and weight reuse), they uniquely benefit from "sliding window reuse" (WndR) due to overlapping input patches. This WndR is a key factor in reducing communication.
- Theoretical Lower Bounds are Achievable: By rigorously deriving theoretical lower bounds for both off-chip and on-chip communication, the paper provides a clear target for accelerator design.
- Balanced Data Reuse is Key: Maximizing only one type of data reuse (e.g., input reuse or weight reuse) is suboptimal. The proposed dataflow achieves better results by balancing InR and WtR, alongside fully exploiting OutR and WndR.
- On-Chip Memory Allocation Matters: The theoretical derivation suggests that a significant portion of the effective on-chip memory should be allocated to store partial sums (Psums) to minimize off-chip communication.
- Architecture Design Follows Theory: The proposed hardware architecture is a direct consequence of the theoretical findings, prioritizing efficient data movement and minimizing redundant memory accesses.
Key Results
- Near-Theoretical Communication: The proposed architecture practically reaches the theoretical minimum communication for both off-chip (DRAM) and on-chip (GBuf, Reg) accesses.
- Energy Efficiency: The gap between the energy efficiency of the proposed implementations and the theoretical best value is only 37-87%. Compared to Eyeriss, the proposed accelerator achieves 2.61-3.68x more energy efficiency (without data compression/gating).
- Performance Gain: The proposed accelerator achieves a 9.8-42.3x performance gain compared to Eyeriss, considering memory access latency.
- Reduced DRAM Access: The dataflow reduces DRAM access volume by 43.3% compared to Eyeriss without input compression and 6.7% less than Eyeriss with input compression.
- GBuf Access Reduction: The accelerator achieves significantly less GBuf communication (10.9-15.8x reduction) compared to Eyeriss due to the elimination of data shuffling.
- Computation Dominant: The accelerator is largely computation dominant, with MAC operations consuming the largest portion of energy.
Limitations and Future Work
- Lower Bound as Asymptotic Relation: The derived lower bound is an asymptotic relation ($\Omega$) rather than a precise value. This means that for small workloads (like the first layer), the actual performance might deviate from the theoretical prediction, as observed in the results.
- Workload and Storage Mapping Complexity: While the proposed mapping scheme minimizes communication, it might introduce some complexity in hardware implementation.
- Future Work: The paper suggests that future work could explore optimizing the data transmission network to avoid reading extra "halos" (redundant data from adjacent blocks) from DRAM, further reducing communication. Additionally, exploring the impact of different data types and precision on communication and energy efficiency could be a valuable direction.
Summary updated