2D Convolution Block Segmentation for CPU Cache Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods are inefficient for computing convolutions and cross-correlations for large image databases or digital videos, particularly on modern CPUs, due to limitations in handling large image sizes and kernel sizes, leading to suboptimal performance and cache misses.
Innovation Solution
A system and method utilizing vector-based operations, overlap-and-add approach, and integration with high-performance 2D FFT libraries to compute convolutions and cross-correlations efficiently, optimizing block sizes and leveraging multiple cores and SIMD architecture for high-throughput performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If 2D FFT based methods are used for large kernels, then computation speed is improved, but complex-valued floating point arithmetic increases computational complexity
Solution Approach 1:
The patent segments large images into smaller blocks that can be processed efficiently. By dividing the large image into manageable blocks, the system applies 2D FFT to each block separately, reducing the overall computational complexity while maintaining the speed benefits of transform-domain methods for large kernels.
Solution Approach 2:
The patent transitions from spatial domain convolution to frequency domain computation using 2D FFT. This dimensional transformation allows large kernel convolutions to be computed more efficiently by exploiting the convolution theorem, where convolution in spatial domain becomes multiplication in frequency domain.
2Quantity of substance
If CPU methods are used for convolutions, then access to large-scale memory is improved, but processing speed for large images deteriorates
Solution Approach 1:
The patent divides large images into smaller blocks that fit within CPU cache memory. This segmentation allows the CPU to process each block using cached data rather than repeatedly accessing main memory, significantly improving processing speed while still handling large images through iterative block processing.
Solution Approach 2:
The patent performs preliminary actions by pre-processing image blocks to identify and extract regions of interest before main convolution processing. This preliminary extraction reduces the amount of data that needs to be processed in the main convolution pipeline, improving overall processing speed.
3Adaptability or versatility
If standard convolution methods are used for arbitrary image sizes, then versatility is improved, but cache efficiency deteriorates causing cache misses
Solution Approach 1:
The patent implements dynamic block sizing that adapts to the specific image dimensions and kernel size. By dynamically adjusting the block dimensions based on the input parameters, the system ensures optimal cache utilization for any arbitrary image size while maintaining versatility in handling different input formats.
Solution Approach 2:
The patent changes processing parameters such as block size, stride, and overlap amount based on the specific image and kernel dimensions. These parameter adjustments optimize cache usage patterns for each specific case, reducing cache misses while maintaining the ability to handle arbitrary image and kernel sizes.
Data Source
AI summary
An optimal approach for computing convolutions and cross-correlations of large databases of images that can be arbitrarily large. Throughput is maximized by breaking each image into optimal blocks and then using overlap-and-add method to compute the final result. A parallelized 2D FFT is applied over each block that runs a thread for each physical core.


