Graphics Processor Range Reduction for Trigonometric Precision

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing graphics processors face challenges in efficiently evaluating transcendental trigonometric functions, particularly in achieving high precision for larger input arguments, due to limitations in range reduction algorithms that can introduce accuracy issues or require many processing cycles.

Innovation Solution

A novel range reduction operation is implemented in graphics processors, which reduces the input argument into a manageable range by computing a product with an approximation of m/pi, using a sum of terms to ensure precision, and employing a modulo-by-4 operation to avoid floating-point rounding errors, optimizing the use of existing hardware units like FMA units.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing range reduction algorithms are used to evaluate transcendental trigonometric functions, then the graphics processor can perform the evaluation, but the precision is insufficient for larger input arguments or many processing cycles are required

Engineering Contradiction:
Improveprecision of trigonometric function evaluationVSAvoidprocessing cycles required
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The range reduction algorithm is segmented into multiple stages: first reducing the input argument to a coarse range using a first approximation, then refining the reduction using a second approximation with higher precision terms. This segmentation allows the algorithm to achieve high precision for larger input arguments while reducing the total number of processing cycles by performing coarse reduction first.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The algorithm performs preliminary range reduction using a first approximation (with fewer terms) to quickly bring the input argument into a manageable range. This preliminary action reduces the complexity of subsequent processing steps, enabling high precision evaluation with fewer total processing cycles.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If more terms are used in the sum approximation for range reduction, then the precision improves, but the number of instructions and processing cycles increases

Engineering Contradiction:
Improveprecision of range reductionVSAvoidnumber of instructions
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The sum approximation is segmented into two parts: a first sum with a first number of terms that provides coarse reduction, and a second sum with a second number of terms that provides refined reduction. This segmentation allows the system to achieve high precision without requiring all terms to be processed simultaneously, reducing the overall instruction count.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The algorithm uses a partial sum approximation with a limited number of terms for the first stage of range reduction, accepting that this provides sufficient precision for the coarse reduction. Only the necessary additional terms are added in the second stage, avoiding the need to process all possible terms and reducing the total instruction count.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If floating-point arithmetic is used for range reduction, then the computation can be performed efficiently, but rounding errors are introduced

Engineering Contradiction:
Improvecomputation efficiencyVSAvoidaccuracy of computation
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The algorithm performs preliminary range reduction using floating-point arithmetic with a first approximation, which introduces some rounding errors but maintains computational efficiency. Subsequent refinement steps use additional precision to correct these errors, achieving both efficiency and accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The algorithm uses feedback from the first range reduction result to guide the second refinement stage. By comparing the coarse reduction result with the desired precision requirements, the algorithm determines how many additional terms are needed in the sum approximation, correcting rounding errors while maintaining efficiency.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20250021302A1Graphics processors
Publication Date: 2025.01.16 ARM LTD
  • US20250021302A1 patent drawing
  • US20250021302A1 patent drawing
  • US20250021302A1 patent drawing

AI summary

Disclosed is a method of evaluating trigonometric functions in floating point arithmetic. In particular, a range reduction operation is performed to reduce the input argument x into a desired reduced ranges of values within which the trigonometric function is to be evaluated. The range reduction involves a step of computing the product of the input argument x and R, wherein R is an approximation to m/pi (with m=2, for example). The value for R is obtained as a sum of terms R0+R1+ . . . and the value of the first term R0 is configured to ensure that the expression xR0 modulo 4 can be evaluated without floating point rounding error. This can then provide an improved graphics processor operation.