A floating point calculation circuit and a floating point calculation method

Through the split circuit and the exponential processing circuit, the floating point number with larger bits is split into smaller bits, and the calculation is performed using a multiplier with smaller bits, which solves the timing overhead of FP64 and FP32 data calculation in the prior art. The cost of hardware design achieves efficient floating-point number calculation.

CN115812194BActive Publication Date: 2024-11-22HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080102852.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-31
Publication Date
2024-11-22
Estimated Expiration
2040-10-31

AI Technical Summary

Technical Problem

In the existing floating-point number calculation scheme, when using a larger digit multiplier to calculate FP64 and FP32 data, the timing overhead and hardware design cost are high, and the calculation performance is poor when multiplexing the FP64 multiplier to calculate FP32 data.

Method used

By splitting the floating point number with larger digits to floating point number with smaller digits, and using a multiplier with smaller digits for calculation, the splitting circuit is used to split the floating point number into high and low digit parts, and the exponential processing circuit is used to divide the floating point number into high and low digit parts. Computes the split product with the calculation circuit to reduce hardware design costs and timing overhead.

Benefits of technology

It realizes floating-point number calculations with short timing overhead and low hardware design cost, and reasonably utilizes the calculation performance of the multiplier, and is suitable for floating-point number calculations of FP16, FP32, FP64 and FP128 types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115812194B_ABST
    Figure CN115812194B_ABST
Patent Text Reader

Abstract

A floating-point number calculation circuit (100) and a floating-point number calculation method. The floating-point number calculation circuit (100) comprises a splitting circuit (102) for splitting a mantissa part of a first floating-point number and a mantissa part of a second floating-point number. An exponent processing circuit (104) obtains a second shift number of each split mantissa part. A calculation circuit (105) calculates the product of the mantissa part of the first floating-point number and the mantissa part of the second floating-point number according to each split mantissa part and the second shift number of each split mantissa part. The floating-point number calculation circuit (100) can split a floating-point number with a larger number of bits into floating-point numbers with a smaller number of bits, thereby using a multiplier with a smaller number of bits to calculate the floating-point number with a larger number of bits. The floating-point number calculation circuit (100) has a short timing overhead, a low hardware design cost, and reasonably utilizes the calculation performance of the multiplier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the computer field, and further relate to the application of artificial intelligence (AI) technology in the computer field, especially to a floating-point calculation circuit and a floating-point calculation method. Background Art

[0002] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is also the study of the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making. Research in the field of artificial intelligence includes robotics, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, basic AI theory, etc.

[0003] Convolutional neural networks (CNNs) are currently widely used in many types of image processing applications. When such applications use floating point (FP)16 data to train the model, the network training will not converge or converge slowly due to the insufficient precision of FP16 data. Therefore, higher-precision FP32 data is needed to ensure the network training effect. In addition, in supercomputing applications, higher-precision FP64 data is needed for numerical calculations.

[0004] In existing data calculation schemes, multipliers with larger digits are usually used to calculate data. For example, multipliers used to calculate FP64 data are usually reused to calculate FP64 data and FP32 data. The existing calculation scheme designs a 54-bit (binarb digit, bit) multiplier to directly support the calculation of the mantissa of FP64 data. When the multiplier calculates FP32 data, the 54-bit multiplier is logically divided into two 27-bit parts, which are used to support the calculation of the mantissa part of two pairs of FP32 data. As for the processing of the exponential (eaponential, eap) part, the eap processing unit of the FP64 part is directly copied to process the eap part of the additional FP32. However, from the perspective of area ratio, the area overhead of an FP64 multiplier is approximately equal to that of four FP32 multipliers. However, when the FP64 multiplier is reused to calculate FP32 data, only twice the computing performance of the FP32 multiplier is achieved, and the timing overhead of the FP64 multiplier is long, and the hardware design cost is high. Therefore, the performance of timing overhead and hardware design when using a larger number of multipliers to calculate data is not satisfactory. Summary of the invention

[0005] The embodiments of the present application provide a floating-point number calculation circuit and a floating-point number calculation method. The floating-point number calculation circuit can split a floating-point number with a larger number of bits into floating-point numbers with smaller number of bits, thereby using a multiplier with a smaller number of bits to calculate the floating-point number with a larger number of bits. The floating-point number calculation circuit has a short timing overhead, a low hardware design cost, and reasonably utilizes the calculation performance of the multiplier.

[0006] In a first aspect, an embodiment of the present application provides a floating-point number calculation circuit, which includes: a memory controller, a splitting circuit, a storage circuit, an exponent processing circuit and a calculation circuit; the input end of the splitting circuit is electrically connected to the output end of the memory controller, and the output end of the splitting circuit is electrically connected to the input end of the storage circuit; the input end of the exponent processing circuit is electrically connected to the first output end of the storage circuit, and the output end of the exponent processing circuit is electrically connected to the first input end of the calculation circuit; the second input end of the calculation circuit is electrically connected to the second output end of the storage circuit; the memory controller is used to obtain a first floating-point number and a second floating-point number; the splitting circuit is used to split the mantissa part of the first floating-point number and the mantissa part of the second floating-point number and obtain the split the first shift number of each mantissa part after the split; the storage circuit is used to store each mantissa part after the split, the exponent part corresponding to each mantissa part after the split, and the first shift number of each mantissa part after the split; the exponent processing circuit is used to add the exponent part of the first floating-point number and the exponent part of the second floating-point number to obtain a first operation result, and add the first shift number of each mantissa part after the split and the exponent part corresponding to each mantissa part after the split to obtain multiple second operation results, and obtain the second shift number of each mantissa part after the split according to the multiple second operation results; the calculation circuit is used to calculate the product of the mantissa part of the first floating-point number and the mantissa part of the second floating-point number according to each mantissa part after the split and the second shift number of each mantissa part after the split.

[0007] The embodiment of the present application provides a floating-point number calculation circuit, and the floating-point number calculation circuit includes a splitting circuit that splits the mantissa part of a first floating-point number and the mantissa part of a second floating-point number. The exponent processing circuit obtains the second shift number of each mantissa part after the splitting. The calculation circuit calculates the product of the mantissa part of the first floating-point number and the mantissa part of the second floating-point number according to each mantissa part after the splitting and the second shift number of each mantissa part after the splitting. The floating-point number calculation circuit can split a floating-point number with a larger number of digits into floating-point numbers with a smaller number of digits, so that a multiplier with a smaller number of digits is used to calculate the floating-point number with a larger number of digits. The floating-point number calculation circuit provided by the present application has a short timing overhead, a low hardware design cost, and reasonably utilizes the calculation performance of the multiplier.

