Scaling systems of floating-point logarithmic numerical representations for machine learning

The FPLNS system addresses the power consumption issue of machine learning accelerators by using a biased logarithmic number representation, achieving reduced power consumption and minimal accuracy loss, enabling efficient computation for edge devices.

JP2024538853APending Publication Date: 2024-10-23カシア·エイアイ·インコーポレーテッド
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024546045
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-10-08
Filing Date
2022-10-11
Publication Date
2024-10-23

AI Technical Summary

Technical Problem

Machine learning accelerator devices consume a significant amount of power, making them unwieldy for use in battery-powered devices, and reducing power consumption often comes at the expense of performance, especially as more complex models are pushed to the edge.

Method used

Implementing a hardware floating-point logarithmic number system (FPLNS) multiplier that performs operations using a biased logarithmic number representation system, allowing for efficient computation with reduced power consumption and minimal accuracy loss.

Benefits of technology

The FPLNS system significantly reduces power consumption by up to 68% while maintaining model accuracy within 1% of conventional systems, achieving improved performance and smaller circuit size with reduced latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024538853000001_ABST
    Figure 2024538853000001_ABST
Patent Text Reader

Abstract

The integrated circuit includes a hardware inexact floating-point logarithmic number system (FPLNS) multiplier that accesses registers containing a first floating-point binary value and its first logarithm binary value, and a second floating-point binary value and its second logarithm binary value, each in an FPLNS data format. The FPLNS multiplier is configured to multiply the first floating-point binary value and the second floating-point binary value by adding the first logarithm binary value to the second logarithm binary value to form a first logarithmic sum, shifting a bias constant by a number of bits of a mantissa of the first floating-point binary value to form a first shifted bias value, subtracting a correction factor from the first shifted bias value to form a first corrected bias value, and subtracting the first corrected bias value from the first logarithmic sum to form a first result.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] TECHNICAL FIELD The embodiments described herein relate generally to accelerated processing, and more particularly to an implementation of a floating-point number representation format using a biased logarithmic number representation system (FPLNS) for efficient computation. [Background technology]

[0002] Current machine learning (ML) accelerator chips perform trillions of multiply-accumulate (MAC) operations per second and billions of activation functions per second. To achieve these speeds, individual chips can consume hundreds of watts of power. As machine learning models become more complex, they also consume more power. However, there are efforts to move ML accelerators to the edge, where power consumption is therefore a limiting factor.

[0003] Until 2019, large companies developed machine learning solutions to optimize their internal processes, reducing their costs per month. Since then, more companies are developing products that use machine learning for delivery. To leverage deep learning algorithms, these custom products require their own embedded machine learning accelerators. Currently, such accelerators include GPUs from NVidia and AMD, and field programmable gate arrays (FPGAs) from Xilinx and Intel. New ML processors are also being developed by Google, NVidia, ARM, and others. Summary of the Invention [Problem to be solved by the invention]

[0004] Although these ML accelerator devices can achieve high performance, they consume surprising amounts of power, making them unwieldy. As a case in point, a 4W TPU running at full speed on a mobile phone with a 3000mA-hr battery will drain the battery in less than an hour. Although it is known that power consumption can be reduced at the expense of reduced performance, machine learning applications with higher computational demands are gradually being pushed to the edge. [Means for solving the problem]

[0005] An exemplary system comprises an integrated circuit including a hardware inexact floating-point logarithmic number system (FPLNS) multiplier configured to perform an FPLNS function, the integrated circuit may be configured to access registers containing a first floating-point binary value and a first logarithm binary value of the first floating-point binary value, where the first floating-point binary value and the first logarithm binary value are each in an FPLNS data format, the first floating-point binary value in the FPLNS format including a sign bit followed by exponent bits, the exponent bits followed by mantissa bits; the first floating-point binary value is in the FPLNS format; and the first floating-point binary value and the second floating-point binary value may be configured to multiply the first floating-point binary value by the FPLNS multiplier configured to: add the first logarithmic binary value to the second logarithmic binary value by the FPLNS multiplier to form a first logarithmic sum; shift a bias constant by a number of bits of a mantissa of the first floating-point binary value to form a first shifted bias value; subtract a correction factor from the first shifted bias value to form a first corrected bias value; and subtract the first corrected bias value from the first logarithmic sum to form a first result. The integrated circuit is further configured to take the antilog of the first result to generate a multiplication result of the multiplication of the first floating-point binary value and the second floating-point binary value.

[0006] In some embodiments, the system includes a processor configured to convert the first floating-point binary value to the first logarithm binary value, where the first floating-point binary value is in the FPLNS format, the processor configured to convert the first floating-point binary value to the first logarithm binary value: determine a base 2 logarithm of one plus a mantissa of the first floating-point binary value to determine a first logarithm quantity; add the first logarithm quantity to the exponent of the first floating-point binary value to form a first sum; and subtract the bias constant from the first sum to form the first logarithm binary value. and configured to convert the second floating-point binary value to the second logarithm binary value, where the first floating-point binary value is in the FPLNS format, the processor configured to convert the second floating-point binary value to the second logarithm binary value: determine a base 2 logarithm of one plus a mantissa of the second floating-point binary value to determine a second logarithm quantity, add the second logarithm quantity to the exponent of the second floating-point binary value to form a second sum, and subtract the bias constant from the second sum to form the first logarithm binary value.

[0007] In various embodiments, the multiplication result is in the FPLNS format. The bias constant is 2 (E-1) The correction factor may be −1, where E is the number of bits in the exponent of the first floating-point binary value in the FPLNS format. In some embodiments, the FPLNS multiplier obtains the correction factor from one or more registers that do not contain the first floating-point binary value, the first logarithm binary value, the second floating-point binary value, and the second logarithm binary value. The correction factor may be in the range of 0.04 to 0.06.

[0008] In some embodiments, the exponent bits of the first floating-point binary value in the FPLNS format are positioned such that the most significant of the exponent bits are closest to the sign bit and the least significant of the exponent bits are closest to the mantissa bits, and the mantissa bits of the first floating-point binary value in the FPLNS format are positioned such that the most significant of the exponent bits are closest to the exponent bit and the least significant of the exponent bits are furthest from the exponent bits. Similarly, in various embodiments, the exponent bits of the first logarithm binary value in the FPLNS format are positioned such that the most significant of the exponent bits are closest to the sign bit and the least significant of the exponent bits are closest to the mantissa bits, and the mantissa bits of the first logarithm binary value in the FPLNS format are positioned such that the most significant of the exponent bits are closest to the exponent bit and the least significant of the exponent bits are furthest from the exponent bits.

[0009] In various embodiments, the FPLNS multiplier is further configured to divide a third floating-point binary value and a fourth floating-point binary value, the third floating-point binary value and the fourth floating-point binary value being in the FPLNS data format, and the FPLNS multiplier divides the third floating-point binary value and the fourth floating-point binary value by: the FPLNS multiplier is configured to divide by subtracting a third logarithm binary value of the third floating-point binary value from the fourth logarithm binary value of the fourth floating-point binary value to form a first logarithmic difference, shifting the bias constant by a number of bits of a mantissa of the third floating-point binary value to form a second shifted bias value, subtracting the correction factor from the second shifted bias value to form a second corrected bias value, and adding the second corrected bias value to the first logarithmic sum to form a second result, and the integrated circuit is further configured to take the antilog of the second result to generate a division result of the division of the third floating-point binary value and the fourth floating-point binary value.

