Skip to main content
QUICK REVIEW

[Paper Review] A Systematic Approach to Blocking Convolutional Neural Networks

Xuan Yang, Jing Pu|arXiv (Cornell University)|Jun 14, 2016
Adversarial Robustness in Machine LearningComputer Science27 references49 citations
TL;DR

This paper presents an analytical model for optimizing memory access in convolutional neural networks (CNNs) by directly blocking convolutional computations across multi-level memory hierarchies. By co-optimizing loop blocking and memory hierarchy design, the approach reduces memory traffic and energy consumption by up to 90% on CPUs and achieves up to 13x energy efficiency improvement in custom hardware, outperforming GEMM-based methods that lose locality due to data replication.

ABSTRACT

Convolutional Neural Networks (CNNs) are the state of the art solution for many computer vision problems, and many researchers have explored optimized implementations. Most implementations heuristically block the computation to deal with the large data sizes and high data reuse of CNNs. This paper explores how to block CNN computations for memory locality by creating an analytical model for CNN-like loop nests. Using this model we automatically derive optimized blockings for common networks that improve the energy efficiency of custom hardware implementations by up to an order of magnitude. Compared to traditional CNN CPU implementations based on highly-tuned, hand-optimized BLAS libraries,our x86 programs implementing the optimal blocking reduce the number of memory accesses by up to 90%.

Motivation & Objective

  • To address the high memory energy cost in CNN inference due to large working sets and poor data locality in existing implementations.
  • To overcome the limitations of GEMM-based CNN implementations, which replicate data and increase memory traffic.
  • To develop an analytical model that jointly optimizes loop blocking and memory hierarchy for maximum energy efficiency in CNNs.
  • To enable systematic exploration of the vast blocking parameter space for CNNs across CPU and custom hardware.
  • To demonstrate that direct blocking of CNNs yields better locality and energy efficiency than GEMM-based approaches.

Proposed method

  • The authors develop an analytical model for CNN-like loop nests that quantifies memory energy and traffic across multi-level memory hierarchies.
  • The model enables exhaustive or heuristic search over possible blocking configurations to find the optimal schedule for a given memory hierarchy.
  • The method co-optimizes loop blocking and memory hierarchy design to minimize energy per operation.
  • The framework is applied to both CPU software implementations and custom hardware designs, including FPGA and ASIC systems.
  • The approach is validated on standard CNN layers (e.g., Conv1, Conv2) using real hardware parameters and energy models.
  • The method supports both single-core and multi-core systems, with a focus on minimizing broadcast energy in shared memory architectures.

Experimental results

Research questions

  • RQ1How can we systematically optimize blocking for CNNs to improve memory locality and reduce energy consumption?
  • RQ2What is the impact of GEMM-based vs. direct convolution blocking on memory traffic and energy efficiency?
  • RQ3How does co-designing loop blocking with memory hierarchy design affect energy efficiency in CNN hardware?
  • RQ4What are the trade-offs between memory size, chip area, and energy efficiency in optimized CNN systems?
  • RQ5How does parallelization across multiple cores affect energy efficiency when using large on-chip buffers?

Key findings

  • Direct blocking of CNNs reduces memory accesses by up to 90% compared to GEMM-based CPU implementations, significantly improving energy efficiency.
  • The optimal memory hierarchy with 8MB of on-chip SRAM improves energy efficiency by at least 13x over the baseline DianNao system.
  • With only 1MB of on-chip memory, the energy efficiency still improves by 10x, requiring only 6x more chip area than DianNao.
  • The memory-access energy to computation energy ratio drops from 20x in DianNao to less than 1x in the optimal system, making computation the dominant energy cost.
  • Sharing large on-chip buffers across multiple cores reduces broadcast energy and enables scalable energy efficiency improvements with increasing core count.
  • The framework identifies that GPUs require deeper memory hierarchies and smaller register files to achieve high energy efficiency for low-precision CNN workloads.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.