Direct Convolution via SIMD Instructions for CPU Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for efficient convolution operations in digital signal processing and machine learning, such as convolution lowering and frequency domain convolution, face challenges with increased processor overhead, memory usage, and suboptimal utilization of hardware resources, especially when dealing with many small convolution kernels.

Innovation Solution

Implementing direct convolution operations using Single Instruction Multiple Data (SIMD) instructions on a central processing unit (CPU), which enhances data-level parallelism and leverages existing CPU resources, reducing the need for dedicated hardware accelerators and improving memory and cache bandwidth utilization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If convolution lowering is used to improve convolution efficiency, then computational efficiency is improved, but processor overhead and data size increase significantly

Engineering Contradiction:
Improveconvolution efficiencyVSAvoidprocessor overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts the essential convolution computation from the complex convolution lowering framework, implementing only the necessary direct convolution operations using SIMD instructions. This avoids the overhead of converting to general matrix multiply while maintaining computational efficiency for small kernels.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent uses lightweight, temporary data structures for convolution computations that are created and discarded as needed, avoiding the need to maintain large intermediate data structures required by convolution lowering approaches.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

2Productivity

If convolution lowering is used to improve convolution efficiency, then computational efficiency is improved, but memory bandwidth usage increases

Engineering Contradiction:
Improveconvolution efficiencyVSAvoidmemory bandwidth usage
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent segments the convolution computation into smaller chunks that can be processed efficiently with SIMD instructions, allowing better utilization of cache memory and reducing the need for frequent off-chip memory accesses.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary loading of convolution kernels and input data into cache memory before computation, reducing the need for repeated memory accesses during the convolution operation.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If frequency domain convolution is used to improve computational efficiency, then multiplication operation efficiency is improved, but memory footprint increases dramatically

Engineering Contradiction:
Improvemultiplication efficiencyVSAvoidmemory footprint
Core Design Contradiction:
ProductivityVSVolume of stationary object

Solution Approach 1:

The patent avoids creating large frequency domain representations that would occupy significant memory, instead using lightweight time-domain convolution structures that are created and discarded as needed.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

4Device complexity

If direct convolution is used to avoid computational overhead, then processor overhead is reduced, but processor utilization and parallelism decrease

Engineering Contradiction:
Improveprocessor overheadVSAvoidprocessor utilization
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent merges multiple scalar convolution operations into single SIMD vector instructions, combining multiple data processing lanes into one instruction stream. This increases processor utilization and parallelism while maintaining the simplicity of direct convolution.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent transitions from scalar to vector dimensionality, processing multiple data elements simultaneously through SIMD instructions. This adds a dimension of parallelism without requiring complex hardware architectures.

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

5Productivity

If dedicated hardware accelerators are used to improve convolution performance, then computational performance is improved, but device complexity and programming difficulty increase

Engineering Contradiction:
Improveconvolution performanceVSAvoidhardware complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements convolution operations using universal SIMD instructions that are already present in standard CPUs, making the solution applicable to a wide range of hardware platforms without requiring dedicated convolution accelerators.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent enables standard CPUs to serve themselves for convolution operations by utilizing their existing SIMD capabilities, eliminating the need for external dedicated hardware accelerators.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS20240012644A1Efficient direct convolution using SIMD instructions
Publication Date: 2024.01.11 ORACLE INT CORP
  • US20240012644A1 patent drawing
  • US20240012644A1 patent drawing
  • US20240012644A1 patent drawing

AI summary

A computer comprising one or more processors offering vector instructions may implement a direct convolution on a source data set. The source data set may be one-dimensional or multi-dimensional. For a given vector width, w, of the vector instructions, w consecutive data elements of the output data set are computed in parallel using vector instructions. For multi-dimensional data sets, multiple vectors of the output data set are computed for a single load of a set of vectors from the source data set. New vector instructions are disclosed to improve the performance of the convolution and to enable full utilization of the arithmetic logic units within the one or more processors.