[0010] An example method includes: accessing, by an integrated circuit, a register containing a first floating-point binary value and a first logarithm binary value of the first floating-point binary value, where the first floating-point binary value and the first logarithm binary value are each in an FPLNS data format, the first floating-point binary value in the FPLNS format including a sign bit followed by exponent bits, the exponent bits followed by mantissa bits, and the integrated circuit includes a hardware Inexact Floating-Point Logarithmic Numeric Representation System (FPLNS) multiplier configured to perform an FPLNS function; accessing, by the integrated circuit, a register containing a second floating-point binary value and a second logarithm binary value of the second floating-point binary value, where the second floating-point binary value and the second logarithm binary value are each in an FPLNS data format. a logarithmic data format, the second floating-point binary value being in the FPLNS format; multiplying the first floating-point binary value by the FPLNS multiplier to form a first logarithmic sum; shifting a bias constant by a number of bits of a mantissa of the first floating-point binary value to form a first shifted bias value; subtracting a correction factor from the first shifted bias value to form a first corrected bias value; and subtracting the first corrected bias value from the first logarithmic sum to form a first result, the method further comprising taking the antilog of the first result to generate a multiplication result of the multiplication of the first floating-point binary value by the second floating-point binary value. [Brief description of the drawings]

[0011] [Figure 1] FIG. 1 illustrates an exemplary semiconductor chip 104 that includes an FPLNS multiplier. [Diagram 2] FIG. 2 illustrates an FPLNS system in some embodiments. [Diagram 3] FIG. 3 shows an example of the FPLNS format for floating-point values. [Figure 4] FIG. 4 shows an example of the FPLNS format for logarithmic values. [Figure 5A] FIG. 5A is a plot of log2(1+x) and X+C for C=0 in one example. [Figure 5B] FIG. 5B is a plot of log2(1+x) and X+C for C=0.0473 in one example. [Figure 6] FIG. 6 is an example of the FPLNS format for fixed-point base 2 logarithms, with the radix point defined at the position of the arrow. [Figure 7A] FIG. 7A shows a flow chart of the multiplication of two logarithmic binary values ​​using the FPLNS process when the correction factor MU is a constant. [Figure 7B] FIG. 7B shows a flow chart of the multiplication of two log-binary values ​​using the FPLNS process when the correction factor MU is variable. [Figure 8A] FIG. 8A shows a flow chart of the division of two logarithmic binary values ​​using the FPLNS process when the correction factor MU is a constant. [Figure 8B] FIG. 8B shows a flow chart of the division of two logarithmic binary values ​​using the FPLNS process when the correction factor MU is a variable. [Figure 9A] FIG. 9A illustrates an example process for FPLNS logarithm to base C in some embodiments. [Figure 9B] FIG. 9B illustrates another example process for FPLNS logarithm to base C in some embodiments. [Figure 10] FIG. 10 illustrates an exponentiation process 1000 in some embodiments. [Figure 11] FIG. 11 illustrates an example process 1100 for classification utilizing the fplns function in some embodiments. [Figure 12] FIG. 12 is a block diagram illustrating a digital device capable of executing instructions to perform the tasks described herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] In various embodiments, a library of approximate computational arithmetic functions for ML computations significantly reduces circuit complexity with less than 1% accuracy loss across models (e.g., ResNet and MobileNetV1). Some embodiments enable: 90% smaller circuit size, 68% less power, and 55% lower latency at 45 nm.

[0013] The approximate computational arithmetic algorithms described herein can perform, for example, multiplication, division, exponentiation, and logarithms. These operations can be the basis of many activation functions. These approximate computation techniques can also be synergistic with many other commonly used approximation techniques currently being deployed, such as pruning and weight compression.

[0014] Various embodiments described herein utilize a numeric representation format that combines a floating-point numeric representation format with a biased logarithmic numeric representation system (FPLNS numeric representation system), which allows both the original number and its logarithm to be stored in the same set of bits. A special bias factor can minimize the average error, thereby maximizing the accuracy of the model. In one example, this allows traditionally trained models, or even models provided by third parties, to be used with the FPLNS computational inference engine with less than 1% model accuracy loss. In contrast, traditional LNS models can experience model accuracy loss of 5% or more during inference.

[0015] In various embodiments, floating-point accuracy in addition / subtraction calculations is improved or optimized over the prior art. Additionally, accuracy of approximate FPLNS multiplication / division calculations is improved over past implementations (e.g., worst case relative error magnitude of 8%). Additionally, the systems and methods described herein can perform inexact logarithm and power functions in hardware using only fixed-point addition, which allows for bit permutations and higher order activation functions such as softmax.

[0016] It will be appreciated that with the FPLNS system described herein, lookup tables or piecewise linear tables are not required.

[0017] Our target customers are system-on-chip (SoC) designers and field-programmable gate array (FPGA) integrators who develop or deploy ML accelerator intellectual property (IP) for implementation in edge products. The IP cores often contain hundreds to thousands of MAC cores for high-speed computation.

[0018] There is also a need for fast computation of softmax activation functions.With thousands of fabless semiconductor SoC companies and tens of thousands more using FPGAs for integration, ML accelerators have been repeatedly reimplemented to focus solely on ML acceleration.As the industry consolidates over the next few years, only the most powerful and efficient ML accelerator companies will succeed on edge devices.

[0019] Previous research has shown that some machine learning algorithms can tolerate floating-point formats that use reduced precision, which could be a power optimization since the core of any machine learning model relies on a large number of multiply-and-accumulate operations.

[0020] Various embodiments are implemented at the hardware level in a field programmable gate array (FPGA) or application-specific integrated circuit (ASIC). Some embodiments reduce clock cycles when implemented in software. Some embodiments of the functionality described herein can be implemented as IP cores (e.g., Verilog cores) that are licensed to FPGA and ASIC hardware manufacturers / developers.

[0021] 1 illustrates an exemplary semiconductor chip 104 that includes an FPLNS multiplier. Various embodiments described herein significantly reduce the overall hardware complexity of multiplication and exponentiation by using a hybrid floating-point / logarithmic numeric representation system (FPLNS) multiplier. This reduction in digital complexity can potentially lead to significant reductions in power consumption while improving performance with minimal loss of accuracy in ML models.

[0022] In this example, chip 102 and chip 104 both contain a 32-bit multiplier wired at 45 nm. The original multiplier is on chip 102. The FPLNS multiplier with the implementation described herein (e.g., utilizing the FPLNS data storage format as described herein and shown in Figures 3 and 4) is on chip 104. Chip 104 is significantly smaller than chip 102 due to the FPLNS multiplier system being implemented in hardware.

[0023] In the example of FIG. 1, chip 104 has a 90% reduction in size for a 45 nm 32-bit floating point multiplier compared to chip 102. Additionally, chip 104 of FIG. 1 has a 68% reduction in power for a 45 nm 32-bit floating point multiplier compared to chip 102. Additionally, chip 104 has a 55% reduction in latency for a 45 nm 32-bit floating point multiplier compared to chip 102. Additionally, in the example of FIG. 1, due to the FPLNS multiplier on chip 104, chip 104 has a 6.85x improvement in performance per power compared to chip 102. Utilizing the FPLNS system of chip 104 in the example of FIG. 1, chip 104 has a 18.6x performance per area compared to chip 102.

[0024] Further, in the example of Figure 1, we can compare these multipliers for the 45nm node as follows:

[0025] [Table 1]

[0026] For the 7nm node, FPLNS chips (e.g. chip 104) can also achieve significant improvements over the BF16 standard multiplier. These multipliers can be compared as follows:

[0027] [Table 2]