[0008] In a possible implementation of the first aspect, the splitting circuit is used to split the mantissa part of the first floating-point number into a first high-order mantissa and a first low-order mantissa, and split the mantissa part of the second floating-point number into a second high-order mantissa and a second low-order mantissa, and the first shift number is used to indicate the shift difference between the highest bit of each high-order mantissa and the highest bit of each low-order mantissa.

[0009] In this possible implementation, the floating-point calculation circuit provided in the present application can split the mantissa part of the first floating-point number with a larger number of bits into a first high-order mantissa and a first low-order mantissa with smaller numbers of bits, and split the mantissa part of the second floating-point number with a larger number of bits into a second high-order mantissa and a second low-order mantissa with smaller numbers of bits, thereby using a multiplier with a smaller number of bits to calculate the product of the split mantissa parts, reducing the design cost of the hardware and reasonably utilizing the computing performance of the multiplier.

[0010] In a possible implementation manner of the first aspect, the first high-order mantissa includes a first mantissa, the first low-order mantissa includes a second mantissa, the second high-order mantissa includes a third mantissa, and the second low-order mantissa includes a fourth mantissa.

[0011] In this possible implementation, a specific splitting method for the mantissa part of a floating-point number is provided. After the mantissa part of a FP32-type floating-point number is split using this splitting method, an FP16-type multiplier can be used for calculation. Similarly, after the mantissa part of a FP64-type floating-point number is split using this splitting method, an FP32-type multiplier can be used for calculation, and after the mantissa part of a FP128-type floating-point number is split using this splitting method, an FP64-type multiplier can be used for calculation. This splitting method can realize the use of a multiplier with a smaller number of bits to calculate the product of a mantissa part with a larger number of bits.

[0012] In a possible implementation of the first aspect, the first high-order mantissa includes a first mantissa, the first low-order mantissa includes a second mantissa, a third mantissa, a fourth mantissa, and a fifth mantissa, the second high-order mantissa includes a sixth mantissa, and the second low-order mantissa includes a seventh mantissa, an eighth mantissa, a ninth mantissa, and a tenth mantissa.

[0013] In this possible implementation, a specific splitting method for the mantissa part of a floating-point number is provided. After the mantissa part of a FP64 type floating-point number is split using this splitting method, an FP16 type multiplier can be used for calculation. Similarly, after the mantissa part of a FP128 type floating-point number is split using this splitting method, an FP32 type multiplier can be used for calculation. This splitting method can realize the use of a multiplier with a smaller number of bits to calculate the product of the mantissa part with a larger number of bits.

[0014] In a possible implementation of the first aspect, the exponential processing circuit includes a first adder, a selection circuit and a second adder; the input end of the first adder is electrically connected to the first output end of the storage circuit, and the output end of the first adder is electrically connected to the first input end of the second adder; the second input end of the second adder is electrically connected to the output end of the selection circuit, and the output end of the second adder is electrically connected to the first input end of the calculation circuit; the first adder is used to add the first shift number of each split mantissa part and the exponential part corresponding to each split mantissa part to obtain multiple second operation results; the selection circuit is used to select the maximum value among the multiple second operation results; the second adder is used to subtract the maximum value among the multiple second operation results from each second operation result to obtain the second shift number of each split mantissa part.

[0015] This possible implementation method provides a specific implementation form in hardware, which improves the feasibility of the solution.

[0016] In a possible implementation of the first aspect, the calculation circuit includes a multiplier, a shift register and a third adder; the input end of the multiplier is electrically connected to the second output end of the storage circuit, and the output end of the multiplier is electrically connected to the first input end of the shift register; the second input end of the shift register is electrically connected to the output end of the second adder; the output end of the shift register is electrically connected to the input end of the third adder; the multiplier is used to multiply each mantissa part split from the first high-order mantissa and the first low-order mantissa with each mantissa part split from the second high-order mantissa and the second low-order mantissa to obtain multiple multiplication data; the shift register is used to shift the multiple multiplication data according to the second shift number of each mantissa part after the split; the third adder is used to perform addition operation on the multiple multiplication data after the shift processing to obtain the product of the mantissa part of the first floating-point number and the second floating-point number.

[0017] This possible implementation method provides a specific implementation form in hardware, which improves the feasibility of the solution.

[0018] A second aspect of an embodiment of the present application provides a floating-point number calculation method, the method comprising: obtaining a first floating-point number and a second floating-point number; splitting the mantissa part of the first floating-point number and the mantissa part of the second floating-point number and obtaining a first shift number of each mantissa part after the splitting; storing each mantissa part after the splitting, an exponent part corresponding to each mantissa part after the splitting, and the first shift number of each mantissa part after the splitting; adding the exponent part of the first floating-point number and the exponent part of the second floating-point number to obtain a first operation result, and adding the first shift number of each mantissa part after the splitting and the exponent part corresponding to each mantissa part after the splitting to obtain multiple second operation results, and obtaining the second shift number of each mantissa part after the splitting according to the multiple second operation results; calculating the product of the mantissa part of the first floating-point number and the mantissa part of the second floating-point number according to each mantissa part after the splitting and the second shift number of each mantissa part after the splitting.

[0019] In the embodiment of the present application, the mantissa part of the first floating-point number and the mantissa part of the second floating-point number are split to obtain the second shift number of each mantissa part after the splitting. Then, the product of the mantissa part of the first floating-point number and the mantissa part of the second floating-point number is calculated according to each mantissa part after the splitting and the second shift number of each mantissa part after the splitting. The method can split a floating-point number with a larger number of digits into floating-point numbers with a smaller number of digits, thereby using a multiplier with a smaller number of digits to calculate the floating-point number with a larger number of digits. The floating-point number calculation method provided by the present application makes the timing overhead of the computing device short, the hardware design cost low, and reasonably utilizes the computing performance of the multiplier included in the computing device.

