Low-Precision Convolution Ordering for Numerical Accuracy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Low-precision floating point operations in convolution processes result in significant numerical errors, compromising the accuracy of results, especially when extra precision is not required.

Innovation Solution

The method involves sorting filter coefficients by magnitude and executing fused multiply-add operations in ascending order to minimize statistical average error, utilizing half-precision floating point formats while optimizing convolution operations on both central processing units and graphics processing units.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If low-precision floating point operations are used in convolution processes, then computation speed increases, but numerical accuracy deteriorates

Engineering Contradiction:
Improvecomputation speedVSAvoidnumerical accuracy
Core Design Contradiction:
SpeedVSMeasurement precision

Solution Approach 1:

The patent applies preliminary action by sorting filter coefficients in descending order of magnitude before performing the convolution operation. This pre-ordering ensures that larger coefficients are processed first, which minimizes the accumulation of rounding errors during the sequential addition operations. The sorting is performed once before the main computation, so it does not significantly impact the overall speed gain from using low-precision operations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the processing order parameter of the convolution operation based on the magnitude of filter coefficients. Instead of processing coefficients in their original order or in a fixed sequence, the method dynamically reorders operations to process larger magnitude coefficients first. This parameter change optimizes the numerical stability of the computation while maintaining the benefits of low-precision arithmetic.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If filter coefficients are processed in ascending order of magnitude, then numerical error is minimized, but operation complexity increases

Engineering Contradiction:
Improvenumerical accuracyVSAvoidoperation complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The sorting of filter coefficients is performed as a preliminary action before the main convolution computation. This one-time preprocessing step establishes the optimal processing order without adding complexity to the core computational loop. The sorted order is then reused throughout the convolution operation, avoiding the need for complex dynamic reordering during execution.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If standard floating point formats are used, then computational accuracy is maintained, but computation speed decreases

Engineering Contradiction:
Improvecomputational accuracyVSAvoidcomputation speed
Core Design Contradiction:
Measurement precisionVSSpeed

Solution Approach 1:

The patent applies local quality by using different precision levels for different parts of the computation. Specifically, it uses low-precision (e.g., half-precision or single-precision) floating point formats for the majority of the convolution operations where full precision is not critical, while maintaining higher precision for the filter coefficients during the sorting phase. This selective precision approach optimizes the balance between speed and accuracy.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10546044B2Low precision convolution operations
Publication Date: 2020.01.28 APPLE INC
  • US10546044B2 patent drawing
  • US10546044B2 patent drawing
  • US10546044B2 patent drawing

AI summary

This application relates to an optimization for a technique for filtering an input signal according to a convolution kernel that is stored in a floating point format. A method for filtering the input signal includes: receiving a set of filter coefficients that define the convolution kernel; determining an order for a plurality of floating point operations configured to generate an element of an output signal; and filtering the input signal by the convolution kernel to generate the output signal. Each floating point operation corresponds with a particular filter coefficient, and the order for the plurality of floating point operations is determined based on a magnitude of the particular filter coefficient associated with each floating point operation. The filtering is performed by executing the plurality of floating point operations according to the order. The data path can be a half-precision floating point data path implemented on a processor.