Direct Convolution via SIMD Instructions for CPU Efficiency
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Productivity
If convolution lowering is used to improve convolution efficiency, then computational efficiency is improved, but memory bandwidth usage increases
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.
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.
3Productivity
If frequency domain convolution is used to improve computational efficiency, then multiplication operation efficiency is improved, but memory footprint increases dramatically
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.
4Device complexity
If direct convolution is used to avoid computational overhead, then processor overhead is reduced, but processor utilization and parallelism decrease
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.
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.
5Productivity
If dedicated hardware accelerators are used to improve convolution performance, then computational performance is improved, but device complexity and programming difficulty increase
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.
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.
Data Source
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.


