Floating-Point Precision Conversion With Dynamic Hybrid Rounding
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The conversion of high-precision floating-point data to low-precision data in neural network training introduces conversion errors, affecting training precision and increasing overheads in chip costs.
Innovation Solution
A method and apparatus for floating-point data precision conversion that uses hybrid rounding techniques, including stochastic rounding and truncation away from zero, to reduce conversion errors and improve efficiency when converting high-precision data to low-precision data.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If high-precision FP data is converted to low-precision FP data using conventional rounding methods, then data conversion efficiency is improved, but conversion error increases affecting training precision
Solution Approach 1:
The patent changes the rounding parameter by introducing a dynamically selected rounding mode (stochastic rounding or truncation away from zero) based on the exponent field value. This allows the system to adapt the rounding behavior to different data ranges, reducing conversion error while maintaining efficiency. The key is modifying the rounding operation parameter rather than the basic conversion process.
Solution Approach 2:
The patent implements dynamic rounding mode selection based on the exponent field value. When the exponent is large, stochastic rounding is used; when the exponent is small, truncation away from zero is used. This dynamic adaptation allows the system to optimize conversion accuracy for different data characteristics while maintaining high conversion efficiency.
2Loss of energy
If low-bit data is used for computation, then chip cost overhead is reduced, but conversion error from high-precision to low-precision data increases
Solution Approach 1:
The patent changes the precision parameter of the data representation by converting from high-precision FP data to low-precision FP data with optimized rounding. This allows the system to use lower precision data (reducing chip cost) while compensating for precision loss through intelligent rounding mode selection, thereby maintaining training precision.
Solution Approach 2:
The patent converts the potential harm of precision loss during conversion into a benefit by using stochastic rounding and truncation away from zero. These methods transform the rounding error from a harmful factor into a controlled statistical property that maintains expected values, thus reducing conversion error while enabling low-precision computation.
3Device complexity
If conventional rounding operation is used for precision conversion, then hardware complexity is reduced, but conversion error increases affecting model training
Solution Approach 1:
The patent changes the operational parameter by implementing different rounding modes (stochastic rounding and truncation away from zero) based on exponent values. This allows the system to maintain relatively simple hardware while improving conversion accuracy through parameter-based operation selection, thereby enhancing model training reliability without significantly increasing hardware complexity.
Data Source
AI summary
A floating-point data precision conversion method includes determining a bit width of a second mantissa field based on a coded value of a first exponent field. The floating-point data precision method further includes determining a reserved coded value and a discarded coded value in a first mantissa field. The floating-point data precision method further includes, if the coded value of the first exponent field is greater than or equal to a first preset threshold, performing a rounding operation on the reserved coded value based on a coded value that starts from a most significant bit and whose bit width is a preset bit width in the discarded coded value, to obtain a coded value of the second mantissa field.