[0020] In a possible implementation of the second aspect, the splitting of the mantissa part of the first floating-point number and the mantissa part of the second floating-point number includes: splitting the mantissa part of the first floating-point number into a first high-order mantissa and a first low-order mantissa, and splitting the mantissa part of the second floating-point number into a second high-order mantissa and a second low-order mantissa, and the first shift number is used to indicate the shift difference between the highest bit of each high-order mantissa and the highest bit of each low-order mantissa.

[0021] In this possible implementation, the floating-point number calculation method provided by the present application can split the mantissa part of the first floating-point number with a larger number of bits into a first high-order mantissa and a first low-order mantissa with smaller numbers of bits, and split the mantissa part of the second floating-point number with a larger number of bits into a second high-order mantissa and a second low-order mantissa with smaller numbers of bits, thereby using a multiplier with a smaller number of bits to calculate the product of the split mantissa parts, reducing the hardware design cost and reasonably utilizing the computing performance of the multiplier.

[0022] In a possible implementation manner of the second aspect, the first high-order mantissa includes a first mantissa, the first low-order mantissa includes a second mantissa, the second high-order mantissa includes a third mantissa, and the second low-order mantissa includes a fourth mantissa.

[0023] In this possible implementation, a specific splitting method for the mantissa part of a floating-point number is provided. After the mantissa part of a FP32-type floating-point number is split using this splitting method, an FP16-type multiplier can be used for calculation. Similarly, after the mantissa part of a FP64-type floating-point number is split using this splitting method, an FP32-type multiplier can be used for calculation, and after the mantissa part of a FP128-type floating-point number is split using this splitting method, an FP64-type multiplier can be used for calculation. This splitting method can realize the use of a multiplier with a smaller number of bits to calculate the product of a mantissa part with a larger number of bits.

[0024] In a possible implementation of the second aspect, the first high-order mantissa includes a first mantissa, the first low-order mantissa includes a second mantissa, a third mantissa, a fourth mantissa and a fifth mantissa, the second high-order mantissa includes a sixth mantissa, and the second low-order mantissa includes a seventh mantissa, an eighth mantissa, a ninth mantissa and a tenth mantissa.

[0025] In this possible implementation, a specific splitting method for the mantissa part of a floating-point number is provided. After the mantissa part of a FP64 type floating-point number is split using this splitting method, an FP16 type multiplier can be used for calculation. Similarly, after the mantissa part of a FP128 type floating-point number is split using this splitting method, an FP32 type multiplier can be used for calculation. This splitting method can realize the use of a multiplier with a smaller number of bits to calculate the product of the mantissa part with a larger number of bits.

[0026] A third aspect of the present application provides a computing device, the computing device comprising a control circuit and a floating-point computing circuit. The floating-point computing circuit computes data under the control of the control circuit, and the floating-point computing circuit is a floating-point computing circuit as described in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A processing schematic diagram of a convolutional neural network provided for this application;

[0028] Figure 2 A schematic diagram of the composition of FP32 type floating-point numbers provided in an embodiment of the present application;

[0029] Figure 3A schematic diagram of a floating-point calculation circuit provided in an embodiment of the present application;

[0030] Figure 4 A schematic diagram of an embodiment of a floating-point number calculation circuit provided in an embodiment of the present application;

[0031] Figure 5 Another structural schematic diagram of a floating-point number calculation circuit provided in an embodiment of the present application;

[0032] Figure 6 A schematic diagram of another embodiment of a floating-point number calculation circuit provided in an embodiment of the present application;

[0033] Figure 7 A schematic diagram of another embodiment of a floating-point number calculation circuit provided in an embodiment of the present application;

[0034] Figure 8 A schematic diagram of another embodiment of a floating-point number calculation circuit provided in an embodiment of the present application;

[0035] Fig. 9 A schematic diagram of another embodiment of a floating-point number calculation circuit provided in an embodiment of the present application;

[0036] Fig.10 A schematic diagram of another embodiment of a floating-point number calculation circuit provided in an embodiment of the present application;

[0037] Fig.11 A schematic diagram of another embodiment of a floating-point number calculation circuit provided in an embodiment of the present application;

[0038] Fig.12 A schematic diagram of another embodiment of a floating-point number calculation circuit provided in an embodiment of the present application;

[0039] Fig.13 A schematic diagram of another embodiment of a floating-point calculation circuit provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solutions and advantages of the present application more clear, the embodiments of the present application are described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0041] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.

[0042] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is also the study of the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making. Research in the field of artificial intelligence includes robotics, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, basic AI theory, etc.

[0043] Figure 1 A processing diagram of a convolutional neural network provided for this application.

[0044] Convolutional neural network (CNN) has broad application prospects in image and speech recognition. Figure 1 As shown in the figure, the convolutional neural network needs to perform convolution operations on multiple convolution kernels and one or more feature maps. Specifically, for each convolution kernel, it starts from the first pixel of the feature map and moves pixel by pixel along the row direction. When it reaches the end of this row, it moves down one pixel in the column direction, returns to the starting point in the row direction, and repeats the row direction movement process until all pixels of the feature map are traversed. In the process of moving the convolution kernel, the parameters in the convolution kernel and the data at the corresponding position in the feature map are used as the two parts of the convolution operation input, and the convolution operation is performed (multiplying two by two and then accumulating the products one by one). After obtaining the convolution result, the convolution result is output.

[0045] Convolutional neural networks (CNNs) are currently widely used in various types of image processing applications. When image processing applications use floating point (FP) 16 data to train the model, the network training will not converge or converge slowly due to the insufficient precision of FP16 data. Therefore, higher-precision FP32 data is needed to ensure the network training effect. In addition, in some applications, higher-precision FP64 data and FP128 data are needed for model training.

[0046] It should be noted that the floating point calculation circuit involved in the present invention can be applied to the field of data signal processing, such as image processing systems, radar systems and communication systems, in addition to being applied to the field of artificial intelligence. This circuit and method can optimize the performance of digital signal processing (DSP) or other digital devices. For example, it can be applied to digital devices in current communication systems such as long term evolution (LTE), universal mobile telecommunications system (UMTS), and global system for mobile communications (GSM).

