TL;DR
This paper introduces Mini-Batch Serialization (MBS), a novel CNN training approach that significantly reduces memory traffic by intelligently serializing mini-batches across layers. Combined with their custom WaveCore accelerator, MBS achieves substantial improvements in training speed and energy efficiency, even on lower-cost memory systems.
What Problem Does This Paper Address?
Training deep Convolutional Neural Networks (CNNs) is computationally intensive and heavily reliant on memory bandwidth. Current training methods often require 3-4 times more off-chip memory bandwidth than necessary, leading to performance bottlenecks and wasted energy. This is largely due to large per-layer memory footprints of mini-batches, which prevent efficient reuse of data within on-chip buffers and necessitate frequent, costly transfers to and from main memory. Existing techniques for optimizing memory access, commonly used in CNN inference, are not directly applicable to training due to differences in data reuse patterns and requirements like batch normalization.
Methods
The core innovation is Mini-Batch Serialization (MBS). Instead of processing an entire mini-batch for each layer simultaneously, MBS breaks down the mini-batch into smaller "sub-batches." This reduces the per-layer memory footprint, allowing more data to fit within on-chip buffers and enabling greater inter-layer data reuse. MBS further optimizes this by dynamically adjusting the sub-batch size for different layers, recognizing that down-sampling layers reduce feature size and thus memory requirements. Layers with similar sub-batch size needs are grouped together to maximize reuse within these groups.
To complement MBS, the authors developed the WaveCore CNN training accelerator. This accelerator features a large systolic array core, optimized for the GEMM (General Matrix Multiply) operations that arise from using the im2col algorithm for convolutions. Key modifications to the systolic array include:
- Weight Double Buffering: This eliminates idle time between processing blocks of data by pre-fetching weights for the next wave while the current one is still executing.
- Modified PE Design: Each processing element (PE) includes an extra register to facilitate double buffering and reduce inter-wave idle time.
Additionally, the paper addresses the incompatibility of standard batch normalization with MBS by adapting Group Normalization (GN).
Datasets
The paper evaluates their approach on several well-known deep CNNs:
- ResNet (ResNet50, ResNet101, ResNet152)
- Inception v3
- Inception v4
- AlexNet (a shallower CNN used to test memory-bandwidth bound layers)
The authors do not introduce new datasets but use standard benchmarks for evaluating CNN training performance.
Key Insights and Ideas
- Bandwidth Over-Provisioning: The paper highlights that current CNN training systems are significantly over-provisioned in terms of memory bandwidth, with much of it wasted on unnecessary data transfers.
- Inter-Layer Reuse is Key for Training: Unlike inference, where intra-layer reuse is often dominant, MBS demonstrates that exploiting inter-layer data reuse is crucial for efficient CNN training.
- Dynamic Sub-batching is Essential: Simply serializing to a single sample per sub-batch is inefficient. MBS's ability to dynamically adjust sub-batch sizes per layer group is critical for balancing reuse and parallelism.
- MBS is Robust to Memory Hierarchy: The improved locality achieved by MBS makes it less sensitive to the size of on-chip buffers and the bandwidth of off-chip memory, enabling the use of cheaper memory types.
- Systolic Array Optimization for MBS: The WaveCore accelerator's specific optimizations (like weight double buffering) are tailored to overcome the challenges of low utilization that MBS might otherwise introduce in traditional systolic arrays.
Key Results
- DRAM Traffic Reduction: MBS reduces DRAM traffic by up to 75% compared to conventional training.
- Performance Improvement: MBS combined with WaveCore improves training performance by up to 53%.
- Energy Savings: The approach saves up to 26% of system energy.
- Lower-Cost Memory: WaveCore with MBS can outperform a high-end NVIDIA V100 GPU even when using slower, lower-cost memory like LPDDR4 with significantly less bandwidth.
- Systolic Array Utilization: WaveCore achieves high systolic array utilization (up to 78.6%), close to that of a full mini-batch, despite MBS processing smaller sub-batches.
- Group Normalization Effectiveness: GN+MBS achieves comparable validation accuracy to standard Batch Normalization (BN).
Limitations and Future Work
- Normalization Compatibility: While Group Normalization is adapted for MBS, it requires re-fetching scale and shift parameters at each sub-batch iteration within a layer group, which adds a small overhead.
- Sub-batch Size Determination: The paper mentions both greedy and exhaustive search for layer grouping and sub-batch size optimization. Further research could explore more automated or adaptive methods for determining optimal grouping strategies.
- Hardware Specialization: The WaveCore accelerator is designed specifically for MBS. While it demonstrates significant benefits, its applicability to other training paradigms might be limited.
- Future Work: The authors suggest exploring further optimizations for multi-branch modules and investigating the impact of MBS on other network architectures and training tasks. They also imply that the robustness to memory hierarchy could enable even more cost-effective training solutions.
Summary updated