2D Convolution Block Segmentation for CPU Cache Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improvecomputation speedVSAvoidcomputational complexity
Core Design Contradiction:
SpeedVSDevice 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.

Inventive Principle:
Principle #1Segmentation

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.

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

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

Engineering Contradiction:
Improvememory capacityVSAvoidprocessing speed
Core Design Contradiction:
Quantity of substanceVSProductivity

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If standard convolution methods are used for arbitrary image sizes, then versatility is improved, but cache efficiency deteriorates causing cache misses

Engineering Contradiction:
Improvehandling arbitrary sizesVSAvoidcache misses
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

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.

Inventive Principle:
Principle #15Dynamics

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.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11954819B1System and methods for fast and scalable 2D convolutions and cross-correlations for processing image databases and videos on CPUs
Publication Date: 2024.04.09 UNM RAINFOREST INNOVATIONS
  • US11954819B1 patent drawing
  • US11954819B1 patent drawing
  • US11954819B1 patent drawing

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.