Low-Precision Convolution Ordering for Numerical Accuracy
Find Innovative SolutionsGenerate 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
Engineering Contradiction Analysis
1Speed
If low-precision floating point operations are used in convolution processes, then computation speed increases, but numerical accuracy deteriorates
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.
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.
2Measurement precision
If filter coefficients are processed in ascending order of magnitude, then numerical error is minimized, but operation complexity increases
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.
3Measurement precision
If standard floating point formats are used, then computational accuracy is maintained, but computation speed decreases
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.
Data Source
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.


