Processing Unit Exponential Function Evaluation Circuit

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing processing units face challenges in efficiently and accurately evaluating exponential functions, which can lead to slow program execution and statistical errors, especially in neural network processing where biases in overestimation or underestimation can result in poorly trained models.

Innovation Solution

A processing unit is designed with a hardware module that includes a multiplier circuit, a lookup table, a barrel shifter, and circuitry to quickly evaluate exponential functions by multiplying the operand by log2(e), converting the result to a fixed-point number, extracting the fractional part, and using the lookup table to provide an estimate for 2f without bias, thereby avoiding statistical errors and achieving faster processing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If a processing unit uses traditional software-based exponential function evaluation, then the implementation is simpler and more flexible, but the execution speed is slow and consumes multiple processor thread cycles

Engineering Contradiction:
Improveexponential function evaluation speedVSAvoidhardware module complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent replaces the software-based exponential function evaluation (mechanical/system-level operation) with a dedicated hardware module that performs the calculation in parallel circuitry. This substitution enables single-cycle execution by implementing the exponential function evaluation directly in hardware using a lookup table and barrel shifter, eliminating the need for multi-cycle software computation.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Productivity

If a processing unit uses approximate methods for exponential function evaluation, then the processing speed increases, but the accuracy decreases and introduces statistical errors

Engineering Contradiction:
Improveprocessing throughputVSAvoidexponential function calculation accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent introduces a lookup table as an intermediary structure that pre-stores accurate exponential function values. The hardware module queries this table with exponent values and retrieves pre-computed results, ensuring high accuracy while maintaining fast processing speed. This intermediary approach avoids both slow direct computation and inaccurate approximation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent performs preliminary computation of exponential function values and stores them in a lookup table before actual processing occurs. This pre-computation allows the hardware module to retrieve accurate results in constant time during execution, achieving both high speed and high accuracy without introducing statistical errors.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If a processing unit uses a lookup table with high precision entries, then the calculation accuracy improves, but the memory requirements and table size increase

Engineering Contradiction:
Improveexponential function result precisionVSAvoidlookup table memory size
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent segments the exponential function evaluation into two parts: the exponent portion (handled by indexing into the lookup table) and the mantissa portion (handled by the barrel shifter). This segmentation allows the lookup table to store only the essential precision data while the barrel shifter handles the remaining computational precision requirements, reducing overall memory requirements while maintaining accuracy.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20240296010A1Processing Unit
Publication Date: 2024.09.05 GRAPHCORE LTD
  • US20240296010A1 patent drawing
  • US20240296010A1 patent drawing
  • US20240296010A1 patent drawing

AI summary

A processing unit is provided with circuitry enabling execution quick evaluation of an exponential function. A multiplier circuit is used to multiply the input operand by log2(e), such that a result for the exponential function may be determined by evaluating 2i+f, where i is an integer part of a fixed-point number and f is a fractional part of the fixed-point number. A lookup table is used for providing an estimate for 2f based on the l MSBs of f. The lookup entries are provided according to a function such that the estimates for 2f are provided without bias towards either zero or infinity in the result. In other words, the maximum multiplicative error for each entry of the lookup table is the same in both negative and positive directions. In this way, statistical errors in the evaluation of a large number of exponential functions may be avoided.