[0028] Some embodiments significantly reduce the overall hardware complexity of multiplication and exponentiation by using a hybrid floating-point / logarithmic numeric representation system (FPLNS). Such reduction in digital complexity can lead to a significant reduction in power consumption while improving performance with negligible loss in model accuracy. Efficiency is improved because the core of any machine learning model relies on a large number of multiply-and-accumulate operations. Furthermore, the chip 104 provides power, performance, and area benefits over the chip 102 without impacting the accuracy of the ML model (e.g., with less than 1% accuracy loss as evidenced for both the ResNet and MobileNetV1 models).

[0029] Previous research has shown that some machine learning algorithms can tolerate floating-point formats that use reduced precision, which could be a power optimization since the core of any machine learning model relies on a large number of multiply-and-accumulate operations.

[0030] FIG. 2 illustrates an exemplary FPLNS system 200 in some embodiments. The FPLNS system 200 may be integrated in an integrated circuit (e.g., an FPGA and / or an ASIC) or in software (e.g., an IP core). The FPLNS system 200 may be implemented in an integrated circuit (e.g., as an FPLNS multiplier) or as an IP core. The FPLNS system 200 may reduce power consumption compared to existing systems that perform these calculations. In one example, the integrated circuit may consume less than 3W of power at more than 4 trillion operations per second (TOPS). In some embodiments, the FPLNS scaling system 200 may be or include an ML accelerator and compiler (e.g., an OONX compiler).

[0031] In various embodiments, the FPLNS system sacrifices multiplication and exponentiation accuracy in exchange for reduced logic complexity and / or circuit size. Reduced logic complexity translates to lower power consumption at high performance. Although arithmetic accuracy is sacrificed, the accuracy loss of the ML model can be less than 1%. Area, speed, and power metrics are key cost drivers in the semiconductor field. The reduction in the number of bits of the mantissa of a floating-point number reduces the complexity of multiplication quadratically, leading to a trend towards using less precise floating-point formats. In one example, the FPLNS system described herein can reduce multiplication to linear complexity with an average precision of E+5 bits.

[0032] Figure 3 is an example of the FPLNS format for floating-point values. The same format may be used for floating-point and logarithmic values. Figure 4 is an example of the FPLNS format for fixed-point base 2 logarithms with the radix point defined at the location of the arrow.

[0033] In Figures 3 and 4, "s" represents the sign bit, "e" represents the exponent value, and "m" represents the mantissa value. The FPLNS data format simultaneously holds the real number and the base-2 logarithm in the same bits.

[0034] In Figure 3, a floating-point value in this format is equal to (-1)^s*(1+m / (2^M))*2^(eB), so b=2^(E-1)-1. The sign bit 410 is a 1-bit unsigned integer. e may be an E-bit unsigned integer and m may be an M-bit unsigned integer.

[0035] In this example, the format uses a biased sign-magnitude format. For fixed-point numbers represented in this format, there is a sign bit, an integer part (e bits, or exponent bits 420 in FIG. 4), and a fractional part (m bits, or mantissa bits 430). These overlap each other. In this example, the application of the bias (Bias B) is 2 (E-1) Equal to -1.

[0036] FIG. 4 is an example of the FPLNS format for logarithmic values. As described herein, the format of logarithmic values ​​and floating point values ​​are the same format. In FIG. 4, the logarithmic value in this format corresponds to e-B+(m+MU) / (2^M). The radix point is between the LSB (e) and MSB (m). In this example, the format uses a biased sign-magnitude format. For fixed point numbers represented in this format, there is a sign bit, an integer part (e bits, or exponent bits 450 in FIG. 4), and a fractional part (m bits, or mantissa bits 460), with the radix point being between the e and m bits. These are overlapping with each other. In this example, the application of bias (bias B) is 2 (E-1) E is equal to -1. If E has 8 bits (E=8), this means that B=127. M in this example is the fractional part of the fixed point format. It is biased by a factor Mu (i.e., the correction factor C). The correction factor (Mu) in this example can be between (0.0 and .99). In one example, Mu is a value such as 0.043. In various embodiments, 0<=Mu<2^M (e.g., M is the number of bits in the mantissa). Mu can be a variable or a constant.

[0037] The FPLNS system also specified a set of arithmetic functions for operating on data.

[0038] In various embodiments, a hybrid floating-point / logarithmic numeric representation system (FPLNS) represents both an original k-bit floating-point number N and its base-2 logarithm L in the same set of k bits without any extra information. When a digital designer wants to use L in an operation, the designer can consider a data-independent bit permutation operation and the addition of a constant bias factor B. Since commonly used floating-point formats are semi-logarithmic formats, floating-point numbers can be converted to approximate logarithms by using bit permutations and a single fixed-point addition with a constant B to convert to L. The use of the original number N is achieved by using traditional floating-point (FP) arithmetic without modification.

[0039] Once a hybrid representation of both a number N and its base-2 logarithm L is established, multiplication and division can be implemented directly from the biased logarithm using two fixed-point addition operations and bit permutations: one addition of the L1 and L2 values, and a second addition of the bias B. Powers and logarithms can also be calculated directly by bit permutation operations. ML transcendental functions can be implemented using Newton's method or Taylor series. By using FPLNS, the complexity of multiplication and power functions can be reduced by an order of magnitude. The loss of precision due to this approximate representation only minimally impacts the accuracy of the ML model, resulting in significant power efficiency.

[0040] There is a large amount of published work that demonstrates the reduction in complexity of multiplication and division using the logarithmic numeric representation system (LNS). Although multiplication in the LNS has been improved, most numerical algorithms require performing both multiplication and addition. Unfortunately, exact addition in the LNS is not easy. Piecewise linear approximation, lookup tables, or other hybrid methods are required for conversion between the logarithmic and linear domains, or for computing more complex transcendental functions. The various systems described herein may not utilize lookup tables or piecewise linear approximations.

[0041] Various embodiments of the hybrid floating-point / logarithmic numeric representation system (FPLNS) described herein represent both the original k-bit floating-point number N and its logarithm L in base 2 with the same set of k bits without any extra information. In an exemplary implementation in some embodiments, if a digital designer wants to use L in an operation, the designer can consider a data-independent bit permutation operation and the addition of a constant bias factor B. Although this description is based on 32-bit IEEE 754, this representation can be extended to any bit length. Since the commonly used floating-point format is a semi-logarithmic format, it can be converted to an approximate logarithm by using a bit permutation and a single fixed-point addition with a constant B for forward conversion to L. The use of the original number N is achieved by using traditional half-precision or full-precision floating-point (FP) arithmetic without modification.

[0042] For example, the number N can be expressed as: TIFF2024538853000004.tif6170

[0043] In the IEEE754 32-bit format, E is a non-negative 8-bit integer, B is the constant 127, and M is a 23-bit mantissa. Taking the base 2 logarithm, L can be expressed as:

[0044] TIFF2024538853000005.tif6170

[0045] M is a value between 0 and 1. The following approximation:

[0046] TIFF2024538853000006.tif6170

[0047] It is important to note this because: where the factor C is the correction factor (also referred to herein as Mu).

[0048] This is shown graphically in Figures 5A and 5B for two possible values ​​of C. 5A and 5B show graphs using two possible values ​​of C for the example above. TIFF2024538853000007.tif25170

[0049] In various embodiments, there are two ways to minimize the error: minimize the maximum error, or minimize the average error. Minimizing the maximum error puts a bound on the calculations that depend on L, while minimizing the average error over all possible decimal values ​​provides better ML model accuracy results. As a result, L is:

[0050] TIFF2024538853000008.tif5170

[0051] It can be expressed as:

[0052] Another example of logarithmic values ​​(ignoring the sign) is

[0053] TIFF2024538853000009.tif10170

[0054] where E=number of bits and e=binary value. M=number of bits and m=binary value. B is the bias for the e part and Mu is the bias for the lower part. E-B+(M+Mu) / (2^M) is shifted right by M bits. E bits are in the first register and M bits are in the second register. Dividing M by 2 shifts this right by m bits.

[0055] The value E+M can be expressed as the logarithm of N plus the bias minus the correction factor, as shown in the above formula:

[0056] TIFF2024538853000010.tif5170

[0057] is in accordance with.

[0058] Again, the correction factor "C" is Mu. Based on this approximation, we can define the FPLNS binary representation of L as a fixed-point format overlaid on top of the IEEE754 format using the same 32 bits, as shown in Figure 6. Figure 6 is an example of the FPLNS format for a fixed-point base 2 logarithm, with the base point defined at the location of the arrow. The bias / correction is an implicit constant. So, from another perspective, the floating-point format provides a way to operate on logarithms. It will be appreciated that the bias factor B and the correction factor C (both constants) can be taken into account.

[0059] It is now possible to define multiplication and division on approximate logarithms as follows:

[0060] TIFF2024538853000011.tif6170

[0061] TIFF2024538853000012.tif55170

[0062] This algorithm may have effective linear complexity in the number of bits. Necessarily, the division algorithm can be defined in the same way in terms of the following equation:

[0063] TIFF2024538853000013.tif10170

[0064] Division is not required for many modern machine learning models, but it can be useful when defining activation functions such as softmax and ReLU.

[0065] The FPLNS architecture model is not limited to 32-bit floating point, but can be generalized to any level of precision in both floating point and integer formats. We specify the values ​​of B, C here for FP32 floating point, but new values ​​can be derived for FP16 and BF16. Using int-float conversion, FPLNS computation of INT8 multiplication is possible.

[0066] FPLNS system 200 includes an input module 202, an addition module 204, a multiplication module 206, a division module 208, a logarithm module 210, a power module 212, a higher order module 214, and a data store 216. FPLNS system 200 may be implemented by an FPLNS multiplier (e.g., a hardware FPLNS multiplier integrated into an integrated circuit, such as that shown in FIG. 1). In some embodiments, FPLNS system 200 may control a processor and / or a multiplier (e.g., an FPLNS multiplier), etc., to perform any of the FPLNS functions described herein. In some embodiments, a processor may access registers while the FPLNS multiplier is performing or assisting in the performance of an FPLNS function.

[0067] Returning to Figure 2, FPLNS system 200 includes input module 202, which can optionally organize or store data using the FPLNS data formats shown in Figures 3 and 4. Input module 202 can sort exponent bits 320 by size such that the most significant exponent bit 322 is closest to sign bit 310 and the least significant exponent bit 324 is closest to mantissa bit 330 (as shown in Figure 3). Similarly, input module 202 can sort mantissa bits 330 by size such that the most significant mantissa bit 332 is closest to the exponent bit and the least significant mantissa bit 334 is furthest from the exponent bit.

[0068] 4, input module 202 may sort exponent bits 450 by size such that the most significant exponent bit 452 is closest to the sign bit 440 and the least significant exponent bit 454 is closest to the mantissa bits (as shown in FIG. 4). Similarly, input module 202 may sort mantissa bits 460 by size such that the most significant mantissa bit 462 is closest to the exponent bit and the least significant mantissa bit 464 is furthest from the exponent bits.

[0069] An input module may receive any amount of data and / or convert any amount of data into FPLNS format.

[0070] In various embodiments, the input module 202 can optionally convert a floating-point binary value (e.g., in FPLNS format) to a logarithmic binary value. For example, the input module 202 can: (1) determine a first logarithmic quantity by taking the base 2 logarithm of 1 plus the mantissa of the first floating-point binary value, (2) add the first logarithmic quantity to the exponent of the first floating-point binary value to form a first sum, and (3) subtract a constant bias from the first sum to form the logarithmic binary value. In one example, the logarithmic binary value of the floating-point binary value is

[0071] TIFF2024538853000014.tif6170

[0072] In another example, the input module 202 may include:

[0073] TIFF2024538853000015.tif10170

[0074] where e = binary exponent, M = number of bits in the mantissa, m = binary mantissa value, and B is a constant bias (e.g. B = 2 (E-1) -1 where E=number of bits in the exponent) and MU is a correction factor C. The correction factor MU may be a constant depending on the application or variables (e.g., provided by the user and / or obtained from a register). In one example, MU is a value such as 0.043. MU is between 0.0 and 9.9. In some embodiments, MU is between 0.04 and 0.06.