[0047] In existing data calculation schemes, multipliers with larger digits are usually used to calculate data. For example, multipliers used to calculate FP64 data are usually reused to calculate FP64 data and FP32 data. Some calculation schemes design a 54-bit multiplier to directly support the calculation of the mantissa of FP64 data. When the multiplier calculates FP32 data, the 54-bit multiplier is logically divided into two 27-bit parts, which are used to support the calculation of the mantissa part of two pairs of FP32 data. However, from the perspective of area ratio, the area overhead of an FP64 multiplier is approximately equal to four FP32 multipliers. However, when the prior art reuses the FP64 multiplier to calculate FP32 data, it only achieves twice the computing performance of the FP32 multiplier, and the timing overhead of the FP64 multiplier is long, and the hardware design cost is high. Therefore, the performance of timing overhead and hardware design when using a multiplier with a larger digit to calculate data is not satisfactory.

[0048] In view of the above problems existing in the existing data calculation scheme, the embodiment of the present application provides a floating-point number calculation circuit, which includes a splitting circuit that splits the mantissa part of the first floating-point number and the mantissa part of the second floating-point number and obtains the first shift number of each mantissa part after the splitting, and an exponent processing circuit that adds the first shift number of each mantissa part after the splitting and the exponent part corresponding to each mantissa part after the splitting to obtain multiple second operation results, and obtains the second shift number of each mantissa part after the splitting according to the multiple second operation results. The calculation circuit calculates the product of the mantissa part of the first floating-point number and the mantissa part of the second floating-point number according to each mantissa part after the splitting and the second shift number of each mantissa part after the splitting. The floating-point number calculation circuit can split a floating-point number with a larger number of bits into floating-point numbers with a smaller number of bits, so that a multiplier with a smaller number of bits is used to calculate the floating-point number with a larger number of bits, and the calculation performance of the multiplier is reasonably utilized, the timing overhead is short, and the hardware design cost is low.

[0049] The following will be combined with the drawings in the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. The following specific embodiments can be combined with each other, and the same or similar contents will not be repeated in different embodiments. It should also be noted that the length, width, height (or thickness) of the various components shown in the embodiments of the present application are only exemplary descriptions and are not limitations on the storage unit of the present application.

[0050] There are four common formats of floating point numbers, namely FP16, FP32, FP64 and FP128. Each floating point number consists of three parts, namely the sign bit (sign), the exponent bit (exp) and the mantissa bit (mantissa). The actual value of a floating point number is equal to sign*2 exp *mantissa.

[0051] Figure 2 A schematic diagram of the composition of FP32 type floating-point numbers provided in an embodiment of the present application.

[0052] like Figure 2 As shown, the floating point number of FP32 type has 1-bit sign, 8-bit exp and 24-bit mantissa, showing that the total storage is 32 bits. The highest bit of mantissa is implicitly stored (if exp is not 0, the hiden bit is 1, otherwise the hiden bit is 0), and the three parts total 32 bits.

[0053] When calculating a floating point number A*B, the calculation process of the exponent part is A_exp+B_exp, and the calculation process of the mantissa part is A_mantissa*B_mantissa. Then the newly obtained exp and mantissa are used to generate a new floating point number according to the format in the standard.

[0054] When calculating the floating point number A+B, first find the larger one between A_exp and B_exp. Assume that A_exp is n larger than B_exp. Then when adding mantissa, you need to first shift B_mantissa right by n bits, then add it to A_mantissa to get the new mantissa, and then generate a new floating point number according to the standard. When calculating the addition of multiple floating point numbers, first find the largest exp, then shift the mantissa accordingly based on the difference between the largest exp and the exp of each floating point number, and then add the shifted mantissa.

[0055] Figure 3 It is a structural schematic diagram of a floating-point calculation circuit provided in an embodiment of the present application.

[0056] See also Figure 3 The floating-point calculation circuit 100 provided in the present application includes: a memory controller 101, a splitting circuit 102, a storage circuit 103, an exponential processing circuit 104 and a calculation circuit 105.

[0057] In the embodiment of the present application, the input end of the split circuit 102 is electrically connected to the output end of the memory controller 101, and the output end of the split circuit 102 is electrically connected to the input end of the storage circuit 103. The input end of the index processing circuit 104 is electrically connected to the first output end of the storage circuit 103, and the output end of the index processing circuit 104 is electrically connected to the first input end of the calculation circuit 105. The second input end of the calculation circuit 105 is electrically connected to the second output end of the storage circuit 103.

[0058] In the embodiment of the present application, a first floating point number and a second floating point number are stored in the memory, and the memory controller 101 is used to obtain the first floating point number and the second floating point number. Optionally, the memory can be a double data rate (double data rate, DDR) memory, or other memory, which is not specifically limited here. The memory controller can be a DDR controller, or other types of memory controllers, which are not specifically limited here.

[0059] In the embodiment of the present application, the splitting circuit 102 is used to split the mantissa part of the first floating point number and the mantissa part of the second floating point number and obtain the first shift number of each mantissa part after the splitting. The storage circuit 103 is used to store each mantissa part after the splitting, the exponent part corresponding to each mantissa part after the splitting, and the first shift number of each mantissa part after the splitting.

[0060] For example, if the first floating point number is a floating point number of FP32 type, it is assumed that the mantissa part of the first floating point number is 1000000000000000000000001. The splitting circuit 102 can split the mantissa part of the first floating point number into a part A with a length of 12 bits and a part B with a length of 12 bits, where the part A is 100000000000, and the part B is 000000000001. If the part A is used as a reference, the part B obtained after the splitting must be right-shifted by 12 bits and then added to the part A to obtain the mantissa part of the first floating point number. Therefore, the first shift number of the part B obtained by the splitting circuit 102 is right-shifted by 12 bits.

[0061] The above splitting method is only used for illustration. Optionally, the first floating-point number can be a floating-point number of the FP32 type, the first floating-point number can also be a floating-point number of the FP64 type, or the first floating-point number can also be a floating-point number of the FP128 type, which is not limited here. Optionally, the mantissa part of the first floating-point number can be split into two parts or multiple parts, which is not limited here. The number of digits of each mantissa part after splitting can be equal, or the number of digits of each mantissa part after splitting can also be unequal, which is not limited here.

