Accelerator Program Generation via State Machine Splicing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current programming models for accelerators are inefficient, leading to low hardware utilization and high programming burdens due to complex instruction sets and the need for manual optimization, especially when dealing with heterogeneous platforms and different application algorithms.
Innovation Solution
A method and system for generating an accelerator program using a state machine-based approach, where multiple state machines are configured to form a pipeline according to data dependencies in a directed acyclic graph, allowing for state machine splicing and concurrent execution of program blocks, thereby improving instruction-level parallelism and hardware performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Power
If a dedicated accelerator with complex instruction set is used to improve computing performance, then computing performance is improved, but programming complexity increases and manual optimization is required
Solution Approach 1:
The patent introduces a compilation system as an intermediary between high-level programming languages and accelerator instruction sets. The compiler translates high-level code into optimized accelerator programs automatically, eliminating the need for programmers to directly handle complex instruction sets while still achieving high computing performance on dedicated accelerators.
Solution Approach 2:
The patent replaces manual program optimization (mechanical human effort) with an automated compilation system. The compiler automatically performs instruction scheduling, resource allocation, and optimization tasks that previously required manual intervention, thereby reducing programming complexity while maintaining high computing performance.
2Productivity
If manual optimization is performed to achieve high hardware utilization, then hardware utilization is improved, but program development efficiency decreases
Solution Approach 1:
The patent enables the compilation system to automatically perform optimization tasks that previously required manual intervention. The compiler analyzes program dependencies, schedules instructions, and optimizes resource usage automatically, allowing the system to serve itself without human intervention while achieving high hardware utilization.
Solution Approach 2:
The patent changes the approach from manual parameter tuning to automated parameter optimization. The compilation system automatically adjusts scheduling parameters, resource allocation parameters, and optimization settings based on program characteristics, thereby achieving high hardware utilization without requiring programmers to spend time on manual tuning.
3Ease of operation
If a high-level programming model is used to reduce programming burden, then programming ease is improved, but hardware utilization decreases
Solution Approach 1:
The patent introduces a sophisticated compilation system as an intermediary that bridges the gap between high-level programming models and hardware utilization. The compiler translates high-level code while automatically performing optimizations, instruction scheduling, and resource management, thereby maintaining programming ease while achieving high hardware utilization through automated code generation.
Data Source
Figure 1
Figure 2
Figure 3~4
AI summary
A method for generating an accelerator program is disclosed, to help increase utilization of an accelerator and increase program development efficiency. In some feasible implementations of the present invention, the method includes: obtaining an accelerator program description that is based on a state machine, where the accelerator program description includes multiple state machines separately configured to implement an application program, and the multiple state machines form a pipeline according to a data dependency in a directed acyclic graph DAG corresponding to the application program; and performing state machine splicing on the state machines in the accelerator program description by using an accelerator compilation tool, to generate an accelerator program.