[0075] In the case of machine learning, since a high degree of accuracy is not required (for example, for classification, the mean squared error of FPLNS softmax is about 0.0003), rough approximations can be used (for example, not using Newton's method). In some embodiments, for resnet18, (mu = 0.0) results in a loss of 4 - 6%.

[0076] The addition module 204 can perform the addition of any two binary values or two logarithmic values. In some embodiments, the FPLNS system shares the same floating - point addition operation of IEEE754. Since addition and subtraction can be calculated using standard floating - point addition operations, there is no loss of accuracy. This is an advantage because it has been shown that the accuracy of addition is more important than the accuracy of multiplication in the impact on the ML model.

[0077] IEEE754 floating - point (FP) and FPLNS share similar addition operations. Also, the same exception flags: nan (not a number), inf (infinity), ov (overflow), uf (underflow), ze (zero) are used.

[0078] The multiplication module 206 can perform the multiplication of two binary values or two logarithmic values (the multiplication function is referred to as fplns mult (the first value, the second value) in this specification). The multiplication module 206 manages the multiplication function (referred to as fplns mult (value1, value2) in this specification). In an example, considering the floating - point numerical values a, b, and the corresponding logarithms L(x) and L(y) in FPLNS format: p = x * y [actual multiplication] L(p)=L(x)+L(y)-(B << M)+MU [fplns mul(x,y)] It becomes as follows.

[0079] In this example, the sign bits are dropped, and these are fixed - point addition / subtraction operations. (B << M) is a constant, and MU can be a variable or a constant. Note that the form in which the biases of L(x) and L(y) are applied does not require calculation.

[0080] There may be optimized implementations using constant MU and variable MU. In some embodiments, the multiplication module 206 can find an equivalent circuit using the commutative and associative properties of addition / subtraction.

[0081] In some embodiments, the sign bit ps=XOR(xs,ys) (ie, the exclusive OR of the sign bits from x and y).

[0082] As described herein, in some embodiments, the sign bit is dropped and the multiplication module 206 utilizes fixed-point addition / subtraction arithmetic. Figure 7A shows a flow chart for multiplying two logarithmic binary values ​​using the FPLNS process when the correction factor MU is a constant. Figure 7B shows a flow chart for multiplying two logarithmic binary values ​​using the FPLNS process when the correction factor MU is a variable. In some embodiments, the biased forms of L(x) and L(y) require no or little computation.

[0083] It will be appreciated that if MU is a constant, the constant of MU may be coded or based on the process being performed (e.g., a particular MU for a softmax function and another MU for a different function). If MU is a variable, the multiplication module 206 may obtain MU from a register (e.g., a first register may hold a first logarithm binary value to be multiplied, a second register may hold a second logarithm binary value to be multiplied, and a third register may hold a value representing MU). In some embodiments, the MU to be used may be provided by a user (e.g., by code or in an interface).

[0084] In Fig. 7A, a first logarithmic binary value L(x) is added to a second logarithmic binary value L(y). A constant bias B as defined above is shifted by the number of bits of the mantissa (e.g., the mantissa of the first and / or second floating-point binary values ​​being multiplied). After the shift, a constant MU is subtracted from the constant bias B to generate a corrected bias value. The corrected bias value is subtracted from the sum of the first logarithmic binary value L(x) and the second logarithmic binary value L(y) to generate L(Z) (i.e., the antilogarithm of L(Z) generates the product of the two binary values).

[0085] In FIG. 7B, the first logarithmic binary value L(x) is added to the second logarithmic binary value L(y). The constant bias B as defined above is shifted by the number of bits of the mantissa (e.g., the mantissa of the first and / or second floating-point binary value being multiplied). After the shift, the variable MU is subtracted from the constant bias B to generate a corrected bias value. In this example, the variable MU can be obtained from a memory register. The corrected bias value is subtracted from the sum of the first logarithmic binary value L(x) and the second logarithmic binary value L(y) to generate L(Z) (i.e., the antilogarithm of L(Z) generates the product of the two binary values).

[0086] In some embodiments, the multiplication module 206 can use the commutative and / or associative properties of addition / subtraction to find an equivalent circuit.

[0087] In some embodiments, the division module 208 can perform division (the division function is referred to herein as fplns div(value1, value2)). Again, the division module 208 uses a logarithmic representation. Given floating point numbers a, b, and their corresponding logarithms L(x) and L(y) in FPLNS format, q=x / y (the actual division) and L(q)=L(x)-L(y)+(B< <M)-MUとなる。

[0088] In various embodiments, sign bits are dropped and these are fixed-point addition / subtraction operations. The bias coefficient B is a constant (i.e., B<<M or B shifted based on the number of bits of the mantissa of the floating-point binary value is always a constant). MU may be a variable or a constant as described with respect to the multiplication module 206. As described herein, the form in which the biases of L(x) and L(y) are applied requires little or no calculation.

[0089] FIG. 8A shows a flowchart of the division of two logarithmic binary values using the FPLNS process when the correction coefficient MU is a constant. In FIG. 8A, a first logarithmic binary value L(x) is subtracted from a second logarithmic binary value L(y). The constant bias B as defined above is shifted by the number of bits of the mantissa (e.g., the mantissa of the first and / or second floating-point binary values being divided). After the shift, the constant MU is subtracted from the constant bias B to generate a corrected bias value. The corrected bias value is added to the difference between the first logarithmic binary value L(x) and the second logarithmic binary value L(y) to generate L(Z) (i.e., the mantissa of L(Z) is the quotient of the two binary values).

[0090] FIG. 8B shows a flowchart of the division of two logarithmic binary values using the FPLNS process when the correction coefficient MU is a variable. In FIG. 8B, a first logarithmic binary value L(x) is subtracted from a second logarithmic binary value L(y). The constant bias B as defined above is shifted by the number of bits of the mantissa (e.g., the mantissa of the first and / or second floating-point binary values being divided). After the shift, the variable MU is subtracted from the constant bias B to generate a corrected bias value. In this example, the variable MU can be obtained from a memory register. The corrected bias value is added to the difference between the first logarithmic binary value L(x) and the second logarithmic binary value L(y) to generate L(Z) (i.e., the mantissa of L(Z) is the quotient of the two binary values).

[0091] In some embodiments, the division module 208 can find an equivalent circuit by using the commutativity and / or associativity of addition / subtraction.

[0092] The logarithm module 210 converts a fixed-point number with an applied bias to a floating-point number. In one example (a function herein called fplns log2(variable)), considering a value x in FPLNS format and L(x), L(x) in this example is a 31-bit fixed-point number with an applied bias and including a sign bit (the sign bit is not part of this 31-bit value). In the next step, the logarithm module 210 drops the sign bit, so |L(v)| (i.e., the absolute value of L(v)) is a 31-bit number. The variable u is defined as u = |L(v)| - ((B << M) - MU). In the second step, u is converted to floating-point format, where u is converted to a sign bit s and |u|, and then (using, for example, a priority encoder and adder as can be seen in the prior art) is normalized to floating-point format with the sign bit s.

[0093] In some embodiments, the logarithm module 210 can find an equivalent circuit by using the commutativity and / or associativity of addition / subtraction.

[0094] In some embodiments, the logarithm module 210 can perform a conversion to a logarithm with base C. Considering the variable C, K is defined as follows: K = fpnls log2(C) (using the method used above for the conversion in the logarithm module 210 of a fixed-point number with an applied bias) For the constant C, in floating-point, K = Log(2).

[0095] Considering the input value v and u = fplns log2(v), assume that fplns logC(x) = fplns div(u, K). Here, fplns div(u, K) refers to the process of dividing u and K following the process shown in the flowcharts of FIGS. 8A and 8B.

[0096] Figure 9A shows an exemplary process of the FPLNS logarithm with base C in some embodiments. Figure 9B shows another exemplary process of the FPLNS logarithm with base C in some embodiments. It will be understood that these flowcharts are equivalent considering that fplns logC(x) = fplns div(u,K).

[0097] In Figure 9A, the logarithm module 210 takes the fplns log2 of (x) (see above regarding fplns log2(numerical value)). Subsequently, the fplns log2 is divided by K to output z. Considering the values x and L(x) in the FPLNS format as described herein, L(x) in this example is a 31-bit fixed-point decimal number with a bias applied and accompanied by a sign bit (the sign bit is not part of this 31-bit value). In the next step, the logarithm module 210 drops the sign bit, so |L(v)| (i.e., the absolute value of L(v)) is a 31-bit number. The variable u is defined as u = |L(v)| - ((B << M) - MU). In the second step, u is converted to the floating-point format, where u is converted to a sign bit s and |u|, and then normalized to the floating-point format with the sign bit s (using, for example, a priority encoder and adder that can be seen in the prior art). The division module 208 divides the output of fplns log2(x) by K (for example, K can be obtained from a register).

[0098] As shown in FIG. 8A, a first logarithmic binary value L(x) is subtracted from a second logarithmic binary value L(K). A constant bias B as defined above is shifted by the number of bits of the mantissa (e.g., the mantissa of the first and / or second floating-point binary value to be divided). After the shift, a constant MU is subtracted from the constant bias B to generate a corrected bias value. By adding the corrected bias value to the difference between the first logarithmic binary value L(x) and the second logarithmic binary value L(y), L(Z) (i.e., the quotient of the two binary values) is generated. If C is a variable, the flowchart shown in FIG. 8B can be followed.

[0099] FIG. 9B is a process equivalent to FIG. 9A, where fplns logC(x)=fplns div(u,K). In FIG. 9B, the logarithmic module 210 takes the fplns log2 of (x) in the same manner as described with respect to FIG. 9A. Subsequently, fplns log2 is divided by fplns log2(C) to output z. Considering the values C and L(C) in the FPLNS format as described herein, L(C) in this example is a 31-bit fixed-point decimal number with a bias applied, accompanied by a sign bit (the sign bit is not part of this 31-bit value). In the next step, the logarithmic module 210 drops the sign bit, so |L(C)| (i.e., the absolute value of L(C)) is a 31-bit number. The variable u is defined as u = |L(C)| - ((B << M) - MU). In the second step, u is converted to the floating-point format, where U is converted to a sign bit and |u|, and then normalized to the floating-point format with a sign bit (e.g., using a priority encoder and adder as can be seen in the prior art). The division module 208 divides the output of fplns log2(x) by fplns log2(C) (e.g., C can be obtained from a register).

[0100] Logarithms and exponents to the base 2 can be calculated by conversion from fixed-point to floating-point, or vice versa. In some embodiments, the conversion can be achieved using a priority encoder with a barrel shifter, taking into account bias / correction.

[0101] The power module 212 performs a power operation. In one example, the power module 212 performs a power to the base 2 (fplns exp2(value)). The function of the power to the base 2 is the conversion of a floating-point number to a fixed-point number with bias applied. The correction factor MU can be a variable or a constant.

[0102] Considering v and L(v) in FPLNS format, the power module 212 divides x into a sign s, an exponent e, and a mantissa m. The mantissa is such that m is the fraction 0.m+(M - 1)…m_0, so m_i is bit i. The mantissa m' = 1 + m, and SHAMT = e - B. If s == 0 (if the s bit == 0), the final value is (m' << SHAMT) - MU), and if s == 1, the final value is fplns div(1, ((m' << SHAMT) - MU)). If SHAMT < 0, the left shift (<<) becomes a right shift (>>).

[0103] FIG. 10 shows a power process 1000 in some embodiments. Considering x, the power module 212 can optionally divide the sign bit, m', and e from the fpLNS format of x. This process is optional because the power module 212 can obtain this information (and calculate m') based on the information stored in the fplns storage format. The power module 212 can take the difference between the exponent e and the bias B (where B is a constant here, for example). Based on the difference between the exponent e and the bias B, the value m' is shifted.

[0104] The power module 212 can form a first power value by shifting B based on the bits of the mantissa, taking the difference of the correction factor Mu, and then adding the result to the shifted value m'.

[0105] If the s bit is 0 or greater, the exponentiation value is output as z.

[0106] If the s bit is not greater than or equal to 0, the division module 208 may perform a division by (1, the first power value) and output as z.

[0107] The square root module 214 can perform square root functions. In one example, fplns square root function of (x) = fplns exp2(fplns mult(0.5, fplns log2(x))). Similarly, fplns square root function of (x) = fplns exp2(float(L(x)>>1)). 0.5 may be a constant. L(x) is the unbiased fixed-point logarithm to base 2. Shifting right by 1 is the same as dividing an integer by 2. In some embodiments, the fplns operations can be partially replaced by standard floating-point operations. float(y) converts a fixed-point value y to floating point.

[0108] The square root module 214 may also perform an N-th root function. For example, fplns root(x)=fplns exp2(fplns mul(1 / n,fplns log2(x))) or fplns root(x)=fplns exp2(fplns div(fplns log2(x),n), where 1 / n may be a constant. In some embodiments, for the variable n-th root, 1 / n may be replaced with fplns div(1,n).

[0109] In some embodiments, the mean error can be minimized by a log2(1+x) approximation by minimizing F(x,MU) with respect to MU. For example:

[0110] TIFF2024538853000016.tif14170

[0111] It is.

[0112] Furthermore, the maximum error due to the log2(1+x) approximation can be minimized by computing MU, for example:

[0113] TIFF2024538853000017.tif9170

[0114] It is.

[0115] The FPLNS system can be used in many ways. The high-order module 214 can work with other modules to perform higher-order functions. For example, the high-order module 214 can be used for deep learning primitives such as: FPLNS 2D convolution FPLNS Batch Normalization FPLNS matrix multiplication FPLNS Sigmoid FPLNS Average Pooling FPLNS Softmax

[0116] Other functions that the higher order module 214 can perform using the functions described herein (e.g., fplns mult, fplns div, etc.) include, but are not limited to, softplus, Gaussian, Gaussian error linear unit (GELU), scaled exponential linear unit (SELU), leaky rectified linear unit (Leaky ReLU), parametric rectified linear unit (PreLU), sigmoid linear unit (SiLU, sigmoid deflation, SiL, or Swish-1), Mish, erf(x), hyperbolic cosine, hyperbolic sine, hyperbolic tangent, continuously differentiable exponential linear unit (CELU), exponential linear unit (ELU), hard sigmoid, Hard Swish, logarithmic softmax, and softsign.

[0117] The high order modules 214 may implement the high order functions as state machines or may pipeline the process. In some embodiments, the high order modules 214 may utilize Taylor expansions or Newton's methods in performing one or more functions.

[0118] One or more of the fplns functions described herein may be utilized in any number of different functions or processes. In some embodiments, an fplns function may be utilized in conjunction with an exact function (e.g., in an ensemble approach, if desired). However, an fplns function may perform many tasks faster and with reduced power than an exact function or a combination of an fplns function and an exact function.

[0119] For example, image processing can utilize fplns functions to improve speed, scaling, and power efficiency over conventional techniques, thereby addressing technical shortcomings of existing technical solutions.

[0120] The data store 216 may include any number of data structures capable of holding functions. In various embodiments, the functions described herein are implemented in hardware within an integrated circuit (e.g., using fplns multipliers) and / or using IP cores.

[0121] Figure 11 illustrates an example process 1100 for classification utilizing the fplns function, according to some embodiments. In Figure 11, a set of images 1102 can be received. In one example, the images 1102 are the Modified National Institute of Standards and Technology (MNIST) database image set from the reconstructed MNIST database. MNIST is a large database of handwritten digits from 0 to 9, and is commonly used to train various image processing systems.

[0122] For significant improvements in speed, scaling, and power (especially when considering the number of times the multiplication function must be executed), matrix multiplication can be performed using the fplns mult function (i.e., fplns multiplication) as described herein.

[0123] In this example, a 28x28 image is taken and converted into a one-dimensional array of 784 elements.

[0124] In this simple example, in step 1110, the 784 one-dimensional array is multiplied by a 784×16 weighting matrix 1108 to generate a vector 1112 of 16 values.

[0125] In step 1116 , the 16 value vector 1112 is multiplied by a 16×16 weighting matrix 1114 to generate a 16 value vector 1118 .

[0126] Similarly, step 1122 multiplies the 16 value vector 1118 by a 16×10 weighting matrix 1120 to generate a 10 value vector 1124 .

[0127] As described herein, each of the matrix multiplication functions (eg, in steps 1110, 1116, 1122) may utilize an fplns multiplication function.

[0128] An activation function 1126 is run on the vector of 10 values ​​1124 to create a vector of percentages that can be used to classify the image 1104. Examples of multiplicative functions include a sigmoid function or a softmax function.

[0129] The sigmoid function may be as follows:

[0130] TIFF2024538853000018.tif10170

[0131] In various embodiments, an fplns power function may be utilized in the denominator. Additionally, an fplns division function may be utilized. Alternatively, any combination of fplns and exact functions may be utilized. For example, an fplns power function may be used in conjunction with an exact division function. In another example, an fplns division function may be utilized in conjunction with an exact power and / or addition function.

[0132] The softmax function may be as follows:

[0133] TIFF2024538853000019.tif15170

[0134] In various embodiments, fplns power functions may be utilized for the denominator and numerator. Additionally, fplns division functions may be utilized. Alternatively, any combination of fplns functions and exact functions may be utilized. For example, fplns power functions may be used with exact power functions. In another example, fplns power functions may be utilized with exact division and / or addition functions. Alternatively, fplns division functions may be utilized with exact power functions.

[0135] The fplns functions allow for significant improvements in speed, scaling, power, and efficiency. The fplns functions also support a variety of higher-level functions.

[0136] Although the accuracy of basic FPLNS arithmetic primitives can exhibit significant inaccuracies, the net effect on some models is minimal:

[0137] [Table 3]

[0138] In this example, four models are implemented using approximate FPLNS primitives for multiplication, division, inverse square root, and power. The fully connected model used as the initial test model is a three-level network using a sigmoid activation function. The models were trained in a conventional manner using exact arithmetic for up to 200 epochs. The models were then tested for inference using both standard and FPLNS deep learning primitive layers. Only the computation algorithm was changed; the weight quantization and model architecture were not modified. The results demonstrate that the accuracy loss of the FPLNS arithmetic is less than 1% across all models tested, making it clearly competitive. This is better than 8-bit quantization, which has an accuracy loss of 1.5% for ResNet50.

[0139] Integer quantization: FPLNS techniques can be used to accelerate INT8 multiplication or activation functions if one first converts some integers to floating point. In some embodiments, the FPLNS systems and methods described herein can be utilized for ML models that use a combination of precisions across multiple layers.

[0140] Weight pruning / clustering: Zero weights can be pruned from the calculation. Clusters of weights close to the same value can also be combined and stored in a Huffman table. Both weight pruning and clustering techniques are methods for macro-level approximate model calculations, and either method can be used in conjunction with FPLNS calculations to achieve lower power consumption than pruning / clustering alone. FPLNS is not mutually exclusive with pruning / clustering.

[0141] FIG. 12 is a block diagram illustrating a digital device capable of executing instructions to perform the tasks described herein. A digital device is any device that includes a memory and a processor. In particular, FIG. 12 illustrates a schematic diagram of a machine in the form of an exemplary computer system 1200 in which instructions 1224 (e.g., software) can be executed to cause the machine to perform any one or more of the methodologies described herein. In alternative embodiments, the machine can operate as a standalone device or can be connected (e.g., networked with) other machines, for example, via the Internet. In a networked deployment, the machine can operate in the capacity of a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment.

[0142] The machine may be a server computer, a client computer, a personal computer (PC), a tablet PC, a set-top box (STB), a personal digital assistant (PDA), a mobile phone, a smart phone, a web appliance, a network router, switch or bridge, or any machine capable of executing (sequentially or otherwise) instructions 1224 that specify actions for the machine to take. Additionally, although only one machine is illustrated, the term "machine" shall also be construed to include any collection of machines that individually or jointly execute instructions 1224 to perform any one or more of the methodologies described herein.

[0143] The exemplary computer system 1200 includes a processor 1202 (e.g., a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), one or more application specific integrated circuits (ASICs), one or more radio-frequency integrated circuits (RFICs), or any combination thereof), a main memory 1204, and a static memory 1206, which are configured to communicate with each other via a bus 1208. The computer system 1200 may further include a graphics display unit 1210 (e.g., a plasma display panel (PDP), a liquid crystal display (LCD), a projector, or a cathode ray tube (CRT)). Computer system 1200 may also include an alphanumeric input device 1212 (e.g., a keyboard), a cursor control device 1214 (e.g., a mouse, trackball, joystick, motion sensor, or other pointing instrument), not shown, a data store 1216, a signal generating device 1218 (e.g., a speaker), an audio input device (e.g., a microphone), and a network interface device 1220, which are also configured to communicate with network 1226 via bus 1208.

[0144] The data store 1216 may include a machine-readable medium 1222 having stored thereon instructions 1224 (e.g., software) embodying any one or more of the methodologies or functions described herein. The instructions 1224 (e.g., software) may reside, in whole or at least in part, within the main memory 1204 or within the processor 1202 (e.g., within a processor cache memory) during execution by the computer system 1200, with the main memory 1204 and the processor 1202 also constituting machine-readable media. The instructions 1224 (e.g., software) may be transmitted or received over a network (not shown) via the network interface 1220.

[0145] While machine-readable medium 1222 is shown as a single medium in an exemplary embodiment, the term "machine-readable medium" shall be interpreted to include a single medium or multiple media (e.g., a centralized or distributed database, or associated caches and servers) capable of storing instructions (e.g., instructions 1224). The term "machine-readable medium" shall also be interpreted to include any medium capable of storing instructions (e.g., instructions 1224) for execution by a machine and causing the machine to perform any one or more of the methodologies disclosed herein. The term "machine-readable medium" shall include, but is not limited to, data repositories in the form of solid-state memory, optical media, and magnetic media.

[0146] In this description, the term "engine" refers to computational logic for providing a specified function. An engine can be implemented in hardware, firmware, and / or software. When an engine described herein is implemented as software, the engine can be implemented as a stand-alone program, but can also be implemented by other means, for example as part of a larger program, as any number of separate programs, or as one or more statically or dynamically linked libraries. It will be understood that the named engines described herein represent one embodiment, and other embodiments can include other engines. Furthermore, other embodiments may not include the engines described herein and / or may distribute the functionality described herein differently among multiple engines. Furthermore, functionality belonging to two or more engines can be combined into a single engine. In an embodiment where the engine is implemented by software, the engine is stored on a computer-readable persistent storage device (e.g., hard disk), loaded into memory, and executed by one or more processors as described above in connection with FIG. 12. Alternatively, the hardware or software engine can be stored elsewhere in the computer system.

[0147] As referred to herein, a computer or computing system includes hardware elements used for the operations described herein, including, for example, one or more processors, high speed memory, hard disk storage and backup, network interfaces and protocols, input devices for inputting data, and output devices for displaying, printing, or other presentation of data, regardless of the specific reference of such elements in FIG. 12. Numerous variations from the system architecture specified herein are possible. The entities of such systems, and their respective functions, may be combined or redistributed.

Claims

1. 1. A system comprising an integrated circuit including a hardware inexact floating-point logarithmic number system (FPLNS) multiplier configured to perform an FPLNS function, comprising: The integrated circuit comprises: configured to access a register containing a first floating-point binary value and a first logarithm binary value of the first floating-point binary value, the first floating-point binary value and the first logarithm binary value each being in a FPLNS data format, the first floating-point binary value in the FPLNS format including a sign bit and exponent bits following the sign bit, the exponent bits followed by mantissa bits; configured to access a register containing a second floating point binary value and a second logarithm binary value of the second floating point binary value, the second floating point binary value and the second logarithm binary value each being in an FPLNS data format, and the second floating point binary value being in the FPLNS format; configured to multiply the first floating-point binary value and the second floating-point binary value by the FPLNS multiplier, the FPLNS multiplier comprising: adding the first logarithmic binary value to the second logarithmic binary value by the FPLNS multiplier to form a first logarithmic sum; shifting a bias constant by a number of bits of a mantissa of the first floating point binary value to form a first shifted bias value; subtracting a correction factor from the first shifted bias value to form a first corrected bias value; Subtracting the first corrected bias value from the first logarithmic sum to form a first result. So configured; The integrated circuit is further configured to take an antilog of the first result to generate a multiplication result of the multiplication of the first floating point binary value and the second floating point binary value.

2. The system includes a processor, the processor comprising: The processor is configured to convert the first floating-point binary value to the first logarithmic binary value, where the first floating-point binary value is in the FPLNS format, and the processor configured to convert the first floating-point binary value to the first logarithmic binary value comprises: determining a base 2 logarithm of one plus a mantissa of the first floating point binary value to determine a first logarithmic quantity; adding the first logarithmic quantity to the exponent of the first floating point binary value to form a first sum; subtracting the bias constant from the first sum to form the first log-binary value. the processor configured to: The processor is configured to convert the second floating-point binary value to the second logarithmic binary value, the first floating-point binary value being in the FPLNS format, and the processor is configured to convert the second floating-point binary value to the second logarithmic binary value, the processor comprising: determining a second logarithm quantity by determining the base 2 logarithm of one plus the mantissa of the second floating point binary value; adding the second logarithmic quantity to the exponent of the second floating point binary value to form a second sum; subtracting the bias constant from the second sum to form the first log-binary value. The system of claim 1 , comprising the processor configured to:

3. The system of claim 1 , wherein the multiplication result is in the FPLNS format.

4. The bias constant is 2 (E-1) 2. The system of claim 1, wherein E is −1, where E is the number of bits of the exponent of the first floating-point binary value in the FPLNS format.

5. 2. The system of claim 1, wherein the FPLNS multiplier obtains the correction factor from one or more registers that do not contain the first floating-point binary value, the first logarithm binary value, the second floating-point binary value, and the second logarithm binary value.

6. The system of claim 1 , wherein the correction factor is in the range of 0.04 to 0.

06.

7. 2. The system of claim 1, wherein the exponent bits of the first floating-point binary value in the FPLNS format are positioned such that a most significant one of the exponent bits is closest to the sign bit and a least significant one of the exponent bits is closest to the mantissa bits, and wherein the mantissa bits of the first floating-point binary value in the FPLNS format are positioned such that a most significant one of the mantissa bits is closest to the exponent bit and a least significant one of the mantissa bits is furthest from the exponent bits.

8. 8. The system of claim 7, wherein the exponent bits of the first logarithm binary value in the FPLNS format are positioned such that a most significant one of the exponent bits is closest to the sign bit and a least significant one of the exponent bits is closest to the mantissa bits, and the mantissa bits of the first logarithm binary value in the FPLNS format are positioned such that a most significant one of the mantissa bits is closest to the exponent bits and a least significant one of the mantissa bits is furthest from the exponent bits.

9. The FPLNS multiplier is further configured to divide a third floating-point binary value and a fourth floating-point binary value, the third floating-point binary value and the fourth floating-point binary value being in the FPLNS data format, and the FPLNS multiplier divides the third floating-point binary value and the fourth floating-point binary value by: subtracting, by the FPLNS multiplier, a third logarithm binary value of the third floating-point binary value from the fourth logarithm binary value of the fourth floating-point binary value to form a first logarithmic difference; shifting the bias constant by a number of bits of a mantissa of the third floating point binary value to form a second shifted bias value; subtracting the correction factor from the second shifted bias value to form a second corrected bias value; Adding the second corrected bias value to the first logarithmic sum to form a second result. configured to divide by:

2. The system of claim 1, wherein the integrated circuit is further configured to take an antilog of the second result to generate a division result of a division of the third floating point binary value and the fourth floating point binary value.

10. accessing, by an integrated circuit, a register containing a first floating-point binary value and a first logarithm binary value of the first floating-point binary value, where the first floating-point binary value and the first logarithm binary value are each in an FPLNS data format, where the first floating-point binary value in the FPLNS format includes a sign bit and exponent bits following the sign bit, where the exponent bits are followed by mantissa bits, and where the integrated circuit includes a hardware inexact floating-point logarithmic numeric representation system (FPLNS) multiplier configured to perform an FPLNS function; accessing, by the integrated circuit, a register containing a second floating point binary value and a second logarithm binary value of the second floating point binary value, wherein the second floating point binary value and the second logarithm binary value are each in an FPLNS data format, and wherein the second floating point binary value is in the FPLNS format; multiplying the first floating point binary value and the second floating point binary value by the FPLNS multiplier, the multiplication comprising: adding the first logarithmic binary value to the second logarithmic binary value by the FPLNS multiplier to form a first logarithmic sum; shifting a bias constant by a number of bits of a mantissa of the first floating point binary value to form a first shifted bias value; subtracting a correction factor from the first shifted bias value to form a first corrected bias value; and subtracting the first corrected bias value from the first logarithmic sum to form a first result. and taking the antilog of the first result to generate a multiplication result of the multiplication of the first floating point binary value and the second floating point binary value. A method comprising:

11. Converting the first floating-point binary value to the first logarithmic binary value, where the first floating-point binary value is in the FPLNS format, the step of converting the first floating-point binary value to the first logarithmic binary value includes: determining the base 2 logarithm of one plus the mantissa of the first floating point binary value to determine a first logarithmic quantity; adding the first logarithmic quantity to the exponent of the first floating point binary value to form a first sum; and subtracting the bias constant from the first sum to form the first log-binary value. The steps include: A step of converting the second floating-point binary value to the second logarithmic binary value, the first floating-point binary value being in the FPLNS format, the step of converting the second floating-point binary value to the second logarithmic binary value comprising: determining the base 2 logarithm of one plus the mantissa of the second floating point binary value to determine a second logarithmic quantity; adding the second logarithmic quantity to the exponent of the second floating point binary value to form a second sum; and subtracting the bias constant from the second sum to form the first log-binary value. Including steps The method of claim 10 further comprising:

12. The method of claim 10 , wherein the multiplication result is in the FPLNS format.

13. The bias constant is 2 (E-1) 11. The method of claim 10, wherein E is −1, where E is the number of bits of the exponent of the first floating-point binary value in the FPLNS format.

14. 11. The method of claim 10, wherein the FPLNS multiplier obtains the correction factor from one or more registers that do not contain the first floating-point binary value, the first logarithm binary value, the second floating-point binary value, and the second logarithm binary value.

15. The method of claim 10, wherein the correction factor is in the range of 0.04 to 0.

06.

16. 11. The method of claim 10, wherein the exponent bits of the first floating-point binary value in the FPLNS format are positioned such that a most significant one of the exponent bits is closest to the sign bit and a least significant one of the exponent bits is closest to the mantissa bits, and the mantissa bits of the first floating-point binary value in the FPLNS format are positioned such that a most significant one of the mantissa bits is closest to the exponent bit and a least significant one of the mantissa bits is furthest from the exponent bits.

17. 17. The method of claim 16, wherein the exponent bits of the first logarithm binary value in the FPLNS format are positioned such that a most significant one of the exponent bits is closest to the sign bit and a least significant one of the exponent bits is closest to the mantissa bits, and the mantissa bits of the first logarithm binary value in the FPLNS format are positioned such that a most significant one of the mantissa bits is closest to the exponent bits and a least significant one of the mantissa bits is furthest from the exponent bits.

18. The FPLNS multiplier is further configured to divide a third floating-point binary value and a fourth floating-point binary value, the third floating-point binary value and the fourth floating-point binary value being in the FPLNS data format, and the FPLNS multiplier divides the third floating-point binary value and the fourth floating-point binary value by: subtracting, by the FPLNS multiplier, a third logarithm binary value of the third floating-point binary value from the fourth logarithm binary value of the fourth floating-point binary value to form a first logarithmic difference; shifting the bias constant by a number of bits of a mantissa of the third floating point binary value to form a second shifted bias value; subtracting the correction factor from the second shifted bias value to form a second corrected bias value; adding the second corrected bias value to the first logarithmic sum to form a second result; taking the antilog of the second result to generate a division result of the division of the third floating-point binary value and the fourth floating-point binary value; The method of claim 10 , configured to divide by:

Citation Information

Patent Citations

  • Apparatus for converting floating-point binary numbers to logarithms in binary form and vice versa

    JP1996504046A

  • Arithmetic logic unit, data processing system, method and module

    US20200089474A1