[0062] In the embodiment of the present application, the data type of the second floating-point number is similar to the data type of the first floating-point number, and the splitting method of the mantissa part of the second floating-point number is similar to the splitting method of the mantissa part of the first floating-point number, which will not be described in detail here.

[0063] In the embodiment of the present application, the exponential processing circuit 104 is used to add the exponential part of the first floating-point number and the exponential part of the second floating-point number to obtain a first operation result, and the first operation result is the operation result of the exponential part when the first floating-point number is multiplied by the second floating-point number. The exponential processing circuit 104 is also used to add the first shift number of each split mantissa part and the exponential part corresponding to each split mantissa part to obtain multiple second operation results, and obtain the second shift number of each split mantissa part according to the multiple second operation results. The calculation circuit 105 is used to calculate the product of the mantissa part of the first floating-point number and the second floating-point number according to each split mantissa part and the second shift number of each split mantissa part.

[0064] Figure 4It is a schematic diagram of an embodiment of a floating-point calculation circuit provided in an embodiment of the present application.

[0065] See also Figure 4 Optionally, the splitting circuit can split the mantissa of the first floating point number into a first high-order mantissa and a first low-order mantissa, and split the mantissa of the second floating point number into a second high-order mantissa and a second low-order mantissa. The first shift number is used to indicate the shift difference between the highest bit of each high-order mantissa and the highest bit of each low-order mantissa.

[0066] In the present application, two specific splitting methods of the first high-order mantissa and the first low-order mantissa are provided, which will be described in detail in the following embodiments.

[0067] Mode 1: The first high-order mantissa includes the first mantissa, the first low-order mantissa includes the second mantissa, the second high-order mantissa includes the third mantissa, and the second low-order mantissa includes the fourth mantissa.

[0068] For example, if the first floating point number is a floating point number of FP32 type, it is assumed that the mantissa part of the first floating point number is 100000000011000000000001. The splitting circuit 102 can split the mantissa part of the first floating point number into a first mantissa with a length of 11 bits and a second mantissa with a length of 13 bits, the first mantissa is 10000000001, and the second mantissa is 1000000000001.

[0069] In this embodiment, the first mantissa belongs to the first high-order mantissa, and the second mantissa belongs to the first low-order mantissa. The first shift number is used to indicate the shift difference between the highest bit of each high-order mantissa and the highest bit of each low-order mantissa, that is, the shift number of the first mantissa is 0, and the first shift number of the second mantissa is the shift difference between the first bit of the second mantissa and the first bit of the first mantissa, which is 11 bits, so the first shift number of the second mantissa is right shifted by 11 bits.

[0070] In this embodiment, the splitting method of the second high-order mantissa is similar to that of the first high-order mantissa, and the splitting method of the second low-order mantissa is similar to that of the first low-order mantissa, and the details are not repeated here.

[0071] Method 2: The first high-order mantissa includes the first mantissa, the first low-order mantissa includes the second mantissa, the third mantissa, the fourth mantissa and the fifth mantissa, the second high-order mantissa includes the sixth mantissa, the second low-order mantissa includes the seventh mantissa, the eighth mantissa, the ninth mantissa and the tenth mantissa.

[0072] For example, if the first floating point number is a floating point number of FP64 type, it is assumed that the splitting circuit 102 can split the mantissa of the first floating point number into a first mantissa 10001 with a length of 5 bits, a second mantissa 100000000001 with a length of 12 bits, a third mantissa 100000000011 with a length of 12 bits, a fourth mantissa 100000000111 with a length of 12 bits, and a fifth mantissa 100000001111 with a length of 12 bits.

[0073] In the present embodiment, the first mantissa belongs to the first high-order mantissa, and the second mantissa, the third mantissa, the fourth mantissa, and the fifth mantissa belong to the first low-order mantissa. The first shift number is used to indicate the shift difference between the highest bit of the high-order mantissa and the highest bit of each low-order mantissa, that is, the shift number of the first mantissa is 0, and the first shift number of the second mantissa is the shift difference between the first bit of the second mantissa and the first bit of the first mantissa, which is the same as the number of bits of the first mantissa, so the first shift number of the second mantissa is 5 bits right shift. The first shift number of the third mantissa is the shift difference between the first bit of the third mantissa and the first bit of the first mantissa, which is the same as the sum of the shift numbers of the first mantissa and the second mantissa, so the first shift number of the third mantissa is 17 bits right shift. The first shift number of the fourth mantissa is the shift difference between the first bit of the fourth mantissa and the first bit of the first mantissa, which is the same as the sum of the shift numbers of the first mantissa, the second mantissa, and the third mantissa, so the first shift number of the fourth mantissa is 29 bits right shift. The first shift amount of the fifth mantissa is the shift difference between the first digit of the fifth mantissa and the first digit of the first mantissa, 41 bits, which is the same as the sum of the shift amounts of the first mantissa, the second mantissa, the third mantissa, and the fourth mantissa, so the first shift amount of the fifth mantissa is 41 bits to the right.

[0074] In this embodiment, the first high-order mantissa and the second high-order mantissa may also be split in other different ways. For example, the first digit is 9 bits long, and the second mantissa, the third mantissa, the fourth mantissa and the fifth mantissa are all 11 bits. The specifics are not limited here.

[0075] In this embodiment, the splitting method of the second high-order mantissa is similar to that of the first high-order mantissa, and the splitting method of the second low-order mantissa is similar to that of the first low-order mantissa, and the details are not repeated here.

[0076] In the embodiment of the present application, in addition to the splitting methods provided by the above-mentioned methods 1 and 2, the floating-point number calculation circuit can also use other splitting methods when calculating the product of floating-point numbers, which are not specifically limited here.

[0077] Figure 5 It is another structural schematic diagram of the floating-point calculation circuit provided in an embodiment of the present application.

[0078] See also Figure 5In an embodiment of the present application, the exponential processing circuit includes a first adder, a selection circuit and a second adder.

[0079] In the embodiment of the present application, the input end of the first adder is electrically connected to the first output end of the storage circuit, the output end of the first adder is electrically connected to the first input end of the second adder, the second input end of the second adder is electrically connected to the output end of the selection circuit, and the output end of the second adder is electrically connected to the first input end of the calculation circuit.

