AI Computing Device Loop Body Instruction Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Artificial intelligence computing devices face inefficiencies due to large code amounts and repeated instructions in instruction sets, particularly in neural networks, which affect computation speed and storage requirements.
Innovation Solution
An artificial intelligence computing device with a controller unit that identifies loop bodies between instruction sets and executes instructions in the second set based on information from the first set, reducing code redundancy and improving computation efficiency by parallel execution and data transfer optimization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If all instructions in the instruction set are executed sequentially, then the computation is completed accurately, but the execution time increases significantly
Solution Approach 1:
The controller unit performs preliminary analysis of the instruction set to identify loop bodies and extract common sub-expressions before execution. By pre-processing the instruction set to recognize patterns and redundancies, the system prepares optimized execution paths that maintain computational accuracy while reducing execution time through selective instruction execution.
Solution Approach 2:
The controller unit serves multiple functions: it acts as both an instruction decoder and an optimizer by identifying loop structures, extracting common sub-expressions, and generating optimized execution sequences. This multi-functional approach allows the system to maintain accuracy while efficiently reducing execution time without requiring separate optimization hardware.
2Reliability
If repeated instructions are executed separately, then each instruction is processed correctly, but the code storage space increases significantly
Solution Approach 1:
Instead of storing duplicate instruction sequences for loop bodies, the system creates a single copy of the common sub-expression instructions and stores only a reference or pointer to this copy. The controller unit manages multiple references to the same instruction memory location, significantly reducing code storage space while ensuring each reference executes correctly through proper pointer management.
Solution Approach 2:
The controller unit merges repeated instructions into a single unified instruction sequence by identifying common sub-expressions across loop iterations. By combining duplicate instructions into one shared code segment and using control flow mechanisms to reference this merged code multiple times, the system reduces overall code storage requirements while maintaining execution correctness through proper control flow management.
3Manufacturing precision
If address space conversion is performed multiple times for large data loading, then data is transferred accurately, but the number of operations increases
Solution Approach 1:
The controller unit performs preliminary analysis of the data loading requirements to identify address space conversion patterns before actual data transfer. By pre-calculating conversion parameters and storing them for reuse, the system avoids repeated conversion operations during data loading, maintaining transfer accuracy while significantly improving loading efficiency through optimized address mapping.
Solution Approach 2:
The controller unit implements a universal address space management mechanism that handles multiple address conversion scenarios using a single optimized conversion routine. By creating a multi-functional address management system that can handle different address spaces through unified conversion logic rather than separate conversion code for each case, the system reduces the number of operations while ensuring accurate data transfer across different address spaces.
Data Source
AI summary
The invention provides an artificial intelligence computing device and a related product. The artificial intelligence computing device is used for executing machine learning computation. According to the device of the invention, for the instructions in the more than two instruction sets forming the loop body, the same operation code in the operation code storage area is used for the repeated instructions, so that the storage space of the operation code is saved, the code amount of each instruction in the instruction set in the second time slice can be reduced, the instruction storage space can also be saved, and the operation efficiency is improved.


