Mixed-Precision AI Calculation Circuit With Shared Arithmetic Units
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing AI processors face challenges in balancing calculation precision and speed due to the limitations of using a single data format, such as Int8, BF16, or FP32, which either prioritize precision or speed at the expense of the other.
Innovation Solution
A mixed-precision AI calculation circuit that includes floating-point multiplication and addition modules with selection units and a storage module, allowing it to switch between integer and floating-point formats, sharing common multiplication, addition, and comparison units to optimize for both precision and speed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If a single data format (Int8, BF16, or FP32) is used for AI calculation, then calculation speed can be maximized, but calculation precision deteriorates
Solution Approach 1:
The calculation circuit is designed to support multiple data formats (Int8, BF16, FP32) within a single hardware architecture. The circuit can dynamically switch between different precision modes, allowing it to function as both a high-speed Int8 calculator and a high-precision FP32 calculator, thereby resolving the contradiction between speed and precision by making the system universal rather than specialized for one format
Solution Approach 2:
The calculation circuit incorporates dynamic format switching capability, allowing it to adapt its precision and speed characteristics based on the specific computational requirements. The circuit can dynamically select between Int8 for speed-critical operations and FP32 for precision-critical operations, making the system's performance characteristics adjustable rather than fixed
2Measurement precision
If high-precision floating-point format (FP32) is used, then calculation precision is improved, but calculation speed deteriorates
Solution Approach 1:
The same calculation circuit hardware is designed to handle both low-precision Int8 operations and high-precision FP32 operations. By making the circuit universal, it can operate in FP32 mode when precision is critical and switch to Int8 mode when speed is critical, thereby resolving the speed-precision tradeoff through multi-functionality
3Reliability
If separate hardware circuits are designed for integer and floating-point operations, then calculation precision and speed requirements can be met, but hardware area increases
Solution Approach 1:
Instead of designing separate dedicated hardware circuits for Int8 and FP32 operations, the invention creates a universal calculation circuit that can perform both types of operations. This shared hardware architecture reduces the total hardware area while maintaining the ability to meet both precision and speed requirements through dynamic format switching
Solution Approach 2:
The invention merges the previously separate Int8 calculation circuit and FP32 calculation circuit into a single unified calculation circuit. By combining these functions into one hardware structure with shared resources, the total hardware area is reduced while preserving the functional capabilities needed for both integer and floating-point operations
Data Source
AI summary
An artificial intelligence (AI) calculation circuit is provided. The AI calculation circuit can support various integer and floating-point calculations through the adjustment of circuit configuration. Integer multiplication and floating-point mantissa multiplication share the multiplication unit, integer comparison and floating-point comparison share the same comparison unit, integer addition and floating-point addition share the same addition unit.