[0080] In the embodiment of the present application, the first adder is used to add the first shift number of each split mantissa part to the exponent part corresponding to each split mantissa part to obtain multiple second operation results. The selection circuit is used to select the maximum value among the multiple second operation results. The second adder is used to subtract the maximum value among the multiple second operation results from each second operation result to obtain the second shift number of each split mantissa part.

[0081] Optionally, the calculation circuit may include a multiplier, a shift register and a third adder.

[0082] In the embodiment of the present application, the input end of the multiplier is electrically connected to the second output end of the storage circuit, and the output end of the multiplier is electrically connected to the first input end of the shift register. The second input end of the shift register is electrically connected to the output end of the second adder. The output end of the shift register is electrically connected to the input end of the third adder.

[0083] In the embodiment of the present application, the multiplier is used to multiply the mantissa parts separated from the first high-order mantissa and the first low-order mantissa respectively with the mantissa parts separated from the second high-order mantissa and the second low-order mantissa to obtain a plurality of multiplication data. The shift register is used to perform shift processing on the plurality of multiplication data according to the second shift number of each mantissa part after the splitting. The third adder is used to perform addition operation on the plurality of multiplication data after the shift processing to obtain the product of the mantissa part of the first floating-point number and the second floating-point number.

[0084] Example 1:

[0085] Figure 6 It is a schematic diagram of another embodiment of the floating-point calculation circuit provided in an embodiment of the present application.

[0086] See also Figure 6 , if the first floating point number A and the second floating point number B are both FP32 type floating point numbers, when processing the calculation of FP32 type floating point numbers, the mantissa part of the first floating point number is split into A MSB With A LSB Split the mantissa part of the second floating point number into B MSB With B LSB Two parts, A MSB, A LSB , B MSB With B LSB The multiplication of the mantiSSa part of the first floating point number A and the mantissa part of the second floating point number B can be expressed as Formula 1.

[0087] Formula 1:

[0088] A mantissa *B mantissa

[0089] =(A MSB +A LSB >>12bit)*(B MSB +B LSB >>12bit)

[0090] =A MSB *B MSB +A MSB *B LSB >>12bit+A LSB *B MSB >>12bit+A LSB *B LSB >>24bit

[0091] like Figure 6 As shown, A MSB The corresponding exponential part is A_EXP, which is the same as B MSB The corresponding exponential part is B_EXP, and the A obtained by the split circuit is MSB The shift number is 0, B MSB The shift number is also 0, so EXP offset (the first adder) adds A MSB -0 and B MSB -0 is added to get A_EXP+B_EXP, A_EXP+B_EXP is A MSB *B MSB The corresponding second operation result can represent A MSB *B MSB The result of multiplying the corresponding exponential parts.

[0092] A MSB The corresponding exponential part is A_EXP, which is the same as B LSB The corresponding exponential part is B_EXP, and the A obtained by the split circuit is MSB The shift number is 0, B LSB The shift number is -12. For ease of calculation, the shift number -12 can be split into -6 and -6, and the exponent parts are recorded as A_EXP-6 and B_EXP-6 respectively. EXP offset (first adder) adds AMSB -6 and B LSB -6 is added to get A_EXP+B_EXP-12, A_EXP+B_EXP-12 is A MSB *B LSB The corresponding second operation result can represent A MSB *B LSB The result of multiplying the corresponding exponential parts.

[0093] A LSB The corresponding exponential part is A_EXP, which is the same as B MSB The corresponding exponential part is B_EXP, and the A obtained by the split circuit is LSB The shift number is -12, B MSB The shift number is 0. For ease of calculation, the shift number -12 can be split into -6 and -6, and the exponent parts are recorded as A_EXP-6 and B_EXP-6 respectively. EXP offset (first adder) adds A LSB -6 and B MSB -6 is added to get A_EXP+B_EXP-12, A_EXP+B_EXP-12 is A LSB *B MSB The corresponding second operation result can represent A LSB *B MSB The result of multiplying the corresponding exponential parts.

[0094] A LSB The corresponding exponential part is A_EXP, which is the same as B LSB The corresponding exponential part is B_EXP, and the A obtained by the split circuit is LSB The shift number is -12, B LSB The shift number is -12. EXP offset (first adder) adds A LSB -12 and B LSB The result of -12 is added to get A_EXP+B_EXP-24, A_EXP+B_EXP-24 is A LSB *B LSB The corresponding second operation result can represent A LSB *B LSB The result of multiplying the corresponding exponential parts.

[0095] After calculating and obtaining multiple second operation results, the selection circuit obtains MAX EXP (the maximum value among the multiple second operation results) and inputs MAX EXP into each delta (second adder). Each delta subtracts MAX EXP from each second operation result to obtain the second shift number of each split mantissa part.

[0096] Each 13-bit Mul unit (multiplier) calculates A MSB *B MSB , A MSB *B LSB , A LSB *B MSB and A LSB *B LSB To obtain multiple multiplication data, shift (shift register) shifts each part of the input multiplication data after receiving the second shift number sent by delta, and adder (third adder) adds the shifted multiple multiplication data to obtain the product of the first floating point number and the mantissa of the second floating point number.

[0097] In this embodiment, the shift number -12 can optionally be split in other ways, such as -3 and -9, -4 and -8, or other ways, as long as the total number of the two parts of the shift numbers after the split is -12, which is not limited here. Similarly, the shift number -24 can also be split in different ways, which is not limited here.

[0098] In this embodiment, the shift number -12 can optionally be split in other ways, such as -3 and -9, -4 and -8, or other ways, as long as the total number of the two parts of the shift numbers after the split is -12, which is not limited here. Similarly, the shift number -24 can also be split in different ways, which is not limited here.

[0099] Figure 7 A schematic diagram of another embodiment of a floating-point calculation circuit provided in an embodiment of the present application.

[0100] In the present application, please refer to Figure 7 , the above Figure 6 The embodiment shown is regarded as a calculation module. If multiple calculation modules perform multiplication operations on multiple pairs of floating-point numbers, the selection circuit can select the maximum value (max exp) of all the second operation results in the multiple calculation modules, and return the maximum value of all the second operation results to each calculation module. Each calculation module obtains the second shift number of each split mantissa part according to the maximum value of all the second operation results.

