US 11,886,505 B2
Function approximation
Jonathan Mangnall, Portishead (GB); and Stephen Felix, Bristol (GB)
Assigned to GRAPHCORE LIMITED, Bristol (GB)
Filed by Graphcore Limited, Bristol (GB)
Filed on Apr. 5, 2022, as Appl. No. 17/658,085.
Application 17/658,085 is a continuation of application No. 16/395,345, filed on Apr. 26, 2019, granted, now 11,328,015.
Claims priority of application No. 1821069 (GB), filed on Dec. 21, 2018.
Prior Publication US 2022/0229871 A1, Jul. 21, 2022
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 17/17 (2006.01); G06F 1/03 (2006.01); G06F 16/901 (2019.01)
CPC G06F 16/9017 (2019.01) [G06F 1/03 (2013.01); G06F 17/17 (2013.01)] 19 Claims
OG exemplary drawing
 
1. An execution unit configured to evaluate a function, the execution unit comprising:
a plurality of look up tables, each of the lookup tables associated with a corresponding range of input values of a first plurality of ranges of input values, each look up table comprising a plurality of entries, each of the entries comprising a function value at a corresponding input value within a respective range of input values, wherein the input values include floating point numbers;
a correction table comprising a plurality of correction values fewer than a quantity of the entries of the look up tables;
a table selector configured to determine a first range of input values, within the first plurality of ranges, in which a first input value falls and further configured to select a first look up table associated with the first range of input values from the plurality of look up tables; and
an input buffer to receive the first input value, wherein the first input value includes an input exponent and an input mantissa;
wherein the execution unit is configured to search the first look up table, selected by the table selector, using the first input value to select at least one entry from the first look up table and determine therefrom an output floating point number for the first input value, and to search the correction table using at least part of the first input value to determine a correction value for first input value,
wherein the execution unit is configured to determine the correction value by selecting either a first value stored in the correction table or a default value, and to apply the correction value to the output floating point number from the first look up table to determine a value of the function;
wherein the execution unit is further configured to use an approximation function on a second input value that is outside of the first plurality of ranges of input values; and
wherein using the first look up table to determine the output floating point number comprises using at least part of the input mantissa as an index to search the first look up table, the execution unit further comprising interpolation circuitry and configured to:
search the first look up table using the first input value to select the at least one entry from the first look up table; and
perform interpolation in dependence upon the at least one entry to determine the output floating point number.