Convolutional Neural Network Memory Layout Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for performing convolution operations in convolutional neural networks (CNNs) face inefficiencies due to high computational requirements, memory access issues, and poor performance on CPUs, particularly when dealing with large models and sparse convolution layers, which can lead to slow operations and increased cache misses.

Innovation Solution

The method involves storing input arrays continuously along the input channel depth and convolution arrays continuously along the filter channel depth, allowing for an aggregate matrix multiply operation that reduces the number of operations and memory accesses, while leveraging sparse convolutions without the need for shuffle and reshuffle operations, thereby improving computation efficiency and reducing cache misses.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional convolution operations are performed in CNNs, then the model can process data, but the computational requirements are high and operation speed is slow

Engineering Contradiction:
Improveoperation speedVSAvoidcomputational requirements
Core Design Contradiction:
ProductivityVSPower

Solution Approach 1:

The patent changes the parameter of memory access pattern from non-continuous to continuous along the channel depth dimension. By reorganizing how convolution arrays are stored and accessed in memory, the system achieves better cache utilization and reduces memory access latency, thereby improving operation speed without increasing computational power requirements

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent segments the convolution operation into independent channel groups that can be processed separately. By dividing the computation into smaller independent segments that can be executed in parallel and stored contiguously in memory, the system improves both speed and reduces the peak computational burden

Inventive Principle:
Principle #1Segmentation

2Productivity

If convolution arrays are stored in traditional memory layouts, then memory access is simple, but cache misses increase and computation efficiency decreases

Engineering Contradiction:
Improvecomputation efficiencyVSAvoidcache misses
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent introduces a new dimension for memory organization by storing convolution arrays continuously along the channel depth dimension rather than following traditional spatial or batch dimensions. This dimensional reorganization ensures that during channel-wise convolution operations, the required data elements are accessed sequentially in memory, maximizing cache hit rates and eliminating cache misses

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Solution Approach 2:

The patent performs preliminary organization of convolution arrays into channel-continuous layouts before the actual convolution operation begins. This pre-processing of memory layout ensures that when the computation starts, all necessary data is already positioned for optimal cache access, preventing cache misses during the critical computation phase

Inventive Principle:
Principle #10Preliminary action

3Productivity

If sparse convolutions are implemented, then computation can be optimized, but additional shuffle and reshuffle operations are required which increase complexity

Engineering Contradiction:
Improvecomputation efficiencyVSAvoidoperation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent merges the storage organization of convolution arrays with the computation structure of sparse convolutions. By storing arrays continuously along channel depth, the system naturally supports sparse operation patterns without requiring separate shuffle/reshuffle steps, as the channel-continuous layout aligns perfectly with how sparse convolutions access data

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent extracts and eliminates the unnecessary shuffle and reshuffle operations from the sparse convolution pipeline. By recognizing that channel-continuous storage inherently supports sparse computation patterns, the system removes these intermediate transformation steps, reducing operational complexity while maintaining computation efficiency

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS10902318B2Methods and systems for improved transforms in convolutional neural networks
Publication Date: 2021.01.26 RED HAT INC
  • US10902318B2 patent drawing
  • US10902318B2 patent drawing
  • US10902318B2 patent drawing

AI summary

A system and method for convolutional layer in convolutional neural networks is provided. The convolution is performed via a transformation that includes relocating input, relocating convolution filters and performing an aggregate matrix multiply.