[0101] Example 2: If the first floating point number A and the second floating point number B are both FP64 type floating point numbers, when processing the calculation of FP64 type floating point numbers, the mantissa part of the first floating point number is split into five parts: a0, a1, a2, a3, a4, and a5. The mantissa part of the first floating point number is split into five parts: b0, b1, b2, b3, b4, and b5. Among them, the number of bits of a1, a2, a3, a4, b1, b2, b3, and b4 are all 12 bits, and the number of bits of a0 and b0 is 5 bits. The multiplication of the mantissa part of the first floating point number A and the mantissa part of the second floating point number B can be expressed as Formula 2.

[0102] Formula 2:

[0103] A mantissa *B mantissa

[0104] =(a0<<48bit+a1<<36bit+a2<<24bit+a3<<12bit+a4)*

[0105] (b0<<48bit+b1<<36bit+b2<<24bit+b3<<12bit+b4)

[0106] =a0*b0<<96bit

[0107] +(a0*b1+b0*a1)<<84bit

[0108] +(a0*b2+b0*a2+a1*b1)<<72bit

[0109] +(a0*b3+b0*a3+a1*b2+b1*a2)<<60bit

[0110] +(a0*b4+b0*a4+a1*b3+b1*a3+b2*a2)<<48bit

[0111] +(a1*b4+b1*a4+a2*b3+b2*a3)<<36bit

[0112] +(a2*b4+b2*a4+a3*b3)<<24bit

[0113] +(a3*b4+b3*a4)<<12bit

[0114] +a4*b4

[0115] The process of calculating the product of the mantissa of the first floating point number and the second floating point number by the exponent circuit and the calculation circuit is similar to the embodiment shown in the above example 1, and will not be described in detail here.

[0116] In this embodiment, since the length of the mantissa part of the FP64 type floating point number is 53 bits, the total length of the mantissa part obtained after the calculation of A_mantissa*B_mantissa is 106 bits. If you want to directly complete the calculation of the mantissa part of a pair of FP64 type floating point numbers in one computing module, the adder (third adder) needs to be expanded to support the calculation of data with a length of 106 bits. The area cost and timing cost of the bracketed adder are too high. Therefore, you can choose to split the multiplication of a pair of FP64 mantissa into two parts.

[0117] Figure 8 A schematic diagram of another embodiment of a floating-point calculation circuit provided in an embodiment of the present application.

[0118] See also Figure 8 In this embodiment, optionally, the floating point calculation circuit can combine the 13 pairs of partial multiplications of the higher bits into a high-order part (part1), and combine the 12 pairs of partial multiplications of the lower bits into another part to form a low-order part (part2). The high-order part requires a total of 60-bit addition trees, and the actual number of bits required to be calculated for the low-order part is 53 bits.

[0119] Fig. 9 A schematic diagram of another embodiment of a floating-point calculation circuit provided in an embodiment of the present application.

[0120] like Fig. 9 As shown in the figure, the corresponding positions of the calculation results of each part of part1 and part2 after calculation in the addition tree. The 60-bit addition tree can cover the calculation of part1. When calculating part2, the lowest few bits of the addition tree cannot be completely covered, but these bits do not need to be involved in the calculation either. When processing this part of data that cannot be covered by the addition tree, you can choose to store this part of the data and then use this part of the stored data in subsequent calculations, or you can choose to directly cut off this part of the data, which is not limited here.

[0121] The floating-point calculation circuit provided in the embodiments of the present application can be applied to convolutional neural networks, and the specific application process is described in detail in the following embodiments.

[0122] Assume that the first floating point number A and the second floating point number B are both FP32 type floating point numbers, and the first floating point number A is data in the feature image.

[0123] Fig.10 A schematic diagram of another embodiment of a floating-point calculation circuit provided in an embodiment of the present application.

[0124] Step 1: Please refer to Fig.10 , the second floating point number B is the data in the filter matrix. The DDR controller (memory controller) reads multiple first floating point numbers A and second floating point numbers B from the DDR (memory), splits the mantissa part of the first floating point number A into two parts, MSB and LSB, through the high and low bit splitting logic (splitting circuit) and stores them in the data RAM (storage circuit). Fig.10 The contents included in I, II, ...X are A_MSB and A_LSB obtained after the mantissa of each first floating point number A is split, and the exponential part EXP corresponding to each A_MSB and A_LSB, and the mantissa part of the second floating point number B is split into two parts, MSB and LSB, and stored in the weight RAM (storage circuit). Fig.10 The contents included in 1, 2, and N are the B_MSB and B_LSB obtained after the mantissa splitting of each second floating point number B, and the exponential part EXP corresponding to each B_MSB and B_LSB.

[0125] Fig.11 A schematic diagram of another embodiment of a floating-point calculation circuit provided in an embodiment of the present application.

[0126] Step 2: Please refer to Fig.11 , the mantissa after splitting in the weight RAM is preloaded into the convolution calculation unit, and at the same time, EXP (the exponential part corresponding to each mantissa part after splitting) is processed by EXP offset (the second adder) and also preloaded into the convolution calculation unit.

[0127] Fig.12 A schematic diagram of another embodiment of a floating-point calculation circuit provided in an embodiment of the present application.

[0128] Step 3: Please refer to Fig.12 , extract the first segment of mantissa data (part I) from the data RAM, and similarly the EXP part is also processed by exp offset first, and then placed in the convolution calculation unit, and calculated with the preloaded parameters (part 1) to obtain the result.

[0129] Fig.13 A schematic diagram of another embodiment of a floating-point calculation circuit provided in an embodiment of the present application.

[0130] Step 4: Please refer to Fig.13, convolution processing unit 1 forwards the first segment of data (part I) to computing unit 2, and obtains the second segment of data (part II) from the data RAM. After computing unit 1 obtains part II data, computing unit 2 completes the operation and generates the result after obtaining part I data. After each clock, computing units 2 to N forward the data processed in the previous clock to the next computing unit, and computing unit 1 obtains new data from the data RAM each time.

[0131] Step 5: Repeat step 4 until all data are processed and the result is generated.

