WO2023124372A1 - 浮点数处理装置、方法、电子设备、存储介质及芯片 - Google Patents
浮点数处理装置、方法、电子设备、存储介质及芯片 Download PDFInfo
- Publication number
- WO2023124372A1 WO2023124372A1 PCT/CN2022/124517 CN2022124517W WO2023124372A1 WO 2023124372 A1 WO2023124372 A1 WO 2023124372A1 CN 2022124517 W CN2022124517 W CN 2022124517W WO 2023124372 A1 WO2023124372 A1 WO 2023124372A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- floating
- point number
- target
- point
- processed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F5/00—Methods or arrangements for data conversion without changing the order or content of the data handled
- G06F5/01—Methods or arrangements for data conversion without changing the order or content of the data handled for shifting, e.g. justifying, scaling, normalising
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/06—Arrangements for sorting, selecting, merging, or comparing data on individual record carriers
- G06F7/10—Selecting, i.e. obtaining data of one kind from those record carriers which are identifiable by data of a second kind from a mass of ordered or randomly- distributed record carriers
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
- G06F7/483—Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers
- G06F7/485—Adding; Subtracting
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present disclosure relates to the technical field of integrated circuits, and in particular, to a floating-point number processing device, method, electronic equipment, computer-readable storage medium, and chip.
- the floating-point number calculation is a kind of calculation in the processor with many calculation steps, large delay, and high power consumption, which has a great impact on the performance index of the processor. Therefore, it is particularly important to propose a method for optimizing the floating-point number processing process.
- the present disclosure at least provides a floating-point number processing device, method, electronic equipment, computer-readable storage medium, and chip.
- the present disclosure provides a floating-point number processing device, the device comprising: a selector, configured to extend the sign bit of each of the obtained multiple floating-point numbers to be processed to The target bit width is to obtain a plurality of extended floating-point numbers; wherein, the target bit-width matches the total number of floating-point numbers to be processed; an adder is connected to the selector for converting the plurality of extended The floating-point numbers are accumulated to obtain the target floating-point number.
- a selector can be used to extend the sign bit of each floating-point number to be processed to the target bit width, and multiple extended floating-point numbers can be obtained. points, which realizes the expansion of the bit width of the floating-point numbers to be processed, and then makes it unnecessary to normalize the intermediate floating-point numbers obtained during the accumulation process during the accumulation process of multiple expanded floating-point numbers, reducing the normalization process.
- the number of times reduces the delay and power consumption of the chip to process the accumulation process of multiple extended floating-point numbers; at the same time, after reducing the number of normalized processing, it can alleviate the data loss problem caused by normalized processing and improve the accuracy of the target floating-point number. precision.
- the device further includes: a comparator connected to the adder, configured to normalize the target floating-point number input from the adder to obtain a target processing result, Wherein, the format of the target processing result matches the preset format.
- the target floating-point number can be normalized once after accumulating to obtain the target floating-point number
- the target processing result is obtained, the number of normalized processing is reduced, and the delay and power consumption of the accumulation process of multiple floating-point numbers processed by the target chip are reduced; at the same time, the data loss problem caused by the normalized processing can be alleviated, and the The precision of the target processing result.
- the device further includes: an arithmetic operator connected to the adder and the selector respectively; the arithmetic operator includes a subtractor and a shifter bit device; the subtractor is used to determine the target difference between the initial exponent and the target exponent of each of the extended floating-point numbers; wherein, the target exponent is based on the initial exponent of the plurality of extended floating-point numbers The exponent is determined; the shifter is used to align the initial exponent of the extended floating-point number to the target index for each of the extended floating-point numbers, and based on the target difference corresponding to the extended floating-point number , right-shifting the mantissa of the expanded floating-point number to obtain a processed floating-point number, and input the processed floating-point number to the adder; The mantissas of the processed floating-point numbers respectively obtained by the floating-point numbers are accumulated to obtain the target floating-point number.
- the selector after extending the sign bit of each of the acquired multiple floating-point numbers to be processed to the target bit width, obtains multiple extended floating-point numbers In point numbers, it is used to: select two floating-point numbers to be processed from the plurality of floating-point numbers to be processed, and extend the sign bits of the two floating-point numbers to the target bit width to obtain two expanded floating-point number; the subtractor is used to use the initial index of the first floating-point number in the two expanded floating-point numbers as the target index; determine the target index and the second of the two expanded floating-point numbers A first difference of the initial exponent of the floating point number; wherein, the initial exponent of the first floating point number is greater than the initial exponent of the second floating point number; the shifter is used to align the initial exponent of the second floating point number to the target index, and based on the first difference, the mantissa of the second floating point number is shifted to the right to obtain the processed second floating point number; the first floating point number and the processed The second floating-point numbers
- the device further includes: a first register, connected to the adder and the subtractor in the pair arithmetic unit respectively, and used to store the sum obtained by the adder and The input intermediate floating-point number and the target floating-point number sent by the adder, and send the intermediate floating-point number to the subtractor.
- the device further includes: a second register, connected to the subtractor, for storing the target index, and sending the target index to the the subtractor.
- the selector is further configured to: select a floating point number to be processed from unselected floating point numbers to be processed, and extend the sign bit of the selected floating point number to the The target bit width is obtained to obtain the extended floating-point number corresponding to the selected floating-point number to be processed; in response to the initial exponent of the extended floating-point number corresponding to the selected floating-point number to be processed is greater than the target exponent stored in the second register, the The initial exponent of the extended floating-point number corresponding to the floating-point number to be processed is selected as a new target index, and the second register is updated by using the new target index; wherein, the second register is also used to set the The new target index is sent to the subtractor; the subtractor is used to determine a second difference between the index of the intermediate floating-point number and the target index based on the received new target index; the shift The device is used to align the exponent of the intermediate floating-point number to the target exponent, and based on the second difference, right-shift the mantiss
- the comparator when performing normalization processing on the target floating-point number to obtain the target processing result, is configured to: use one of a shifting method, a truncation method and a rounding method In one or more ways, the target floating-point number is normalized to obtain the target processing result.
- the target bit width is determined based on an initial bit width of an initial mantissa included in the multiple floating-point numbers to be processed and a total number of the multiple floating-point numbers to be processed.
- the present disclosure provides a floating-point number processing method, including: obtaining a plurality of floating-point numbers to be processed in the target chip; The sign bit of the point number is extended to the target bit width to obtain a plurality of extended floating-point numbers; wherein, the target bit width matches the total number of floating-point numbers to be processed; The floating-point numbers are accumulated to obtain the target floating-point number.
- the sign bit of each floating-point number to be processed can be extended to the target bit width, and multiple extended Floating-point numbers, which realize the expansion of the bit width of floating-point numbers to be processed, so that in the process of accumulating multiple expanded floating-point numbers in the target chip, there is no need to normalize the intermediate floating-point numbers obtained during the accumulation process, reducing
- the number of normalized processing is reduced, and the delay and power consumption of the accumulation process of multiple extended floating-point numbers processed by the target chip are reduced; at the same time, after the number of normalized processing is reduced, the data loss problem caused by normalized processing can be alleviated. Improved precision of target floating point numbers.
- the method further includes: performing normalization processing on the target floating-point number to obtain a target processing result, wherein the format of the target processing result is the same as match the default format.
- the target floating-point number can be normalized once after accumulating to obtain the target floating-point number
- the target processing result is obtained, the number of normalized processing is reduced, and the delay and power consumption of the accumulation process of multiple floating-point numbers processed by the target chip are reduced; at the same time, the data loss problem caused by the normalized processing can be alleviated, and the The precision of the target processing result.
- the target bit width is determined according to the following steps: based on the initial bit width of the initial mantissa included in the multiple floating-point numbers to be processed, determine the corresponding Adjusting the bit width; determining the target bit width based on the adjusting bit width and the total number of floating point numbers to be processed.
- the target bit width is determined more accurately, and then the sign bit of the floating point number to be processed is extended to the target bit width, and after obtaining multiple extended floating point numbers,
- the bit width of the expanded floating-point number can meet the bit-width requirement of the accumulation process, and thus the intermediate floating-point number obtained during the accumulation process does not need to be normalized.
- extending the sign bit of each of the floating-point numbers to be processed to a target bit width to obtain a plurality of extended floating-point numbers includes: Selecting two floating-point numbers to be processed from the plurality of floating-point numbers to be processed, and extending the sign bits of the two floating-point numbers to the target bit width to obtain two extended floating-point numbers;
- the multiple expanded floating-point numbers are accumulated and processed to obtain the target floating-point number, including: using the two expanded floating-point numbers as two current floating-point numbers, and using the two expanded floating-point numbers in the target chip
- the current floating-point numbers are added and processed to obtain an intermediate floating-point number; a floating-point number to be processed is selected from the unselected floating-point numbers to be processed, and the sign bit of the selected floating-point number to be processed is extended to the target bit width.
- multiple floating-point numbers to be processed can be accumulated multiple times to obtain the target floating-point number, and there is no need to normalize the generated intermediate floating-point numbers during the accumulation process, which alleviates the problem caused by normalizing the intermediate floating-point numbers.
- the problem of data loss guarantees the precision of the intermediate floating-point numbers, which in turn makes the precision of the obtained target floating-point numbers higher.
- the adding the two current floating-point numbers in the target chip to obtain an intermediate floating-point number includes: adding the two current floating-point numbers in the target chip The initial exponent of the first floating-point number in the number is aligned to the initial exponent of the second floating-point number, and the mantissa of the first floating-point number is shifted to the right by the target digit to obtain the first floating-point number after order processing; wherein, The initial exponent of the first floating point number in the two floating point numbers is smaller than the initial exponent of the second floating point number; the target number of digits is the initial exponent of the second floating point number and the The difference between the initial exponents; in the target chip, the first floating-point number after the order processing and the second floating-point number are summed to obtain the intermediate floating-point number.
- the performing normalization processing on the target floating-point number to obtain the target processing result includes: using one or more of a shifting method, a truncation method and a rounding method, Perform normalization processing on the target floating-point number to obtain the target processing result.
- one or more of shifting, truncation and rounding methods can be used to flexibly normalize the target floating-point number to obtain the target processing result.
- the present disclosure provides a chip, including: a memory for storing a plurality of floating-point numbers to be processed; the floating-point number processing device as described in the first aspect or any implementation mode above, for processing The plurality of floating-point numbers to be processed are processed to obtain a target floating-point number.
- the present disclosure provides a floating-point number processing device, including: an acquisition module, used to acquire a plurality of floating-point numbers to be processed in the target chip; an expansion module, used to convert the plurality of floating-point numbers to be processed The sign bit of each floating-point number to be processed in the number is extended to a target bit width to obtain a plurality of extended floating-point numbers; wherein, the target bit width matches the total number of floating-point numbers to be processed; the first processing A module, configured to perform accumulation processing on the plurality of extended floating-point numbers in the target chip to obtain a target floating-point number.
- the device further includes: a second processing module, configured to perform normalization processing on the target floating-point number to obtain a target processing result, wherein the The format of the target processing result matches the preset format.
- the expansion module is configured to determine the target bit width according to the following steps: determine the plurality of floating point numbers to be processed based on the initial bit width of the initial mantissa included in the plurality of floating point numbers to be processed A corresponding adjustment bit width: determining the target bit width based on the adjustment bit width and the total number of floating-point numbers to be processed.
- the extension module extends the sign bit of each of the floating-point numbers to be processed to a target bit width to obtain a plurality of extended floating-point numbers
- the first processing module is used to: use the two extended floating-point numbers as the two current floating-point numbers when accumulating the multiple extended floating-point numbers in the target chip to obtain the target floating-point number number of points, in the target chip, the two current floating-point numbers are added and processed to obtain an intermediate floating-point number; a floating-point number to be processed is selected from unselected floating-point numbers to be processed, and the selected floating-point number is selected to be processed
- the sign bit of the floating-point number is extended to the target bit width, and the extended floating-point number corresponding to the selected floating-point number to be processed is obtained; the
- the first processing module is configured to add the two current floating-point numbers in the target chip to obtain an intermediate floating-point number: in the target chip Aligning the initial exponent of the first floating-point number in the two current floating-point numbers to the initial exponent of the second floating-point number, and shifting the mantissa of the first floating-point number to the right by the target digit to obtain the order-processed first A floating-point number; wherein, the initial exponent of the first floating-point number in the two floating-point numbers is smaller than the initial exponent of the second floating-point number; the target number of digits is the initial exponent of the second floating-point number and The difference between the initial exponents of the first floating-point number; in the target chip, the first floating-point number after the order processing and the second floating-point number are summed to obtain the intermediate floating-point number points.
- the second processing module when the second processing module performs normalization processing on the target floating-point number to obtain the target processing result, it is configured to: use the shift mode, the truncation mode and the rounding mode In one or more ways, the target floating-point number is normalized to obtain the target processing result.
- the present disclosure provides an electronic device, including: a processor, a memory, and a bus, the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the The memory communicates with each other through a bus, and when the machine-readable instructions are executed by the processor, the steps of the floating-point number processing method described in the second aspect or any implementation manner are implemented.
- the present disclosure provides an electronic device, including the chip as described in the third aspect.
- the present disclosure provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the floating program described in the second aspect or any implementation mode above is executed. Steps in the point processing method.
- FIG. 1 shows a schematic flowchart of a floating-point number processing method provided by an embodiment of the present disclosure
- FIG. 2 shows a schematic structural diagram of a floating-point number processing device provided by an embodiment of the present disclosure
- FIG. 3 shows a schematic structural diagram of another floating-point number processing device provided by an embodiment of the present disclosure
- FIG. 4 shows a schematic structural diagram of a chip provided by an embodiment of the present disclosure
- FIG. 5 shows a schematic structural diagram of a floating-point number processing device provided by an embodiment of the present disclosure
- Fig. 6 shows a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
- processors are becoming more powerful and more complex in structure.
- the floating-point calculation is a kind of calculation in the processor with many calculation steps, large delay and high power consumption, which has a great impact on the performance index of the processor.
- Accumulation is a common floating-point arithmetic method.
- two floating-point numbers can be accumulated first to obtain an intermediate result, and the intermediate result can be normalized; then the normalized intermediate result can be compared with the next floating-point number Accumulate until the end of the accumulation operation to obtain the target result.
- the method of normalizing the intermediate result after each accumulation results in relatively large power consumption and delay of the processor performing the floating-point accumulation operation.
- the accuracy of the intermediate results after normalization processing will be reduced, and then when the target result is obtained through multiple accumulation operations, the accuracy of the target result is low. .
- an embodiment of the present disclosure provides a method for processing floating point numbers.
- the execution subject of the floating-point number processing method provided by the embodiments of the present disclosure is generally a chip with certain computing capabilities, such as the chip can be a processor, and the processor can include a central processing unit (central processing unit, CPU), a graphics processor (graphics processing unit, GPU), tensor processing unit (Tensor Processing Unit, TPU), embedded neural network processor (Neural-network Processing Unit, NPU), etc.
- the method for processing floating-point numbers may be implemented in a manner in which a processor invokes computer-readable instructions stored in a memory.
- FIG. 1 is a schematic flowchart of a floating-point number processing method provided by an embodiment of the present disclosure, the method includes S101-S103.
- the sign bit of each floating-point number to be processed can be extended to the target bit width, and multiple extended Floating-point numbers, which realize the expansion of the bit width of floating-point numbers to be processed, so that in the process of accumulating multiple expanded floating-point numbers in the target chip, there is no need to normalize the intermediate floating-point numbers obtained during the accumulation process, reducing
- the number of normalized processing is reduced, and the delay and power consumption of the accumulation process of multiple extended floating-point numbers processed by the target chip are reduced; at the same time, after the number of normalized processing is reduced, the data loss problem caused by normalized processing can be alleviated. Improved precision of target floating point numbers.
- the target chip may be any chip that needs to perform floating-point calculations, for example, the target chip may be a CPU, GPU, NPU, or the like.
- Floating-point numbers generally include a sign bit, a mantissa, and an exponent.
- bit width of the mantissa including the sign bit of the floating-point number 1 is 12, and the bit width of the mantissa including the sign bit of the floating-point number 2 is 13, then the bit width of the sum of the floating-point number 1 and the floating-point number 2 may be 14 .
- the sign bit of each floating-point number to be processed can be extended.
- the extended bit width may be the target bit width.
- the target bit width may be a bit width value set by the user, and the target bit width is greater than the initial bit width corresponding to the mantissa of any floating-point number to be processed.
- the target bit width may also be determined according to the initial bit width corresponding to the mantissa of each floating point number to be processed and the total number of floating point numbers to be processed.
- the target bit width can be determined, and the sign bit of each floating-point number to be processed is extended to the target bit width to obtain the extended floating-point number.
- the target bit width is determined according to the following steps: based on the initial bit width of the initial mantissa included in the multiple floating-point numbers to be processed, determine the corresponding Adjusting the bit width; determining the target bit width based on the adjusting bit width and the total number of floating point numbers to be processed.
- the initial bit width of the initial mantissa of each floating-point number to be processed may be determined, and the adjusted bit width may be determined based on the initial bit widths of multiple initial mantissas.
- the adjusted bit width may be the maximum value among multiple initial bit widths, or any integer greater than the maximum value. The following takes the adjustment of the bit width as the maximum bit width among multiple initial bit widths as an example for illustration.
- the number of floating-point numbers to be processed is 5, determine the maximum bit-width among the initial bit-widths of the 5 initial mantissas, and determine the maximum bit-width as the adjusted bit-width;
- the total number of the target bit width is determined; that is, on the basis of the maximum bit width, according to the total number of floating-point numbers to be processed and the base of the floating-point numbers to be processed, the overflow digits of the sum value are determined, and then according to the overflow digits and Maximum bit width, determine the target bit width.
- the target bit width is determined more accurately, and then the sign bit of the floating point number to be processed is extended to the target bit width, and after obtaining multiple extended floating point numbers,
- the bit width of the expanded floating-point number can meet the bit-width requirement of the accumulation process, and thus the intermediate floating-point number obtained during the accumulation process does not need to be normalized.
- the order processing may include: determining the target index corresponding to a plurality of extended floating-point numbers, for example, the target index may be the maximum index among the initial exponents respectively corresponding to a plurality of extended floating-point numbers, and each extended floating-point number The initial exponent of the point number is aligned to the target exponent, and the mantissa of the extended floating point number is shifted to the right by x bits to obtain the extended floating point number after order processing.
- x is a positive integer
- the value of x is the difference between the target exponent and the initial exponent of the expanded floating-point number.
- two expanded floating-point numbers among multiple expanded floating-point numbers can also be accumulated and processed first, and the obtained intermediate floating-point number and the next expanded floating-point number can be accumulated and processed until each expanded floating-point number is are accumulated to obtain the target floating-point number.
- the sign bit of each of the floating-point numbers to be processed is extended to the target bit width to obtain a plurality of extended floating-point numbers , may include: selecting two floating-point numbers to be processed from the plurality of floating-point numbers to be processed, and extending the sign bits of the two floating-point numbers to the target bit width to obtain two extended floating-point numbers .
- two floating-point numbers to be processed can be randomly selected from multiple floating-point numbers to be processed, or the processing order of multiple floating-point numbers to be processed can be set, and two floating-point numbers to be processed are selected according to the processing order; then the selected The sign bits of the two floating-point numbers to be processed are extended to the target bit width, and two extended floating-point numbers are obtained.
- S103 may include:
- the two extended floating-point numbers may be used as two current floating-point numbers, and the two current floating-point numbers are summed in the target chip to obtain an intermediate floating-point number.
- the adding the two current floating-point numbers in the target chip to obtain an intermediate floating-point number may include:
- Step A1 aligning the initial exponent of the first floating-point number in the two current floating-point numbers to the initial exponent of the second floating-point number in the target chip, and shifting the mantissa of the first floating-point number to the right by the target bit number, to obtain the first floating-point number after order processing; wherein, the initial index of the first floating-point number in the two floating-point numbers is smaller than the initial index of the second floating-point number; the target number of digits is the the difference between the initial exponent of the second floating point number and the initial exponent of the first floating point number;
- Step A2 Adding the first floating-point number and the second floating-point number after the pairwise processing in the target chip to obtain an intermediate floating-point number.
- the first floating point number may be a floating point number with a smaller initial exponent among the two current floating point numbers; the second floating point number may be a floating point number with a larger initial exponent among the two current floating point numbers.
- the first floating-point number can be processed first to obtain the first floating-point number after the order processing, so that the exponent of the first floating-point number after the order processing is the same as the second The initial exponents of floating-point numbers are consistent.
- the process of order processing of the first floating-point number may include: aligning the initial exponent of the first floating-point number to the initial exponent of the second floating-point number in the target chip, and shifting the initial mantissa of the first floating-point number to the right by the target digit,
- the target number of digits is the difference between the initial exponent of the second floating point number and the initial exponent of the first floating point number.
- the initial exponent of the first floating-point number is 10 and the initial exponent of the second floating-point number is 15, align the initial exponent of the first floating-point number to 15, and shift the initial mantissa of the first floating-point number to the right by 5 bits,
- the first floating-point number after the order processing is obtained, that is, the exponent of the first floating-point number after the order processing is 15.
- the mantissa of the first floating-point number after the stage processing and the initial mantissa of the second floating-point number are summed to obtain an intermediate floating-point number.
- a floating-point number to be processed can be selected from unselected floating-point numbers to be processed, and the selected floating-point number to be processed can be a randomly selected floating-point number to be processed, or can be Process the floating-point numbers selected in sequence; then extend the sign bit of the selected floating-point numbers to the target bit width to obtain the extended floating-point numbers corresponding to the selected floating-point numbers.
- the extended floating-point number and the intermediate floating-point number corresponding to the selected floating-point number to be processed can be used as the updated two current floating-point numbers, and the step is returned to S1031 until each of the multiple floating-point numbers to be processed Until the floating-point numbers to be processed have been summed.
- the intermediate floating-point number obtained after the last summing process may be used as the target floating-point number.
- multiple floating-point numbers to be processed can be accumulated multiple times to obtain the target floating-point number. Since the sign bit of each floating-point number to be processed is extended to the target bit width before the floating-point number to be processed is accumulated, the accumulated The mantissa bit width of the intermediate floating-point numbers obtained in the process will not exceed the target bit width, so there is no need to normalize the generated intermediate floating-point numbers during the accumulation process, which alleviates the data loss caused by normalizing the intermediate floating-point numbers.
- the loss problem guarantees the precision of the intermediate floating-point number, which in turn makes the precision of the obtained target floating-point number higher.
- the method further includes: performing normalization processing on the target floating-point number to obtain a target processing result, wherein the format of the target processing result is the same as match the default format.
- the target floating-point number can be normalized once after accumulating to obtain the target floating-point number
- the target processing result is obtained, the number of normalized processing is reduced, and the delay and power consumption of the accumulation process of multiple floating-point numbers processed by the target chip are reduced; at the same time, the data loss problem caused by the normalized processing can be alleviated, and the The precision of the target processing result.
- the floating-point numbers are stored in a normalized form in the target chip. Therefore, after accumulating multiple floating-point numbers to be processed to obtain the target floating-point number, the The obtained target floating-point number is normalized to obtain a target processing result, and the format of the target processing result matches the preset format.
- the preset format may be determined based on a set floating-point number standard.
- the normalization processing of the target floating-point number to obtain the target processing result may include: using one or more of a shifting method, a truncation method and a rounding method , performing normalization processing on the target floating-point number to obtain a target processing result.
- one or more of the shifting, truncation and rounding methods can be used to normalize the target floating-point number to obtain the target processing result.
- the shifting method may include left shifting, right shifting, etc.; the truncation method may be a method of deleting data exceeding a certain number of digits.
- the target processing result may be a normalized floating point number.
- one or more of shifting, truncation and rounding methods can be used to flexibly normalize the target floating-point number to obtain the target processing result.
- the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
- the specific execution order of each step should be based on its function and possible
- the inner logic is OK.
- the embodiment of the present disclosure also provides a floating-point number processing device.
- FIG. 2 which is a schematic structural diagram of a floating-point number processing device provided by an embodiment of the present disclosure
- the floating-point number processing device includes a selector 201 and an adder 202 ; wherein the adder 202 is connected to the selector 201 .
- the selector 201 is used to extend the sign bit of each of the obtained multiple floating-point numbers to be processed to a target bit width to obtain multiple extended floating-point numbers; wherein, the target bit Width matches the total number of pending floats in question.
- the adder 202 is used for accumulating the multiple extended floating-point numbers to obtain a target floating-point number.
- a selector can be used to extend the sign bit of each floating-point number to be processed to the target bit width, and multiple extended floating-point numbers can be obtained. points, which realizes the expansion of the bit width of the floating-point numbers to be processed, and then makes it unnecessary to normalize the intermediate floating-point numbers obtained during the accumulation process during the accumulation process of multiple expanded floating-point numbers, reducing the normalization process.
- the number of times reduces the delay and power consumption of the chip to process the accumulation process of multiple extended floating-point numbers; at the same time, after reducing the number of normalized processing, it can alleviate the data loss problem caused by normalized processing and improve the accuracy of the target floating-point number. precision.
- the device further includes a comparator 203; the comparator 203 is connected to the adder 202; the adder 202 is also used to float the target The points are input to the comparator; the comparator 203 is used to normalize the target floating point number to obtain a target processing result, wherein the format of the target processing result matches a preset format.
- the target floating-point number can be normalized once after accumulating to obtain the target floating-point number
- the target processing result is obtained, the number of normalized processing is reduced, and the delay and power consumption of the accumulation process of multiple floating-point numbers processed by the target chip are reduced; at the same time, the data loss problem caused by the normalized processing can be alleviated, and the The precision of the target processing result.
- the device further includes an arithmetic unit 204 .
- the pair arithmetic unit 204 is connected to the adder 202 and the selector 201 respectively; the pair arithmetic unit includes a subtractor 241 and a shifter 242 .
- the subtractor 241 is used to determine the target difference between the initial exponent and the target exponent of each extended floating point number in the plurality of extended floating point numbers, and the target exponent is based on a plurality of extended floating point numbers
- the initial index of the point number is determined;
- the shifter 242 is used for aligning the initial index of the extended floating point number to the target index for each of the extended floating point numbers, and based on the extended floating point number
- the adder 202 is used to add the The mantissas of multiple processed floating-point numbers are accumulated to obtain the target floating-point number.
- the selector 201 expands the sign bit of each of the obtained multiple floating-point numbers to be processed to the target bit width to obtain multiple extended floating-point numbers
- it is used to: select two floating-point numbers to be processed from the plurality of floating-point numbers to be processed, and extend the sign bits of the two floating-point numbers to be processed to the target bit width to obtain two extended floating-point numbers;
- the subtractor 241 is used to use the initial index of the first floating-point number in the two extended floating-point numbers as the target index; determine the target index and the second floating-point number in the two extended floating-point numbers The first difference of the initial exponent of the point number; wherein, the initial exponent of the first floating point number is greater than the initial exponent of the second floating point number;
- the shifter 242 is used to shift the initial exponent of the second floating point number Aligning to the target index, and based on the first difference, shifting the mantissa of the second floating point number to the right to obtain a processed second floating point number;
- the device further includes a first register 205 .
- the first register 205 is respectively connected to the adder 202 and the subtractor 241 of the pair-order operator; the adder 202 is used to input the obtained intermediate floating-point number to the first register 205; The first register 205 is used to store the intermediate floating point number and the target floating point number sent by the adder, and send the intermediate floating point number to the subtractor 241 .
- the device further includes a second register 206 .
- the second register 206 is connected to the subtractor 241; the second register 206 is used to store a target index and send the target index to the subtractor 241 in the pair arithmetic unit.
- the selector 201 is further configured to: select a floating-point number to be processed from unselected floating-point numbers to be processed, and extend the sign bit of the selected floating-point number to the target bit width, to obtain the extended floating-point number corresponding to the selected floating-point number to be processed; in response to the initial index of the extended floating-point number corresponding to the selected floating-point number to be processed is greater than the target index stored in the second register, the selected The initial exponent of the extended floating-point number corresponding to the floating-point number to be processed is used as a new target index, and the second register is updated using the new target index; the second register 206 is also used to use the new target index Send to the subtractor;
- the subtractor 241 is used for determining the second difference between the index of the intermediate floating-point number and the target index based on the received new target index;
- the shifter 242 is used for aligning the exponent of the intermediate floating-point number to the target exponent, and based on the second difference, right-shifting the man
- the comparator 203 when performing normalization processing on the target floating-point number to obtain the target processing result, is configured to: use the shift mode, truncation mode and rounding mode In one or more ways, the target floating-point number is normalized to obtain a target processing result.
- the target bit width is determined based on an initial bit width of an initial mantissa included in the multiple floating-point numbers to be processed and a total number of the multiple floating-point numbers to be processed.
- bit width of the adder and the first register is at least the target bit width.
- the bit width of the second register can be the maximum value in the exponent bit width of the initial index included in the plurality of floating-point numbers to be processed; that is, the index of the initial index of each floating-point number to be processed in the plurality of floating-point numbers to be processed can be determined bit width, and determine the maximum value among the multiple exponent bit widths as the bit width of the second register.
- the method for processing floating-point numbers proposed in the above-mentioned embodiment is exemplarily described. Assuming that the plurality of floating-point numbers to be processed includes a1, a2, a3, a4, and a5, the floating-point number processing method may include the following steps.
- Step 1 Input the two floating-point numbers (a1 and a2) to be accumulated into the selector, and the selector expands the sign bits of the two floating-point numbers to the target bit width to obtain two extended floating-point numbers , and input the two extended floating-point numbers to the pair operator.
- Step 2 the order operator performs order processing on the two extended floating-point numbers to obtain two extended floating-point numbers aligned with the exponents, and input the two extended floating-point numbers aligned with the exponents into the adder;
- the largest exponent among the initial exponents included in the extended floating-point numbers is used as the target index, and the target index is stored in the second register.
- the subtractor in the order operator determines the target difference between the initial exponent of the first floating-point number and the target exponent; the shifter can align the initial exponent of the first floating-point number to the target exponent, and shift the first The mantissa of the floating-point number is shifted to the right by the target digit, and the first floating-point number after order processing is obtained.
- the exponents of the first floating-point number and the second floating-point number after the order processing are consistent.
- the initial exponent of the first floating-point number is smaller than the initial exponent of the second floating-point number; target difference between .
- the initial exponent of the second floating point number may be stored in the second register as the target exponent.
- Step 3 The adder performs a sum operation on the mantissas of the two extended floating-point numbers whose exponents are aligned to obtain an intermediate floating-point number, and stores the intermediate floating-point number in the first register.
- Step 4 Input the floating-point number a3 to be processed into the selector, and the selector expands the sign bit of the floating-point number a3 to be processed to the target bit width to obtain the expanded floating-point number, and input the expanded floating-point number to the pair operator ; and the first register inputs the intermediate floating-point number to the arithmetic unit.
- Step 5 The order arithmetic unit performs order processing on the extended floating-point number corresponding to the floating-point number a3 to be processed and the intermediate floating-point number to obtain two extended floating-point numbers aligned with exponents, and input the two extended floating-point numbers aligned with exponents into the adder.
- the exponent of the intermediate floating-point number aligns the initial exponent of the extended floating-point number to the exponent of the intermediate floating-point number, and shifts the mantissa of the extended floating-point number to the right by the target digit (that is, the difference between the intermediate floating-point number and the exponent of the extended floating-point number difference), to obtain the extended floating-point number after the order processing.
- the exponents of the extended floating-point number and the intermediate floating-point number after the order processing are the same.
- the initial exponent of the extended floating-point number is greater than the exponent of the intermediate floating-point number, then the initial exponent of the intermediate floating-point number is aligned to the exponent of the extended floating-point number, and the mantissa of the intermediate floating-point number is shifted to the right by the target digit (that is, after the expansion The difference between the exponent of the floating-point number and the intermediate floating-point number) to obtain the intermediate floating-point number after the order processing.
- the intermediate floating-point number and the extended floating-point number after the order processing are two extended floating-point numbers whose indices are aligned.
- the adder directly adds the mantissa of the extended floating-point number and the mantissa of the intermediate floating-point number to obtain the intermediate floating-point number without performing the order processing.
- Step 6 When the initial exponent in the extended floating-point number corresponding to the floating-point number a3 to be processed is greater than the index of the intermediate floating-point number, the initial exponent in the extended floating-point number can be used as the updated target index, and the updated target The exponent is updated to the second register.
- Step 7 The adder sums the mantissas of the two expanded floating-point numbers whose exponents are aligned to obtain an intermediate floating-point number, and stores the intermediate floating-point number in the first register.
- Step eight after obtaining the target floating-point number, the first register can input the target floating-point number to the comparator.
- the comparator normalizes the target floating-point number to obtain a target processing result, wherein the format of the target processing result matches a preset format.
- the chip includes: a floating-point number processing device 401 and a memory 402 described in any one of the above-mentioned implementation manners.
- the memory 402 is used for storing a plurality of floating-point numbers to be processed; the floating-point number processing device 401 is used for processing the plurality of floating-point numbers to be processed to obtain a target floating-point number.
- the embodiment of the present disclosure also provides a floating-point number processing device.
- FIG. 5 it is a schematic structural diagram of a floating-point number processing device provided by an embodiment of the present disclosure.
- the floating-point number processing device includes an acquisition module 501 , an extension module 502 and a first processing module 503 .
- the obtaining module 501 is used for obtaining a plurality of floating-point numbers to be processed in the target chip.
- the extension module 502 is configured to extend the sign bit of each of the floating-point numbers to be processed to a target bit width to obtain a plurality of extended floating-point numbers; wherein, the target bit width and the Describes the total number of floating-point numbers to match.
- the first processing module 503 is configured to perform accumulation processing on the plurality of extended floating-point numbers in the target chip to obtain a target floating-point number.
- the device further includes: a second processing module 504, configured to perform normalization processing on the target floating-point number to obtain a target processing result, wherein, The format of the target processing result matches the preset format.
- the expansion module 502 is configured to determine the target bit width according to the following steps: based on the initial bit width of the initial mantissa included in the multiple floating-point numbers to be processed, determine the An adjustment bit width corresponding to the point number; based on the adjustment bit width and the total number of floating point numbers to be processed, the target bit width is determined.
- the extension module 502 after extending the sign bit of each of the floating-point numbers to be processed to the target bit width, obtains a plurality of extended floating-point numbers In point number, it is used to: select two floating-point numbers to be processed from a plurality of floating-point numbers to be processed, and expand the sign bits of the two floating-point numbers to be processed to the target bit width to obtain two extended floating-point numbers;
- the first processing module 503 is configured to: use the two expanded floating-point numbers as two current floating-point numbers when performing cumulative processing on the multiple expanded floating-point numbers in the target chip to obtain the target floating-point number, In the target chip, the two current floating-point numbers are summed to obtain an intermediate floating-point number; a floating-point number to be processed is selected from unselected floating-point numbers to be processed, and the selected floating-point number to be processed is selected The sign bit of the selected floating-point number is extended to the target bit width to obtain the extended floating-point number corresponding to the selected floating-point number to be processed;
- the first processing module 503 is configured to add the two current floating-point numbers in the target chip to obtain an intermediate floating-point number: Align the initial exponent of the first floating-point number in the two current floating-point numbers to the initial exponent of the second floating-point number, and shift the mantissa of the first floating-point number to the right by the target digit to obtain A first floating-point number; wherein, the initial exponent of the first floating-point number in the two floating-point numbers is smaller than the initial exponent of the second floating-point number; the target number of digits is the initial exponent of the second floating-point number and the difference between the initial exponent of the first floating-point number; in the target chip, the first floating-point number after the order processing and the second floating-point number are summed to obtain an intermediate floating-point number .
- the second processing module 504 when performing normalization processing on the target floating-point number to obtain the target processing result, is configured to: use a shifting method, a truncation method and a rounding method In one or more ways, the target floating-point number is normalized to obtain the target processing result.
- the functions of the device provided by the embodiments of the present disclosure or the included templates can be used to execute the methods described in the above method embodiments, and its specific implementation can refer to the description of the above method embodiments. For brevity, here No longer.
- an embodiment of the present disclosure also provides an electronic device.
- the electronic device includes a processor 601 , a memory 602 and a bus 603 .
- the memory 602 is used to store execution instructions, including a memory 6021 and an external memory 6022 .
- the memory 6021 here is also called the internal memory, which is used to temporarily store the calculation data in the processor 601 and the data exchanged with the external memory 6022 such as the hard disk.
- the processor 601 exchanges data with the external memory 6022 through the memory 6021.
- the processor 601 communicates with the memory 602 through the bus 603, so that the processor 601 executes the following instructions:
- an embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the floating-point number processing method described in the above-mentioned method embodiments is executed. step.
- the storage medium may be a volatile or non-volatile computer-readable storage medium.
- the embodiment of the present disclosure also provides a computer program product, the computer program product carries a program code, and the instructions included in the program code can be used to execute the steps of the floating-point number processing method described in the above method embodiment.
- the computer program product carries a program code
- the instructions included in the program code can be used to execute the steps of the floating-point number processing method described in the above method embodiment.
- the above-mentioned computer program product may be specifically implemented by means of hardware, software or a combination thereof.
- the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
- a software development kit Software Development Kit, SDK
- the device described above and the specific working process of the device can refer to the corresponding process in the foregoing method embodiment, and details are not repeated here.
- the disclosed devices, devices and methods can be implemented in other ways.
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division.
- multiple units or components can be combined or It may be integrated into another device, or some features may be omitted, or not implemented.
- the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may also be distributed to multiple network units . Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor.
- the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure.
- the aforementioned storage medium includes various media that can store program codes such as U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Nonlinear Science (AREA)
- Complex Calculations (AREA)
- Semiconductor Memories (AREA)
Abstract
Description
Claims (14)
- 一种浮点数处理装置,其特征在于,所述装置包括:选择器,用于将获取到的多个待处理浮点数中的每个所述待处理浮点数的符号位扩展至目标位宽,得到多个扩展后浮点数;其中,所述目标位宽与所述待处理浮点数的总数量匹配;加法器,与所述选择器相连,用于将所述多个扩展后浮点数进行累加处理,得到目标浮点数。
- 根据权利要求1所述的装置,其特征在于,所述装置还包括:比较器,与所述加法器相连,用于对从所述加法器输入的所述目标浮点数进行规格化处理,得到目标处理结果,其中,所述目标处理结果的格式与预设格式相匹配。
- 根据权利要求1或2所述的装置,其特征在于,所述装置还包括对阶运算器,所述对阶运算器分别与所述加法器和所述选择器相连;所述对阶运算器包括:减法器,用于确定每个所述扩展后浮点数的初始指数与目标指数之间的目标差值;其中,所述目标指数为基于所述多个扩展后浮点数的初始指数确定的;移位器,用于针对每个所述扩展后浮点数,将所述扩展后浮点数的初始指数对齐至所述目标指数;基于所述扩展后浮点数对应的目标差值,对所述扩展后浮点数的尾数进行右移,得到处理后浮点数;并将所述处理后浮点数输入至所述加法器;其中,所述加法器用于将从所述多个扩展后浮点数分别得到的所述处理后浮点数的尾数进行累加处理,得到所述目标浮点数。
- 根据权利要求3所述的装置,其特征在于,所述选择器,在将获取到的多个待处理浮点数中的每个所述待处理浮点数的符号位扩展至目标位宽,得到多个扩展后浮点数时,用于:从所述多个待处理浮点数中选取两个待处理浮点数,并将所述两个待处理浮点数的符号位扩展至所述目标位宽,得到两个扩展后浮点数;所述减法器用于:将所述两个扩展后浮点数中的第一浮点数的初始指数作为所述目标指数;确定所述目标指数与所述两个扩展后浮点数中的第二浮点数的初始指数的第一差值;其中,所述第一浮点数的初始指数大于所述第二浮点数的初始指数;所述移位器用于:将所述第二浮点数的初始指数对齐至所述目标指数;基于所述第一差值,将所述第二浮点数的尾数进行右移,得到处理后的第二浮点数;将所述第一浮点数和所述处理后的第二浮点数输入至所述加法器;所述加法器用于:将所述第一浮点数和所述处理后的第二浮点数进行加法处理,得到中间浮点数。
- 根据权利要求4所述的装置,其特征在于,所述装置还包括:第一寄存器,分别与所述加法器和所述对阶运算器中的所述减法器相连,用于存储由所述加法器得到并输入的所述中间浮点数和所述加法器发送的目标浮点数,并将所述中间浮点数发送给所述减法器。
- 根据权利要求5所述的装置,其特征在于,所述装置还包括:第二寄存器,与所述减法器相连,用于存储所述目标指数,并将所述目标指数发送给所述对阶运算器中的所述减法器。
- 根据权利要求6所述的装置,其特征在于,所述选择器还用于:从未被选取的待处理浮点数中选取一个待处理浮点数,并将所选取的待处理浮点数的符号位扩展至所述目标位宽,得到所选取的待处理浮点数对应的扩展后浮点数;响应于所选取的待处理浮点数对应的扩展后浮点数的初始指数大于所述第二寄存器存储的目标指数,将所选取的待处理浮点数对应的扩展后浮点数的初始指数作为新的目标指数;利用所述新的目标指数对所述第二寄存器进行更新;其中,所述第二寄存器还用于将所述新的目标指数发送给所述减法器;所述减法器用于:基于接收到的新的目标指数,确定所述中间浮点数的指数与所述目标指数之间的第二差值;所述移位器用于:将所述中间浮点数的指数对齐至所述目标指数,并基于所述第二差值对所述中间浮点数的尾数进行右移,得到处理后中间浮点数;将所述处理后中间浮点数和所选取的待处理浮点数对应的扩展后浮点数发送给所述加法器;所述加法器用于:将所述中间浮点数的尾数和所选取的待处理浮点数对应的扩展后浮点数的尾数进行加法处理,得到新的中间浮点数,并将所述新的中间浮点数发送给所述第一寄存器;以及将最后一次加和处理后得到的中间浮点数作为所述目标浮点数,并将所述目标浮点数发送给所述第一寄存器。
- 根据权利要求2所述的装置,其特征在于,所述比较器,在对所述目标浮点数进行规格化处理,得到目标处理结果时,用于:利用移位方式、截尾方式和舍入方式中的一种或多种方式,对所述目标浮点数进行规格化处理,得到所述目标处理结果。
- 根据权利要求1至8任一项所述的装置,其特征在于,所述目标位宽为基于所述多个待处理浮点数包括的初始尾数的初始位宽和所述多个待处理浮点数的总数量确定的。
- 一种浮点数处理方法,其特征在于,包括:获取在目标芯片中进行运算的多个待处理浮点数;将所述多个待处理浮点数中的每个所述待处理浮点数的符号位扩展至目标位宽,得到多个扩展后浮点数;其中,所述目标位宽与所述待处理浮点数的总数量匹配;在所述目标芯片中将所述多个扩展后浮点数进行累加处理,得到目标浮点数。
- 一种芯片,其特征在于,包括:存储器,用于存储待运算的多个待处理浮点数;如权利要求1至9任一项所述的浮点数处理装置,用于对所述多个待处理浮点数进行处理,得到目标浮点数。
- 一种电子设备,其特征在于,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当所述电子设备运行时,所述处理器与所述存储器之间通过所述总线通信,所述机器可读指令被所述处理器执行时实现如权利要求10所述的浮点数处理方法的步骤。
- 一种电子设备,其特征在于,包括如权利要求11所述的芯片。
- 一种计算机可读存储介质,其特征在于,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如权利要求10所述的浮点数处理方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111667694.0A CN114296682B (zh) | 2021-12-31 | 2021-12-31 | 浮点数处理装置、方法、电子设备、存储介质及芯片 |
| CN202111667694.0 | 2021-12-31 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023124372A1 true WO2023124372A1 (zh) | 2023-07-06 |
Family
ID=80974349
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/124517 Ceased WO2023124372A1 (zh) | 2021-12-31 | 2022-10-11 | 浮点数处理装置、方法、电子设备、存储介质及芯片 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN114296682B (zh) |
| WO (1) | WO2023124372A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114296682B (zh) * | 2021-12-31 | 2024-11-22 | 上海阵量智能科技有限公司 | 浮点数处理装置、方法、电子设备、存储介质及芯片 |
| CN114968170B (zh) * | 2022-06-24 | 2024-05-14 | 北京百度网讯科技有限公司 | 浮点数的定和生成方法、相关装置及计算机程序产品 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180067721A1 (en) * | 2016-09-07 | 2018-03-08 | Arm Limited | Floating point addition with early shifting |
| CN108255777A (zh) * | 2018-01-19 | 2018-07-06 | 中国科学院电子学研究所 | 用于fpga的嵌入式浮点型dsp硬核结构 |
| CN114296682A (zh) * | 2021-12-31 | 2022-04-08 | 上海阵量智能科技有限公司 | 浮点数处理装置、方法、电子设备、存储介质及芯片 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9400635B1 (en) * | 2013-01-14 | 2016-07-26 | Altera Corporation | Methods and apparatus for performing dynamic data alignment for floating-point operations |
| US12079591B2 (en) * | 2020-04-07 | 2024-09-03 | Samsung Electronics Co., Ltd. | Neural network device, method of operating the neural network device, and application processor including the neural network device |
| CN113625990B (zh) * | 2021-07-16 | 2024-07-26 | 深圳云天励飞技术股份有限公司 | 浮点转定点装置、方法、电子设备及存储介质 |
-
2021
- 2021-12-31 CN CN202111667694.0A patent/CN114296682B/zh active Active
-
2022
- 2022-10-11 WO PCT/CN2022/124517 patent/WO2023124372A1/zh not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180067721A1 (en) * | 2016-09-07 | 2018-03-08 | Arm Limited | Floating point addition with early shifting |
| CN108255777A (zh) * | 2018-01-19 | 2018-07-06 | 中国科学院电子学研究所 | 用于fpga的嵌入式浮点型dsp硬核结构 |
| CN114296682A (zh) * | 2021-12-31 | 2022-04-08 | 上海阵量智能科技有限公司 | 浮点数处理装置、方法、电子设备、存储介质及芯片 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114296682A (zh) | 2022-04-08 |
| CN114296682B (zh) | 2024-11-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023124362A1 (zh) | 浮点数处理方法、装置、电子设备及存储介质 | |
| CN106502626A (zh) | 数据处理方法和装置 | |
| CN112204516A (zh) | 增强的低精度二进制浮点格式化 | |
| US10592208B2 (en) | Very low precision floating point representation for deep learning acceleration | |
| KR20080055985A (ko) | 선택가능 준정밀도를 가진 부동―소수점 프로세서 | |
| US20230305803A1 (en) | Method for Processing Floating Point Number and Related Device | |
| CN112835551B (zh) | 用于处理单元的数据处理方法、电子设备和计算机可读存储介质 | |
| US8037116B2 (en) | Method and system for optimizing floating point conversion between different bases | |
| CN106528050B (zh) | 尾随或前导数字预测器 | |
| CN114139693A (zh) | 神经网络模型的数据处理方法、介质和电子设备 | |
| CN115357216A (zh) | 数据处理方法、介质、电子设备和程序产品 | |
| WO2017185203A1 (zh) | 一种用于执行多个浮点数相加的装置及方法 | |
| US20210109709A1 (en) | Hybrid floating point representation for deep learning acceleration | |
| CN114296682B (zh) | 浮点数处理装置、方法、电子设备、存储介质及芯片 | |
| KR102758260B1 (ko) | 산술 및/또는 비트 유닛에 의한 조건문의 실행 | |
| US12039290B1 (en) | Multiply accumulate (MAC) unit with split accumulator | |
| US12293163B1 (en) | Split accumulator with a shared adder | |
| CN118550499A (zh) | 浮点加法运算装置及方法、电子装置和存储介质 | |
| CN118519608A (zh) | 浮点加法运算装置及方法、电子装置和存储介质 | |
| CN113377334B (zh) | 一种浮点数据处理方法、装置及存储介质 | |
| HK40062799A (zh) | 浮点数处理装置、方法、电子设备、存储介质及芯片 | |
| CN117370722A (zh) | 并行计算硬件中矩阵乘法运算的处理方法及相关设备 | |
| CN111313906A (zh) | 一种浮点数的转换电路 | |
| RU2276805C2 (ru) | Способ и устройство для выделения целой и дробных компонент из данных с плавающей точкой | |
| US12026478B1 (en) | Multiply accumulate (MAC) unit with split accumulator |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22913636 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22913636 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.12.2024) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22913636 Country of ref document: EP Kind code of ref document: A1 |