[0132] The above is a detailed introduction to the floating-point calculation circuit and floating-point calculation method provided by the embodiments of the present application. The principles and implementation methods of the present application are described in detail using specific examples herein. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those of ordinary skill in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A floating point calculation circuit, characterized in that: The floating point calculation circuit comprises: a memory controller, a splitting circuit, a storage circuit, an exponential processing circuit and a calculation circuit; The input end of the splitting circuit is electrically connected to the output end of the memory controller, and the output end of the splitting circuit is electrically connected to the input end of the storage circuit; The input end of the exponential processing circuit is electrically connected to the first output end of the storage circuit, and the output end of the exponential processing circuit is electrically connected to the first input end of the calculation circuit; The second input terminal of the calculation circuit is electrically connected to the second output terminal of the storage circuit; The memory controller is used to obtain a first floating point number and a second floating point number; The splitting circuit is used for splitting the mantissa part of the first floating point number and the mantissa part of the second floating point number and obtaining a first shift number of each mantissa part after the splitting; The storage circuit is used to store each split mantissa part, an exponent part corresponding to each split mantissa part, and a first shift number of each split mantissa part; The exponential processing circuit is used for adding the exponent part of the first floating-point number and the exponent part of the second floating-point number to obtain a first operation result, and adding the first shift number of each split mantissa part and the exponent part corresponding to each split mantissa part to obtain a plurality of second operation results, and obtaining the second shift number of each split mantissa part according to the plurality of second operation results; The calculation circuit is used for calculating the product of the mantissa part of the first floating point number and the second floating point number according to each mantissa part after the splitting and the second shift number of each mantissa part after the splitting.

2. The floating point number calculation circuit according to claim 1, wherein: The splitting circuit is used to split the mantissa part of the first floating-point number into a first high-order mantissa and a first low-order mantissa, and split the mantissa part of the second floating-point number into a second high-order mantissa and a second low-order mantissa, and the first shift number is used to indicate the shift difference between the highest bit of each high-order mantissa and the highest bit of each low-order mantissa.

3. The floating point number calculation circuit according to claim 2, wherein: The first high-order mantissa includes a first mantissa, the first low-order mantissa includes a second mantissa, the second high-order mantissa includes a third mantissa, and the second low-order mantissa includes a fourth mantissa.

4. The floating point calculation circuit according to claim 2, wherein: The first high-order mantissa includes a first mantissa, the first low-order mantissa includes a second mantissa, a third mantissa, a fourth mantissa and a fifth mantissa, the second high-order mantissa includes a sixth mantissa, and the second low-order mantissa includes a seventh mantissa, an eighth mantissa, a ninth mantissa and a tenth mantissa.

5. The floating point number calculation circuit according to claim 3 or 4, wherein: The exponential processing circuit includes a first adder, a selection circuit and a second adder; The input end of the first adder is electrically connected to the first output end of the storage circuit, and the output end of the first adder is electrically connected to the first input end of the second adder; The second input terminal of the second adder is electrically connected to the output terminal of the selection circuit, and the output terminal of the second adder is electrically connected to the first input terminal of the calculation circuit; The first adder is used for adding the first shift number of each split mantissa part and the exponent part corresponding to each split mantissa part to obtain a plurality of second operation results; The selection circuit is used to select the maximum value among the plurality of second operation results; The second adder is used for subtracting the maximum value among the plurality of second operation results from each second operation result to obtain the second shift number of each split mantissa part.

6. The floating point calculation circuit according to claim 5, wherein: The calculation circuit includes a multiplier, a shift register and a third adder; The input end of the multiplier is electrically connected to the second output end of the storage circuit, and the output end of the multiplier is electrically connected to the first input end of the shift register; The second input terminal of the shift register is electrically connected to the output terminal of the second adder; The output end of the shift register is electrically connected to the input end of the third adder; The multiplier is used to multiply each mantissa part separated from the first high-order mantissa and the first low-order mantissa with each mantissa part separated from the second high-order mantissa and the second low-order mantissa to obtain a plurality of multiplication data; The shift register is used for performing shift processing on the plurality of multiplication data according to the second shift number of each split mantissa part; The third adder is used for performing addition operation on the plurality of multiplication data after the shift processing to obtain the product of the mantissa part of the first floating point number and the second floating point number.

7. A floating point number calculation method, characterized in that: The method is applied to a floating point number calculation circuit, and the method comprises: Get the first floating point number and the second floating point number; Splitting the mantissa part of the first floating-point number and the mantissa part of the second floating-point number and obtaining a first shift number of each of the split mantissa parts; Store each split mantissa part, an exponent part corresponding to each split mantissa part, and a first shift number of each split mantissa part; Adding the exponent part of the first floating-point number and the exponent part of the second floating-point number to obtain a first operation result, and adding the first shift number of each split mantissa part and the exponent part corresponding to each split mantissa part to obtain a plurality of second operation results, and obtaining a second shift number of each split mantissa part according to the plurality of second operation results; The product of the mantissa part of the first floating-point number and the mantissa part of the second floating-point number is calculated according to each mantissa part after the splitting and the second shift number of each mantissa part after the splitting.

8. The floating point number calculation method according to claim 7, wherein: The step of splitting the mantissa part of the first floating point number and the mantissa part of the second floating point number comprises: The mantissa part of the first floating-point number is split into a first high-order mantissa and a first low-order mantissa, and the mantissa part of the second floating-point number is split into a second high-order mantissa and a second low-order mantissa, and the first shift number is used to indicate the shift difference between the highest bit of each high-order mantissa and the highest bit of each low-order mantissa.

9. The floating point number calculation method according to claim 8, wherein: The first high-order mantissa includes a first mantissa, the first low-order mantissa includes a second mantissa, the second high-order mantissa includes a third mantissa, and the second low-order mantissa includes a fourth mantissa.

10. The floating point number calculation method according to claim 8, wherein: The first high-order mantissa includes a first mantissa, the first low-order mantissa includes a second mantissa, a third mantissa, a fourth mantissa and a fifth mantissa, the second high-order mantissa includes a sixth mantissa, and the second low-order mantissa includes a seventh mantissa, an eighth mantissa, a ninth mantissa and a tenth mantissa.

11. A computing device, characterized in that: The computing device comprises a control circuit and a floating point number computing circuit; The floating-point number calculation circuit calculates data under the control of the control circuit, and the floating-point number calculation circuit is the floating-point number calculation circuit according to any one of claims 1 to 6.