TL;DR
This paper introduces Chimera, an automated tool that uses a hybrid machine learning approach to explore the vast design space of FPGA accelerators generated by High-Level Synthesis (HLS). Chimera significantly reduces the manual effort and expertise required to find optimal hardware designs by intelligently searching for Pareto-optimal solutions, achieving comparable or better performance than hand-tuned designs in under 24 hours.
What Problem Does This Paper Address?
Designing hardware accelerators on Field-Programmable Gate Arrays (FPGAs) offers a compelling blend of performance and flexibility. However, realizing this potential is hindered by the complexity of the design process. Traditionally, this involved low-level hardware description languages, which are time-consuming and error-prone for complex designs. High-Level Synthesis (HLS) tools aim to simplify this by allowing designers to use high-level languages like C/C++, but achieving optimal performance still demands extensive knowledge of HLS optimization directives and often requires significant manual tuning and experimentation. This manual exploration is not only tedious but also prone to missing optimal design points due to the intricate interactions between various optimization parameters. Furthermore, the HLS synthesis process itself can be time-consuming, making large-scale design space exploration (DSE) computationally prohibitive. The core problem Chimera addresses is the need for an automated, efficient, and intelligent DSE tool that can navigate this complex design space to discover high-performance FPGA accelerators with minimal human intervention.
Methods
Chimera employs a novel, multi-objective DSE approach that integrates several key techniques:
- Active Learning: Chimera uses machine learning (ML) models to predict the performance (latency) and resource utilization of different design configurations. Crucially, it uses these predictions to actively select the most informative design points to evaluate, thereby reducing the number of costly HLS synthesis runs. This is a significant departure from random sampling or exhaustive search.
- Hybrid Exploration Strategy: The tool combines three proposal engines:
- Random Engine: Introduces novel mutations to the population, helping to escape local optima.
- Evolutionary Engine: Leverages evolutionary algorithms to combine beneficial directives from existing design points, aiming to discover Pareto optimal solutions.
- Mutational Engine: Focuses on exploring extreme design points by mutating designs near the current Pareto frontier.
- Thompson Sampling: This heuristic is used to adaptively switch between the exploration-focused random engine and the exploitation-focused evolutionary/mutational engines. This ensures a balanced approach, preventing the system from getting stuck in local optima while still efficiently exploiting promising regions of the design space.
- "Soft-Boundary" Probability Evaluation: Instead of strictly rejecting designs predicted to be suboptimal or infeasible, Chimera assigns a probability of evaluation. This "soft" approach allows for more exploratory "uphill" moves, making the DSE less susceptible to poor initial samples and the inherent inaccuracies of predictive models.
- Error/Timeout Prediction: A classification model predicts the likelihood of synthesis errors or timeouts, allowing Chimera to avoid wasting time on un-synthesizable design points.
Datasets
The paper evaluates Chimera on the Rosetta benchmark suite, which comprises six real-world HLS applications (3D Rendering, Binary Neural Network, Digit Recognition, Face Detection, Optical Flow, and Spam Filtering). These benchmarks are noted for their complexity and the presence of intricate interactions between HLS tunable knobs, making them suitable for testing advanced DSE tools. The authors state that they limit the exploration to 170 design points per benchmark to ensure completion within 24 hours, with 20 points for initial sampling and 150 points explored by the DSE algorithm.
Key Insights and Ideas
- Active Learning is Key to Efficiency: By intelligently selecting which design points to synthesize, Chimera drastically reduces the number of HLS invocations, making DSE feasible within practical timeframes.
- Hybrid Exploration is More Robust: Combining random exploration with more directed evolutionary and mutational strategies, governed by Thompson sampling, allows Chimera to effectively escape local optima and discover a wider range of Pareto-optimal solutions.
- "Soft" Boundaries Prevent Premature Rejection: The probabilistic approach to evaluating design points, rather than hard thresholds, is crucial for exploring the design space thoroughly and avoiding the discard of potentially valuable, albeit initially suboptimal, configurations.
- Human Designers Miss Pareto Frontier Trade-offs: The experiments reveal that hand-tuned designs, often optimized for a single metric (like latency), overlook valuable trade-offs on the Pareto frontier. Chimera can identify designs with negligibly higher latency but significantly lower resource usage, which can be more practical in real-world scenarios.
- ML Models Uncover Non-Obvious Directive Correlations: Chimera's ability to learn from evaluated points allows it to discover complex interactions between HLS directives that might not be apparent to human designers, leading to novel and efficient configurations.
Key Results
- Chimera successfully explored Pareto frontiers for all six Rosetta benchmarks within 24 hours on a standard workstation.
- The explored Pareto frontiers often contained designs that were equally optimal or superior to hand-tuned designs from expert users.
- For the 3D Rendering benchmark, Chimera identified an "elbow point" on the Pareto frontier that offered a 26% reduction in Flip-Flop resources with only a negligible increase in latency compared to the hand-tuned design.
- The introduction of the evolutionary and mutational engines generally led to more optimal Pareto frontiers compared to using only the random engine.
Limitations and Future Work
- Adaptive Mutation Rate: The authors suggest exploring adaptive mutation rates for the evolutionary and mutational engines, potentially guided by ML models to analyze feature importance and further refine exploration.
- Portability: While Chimera is currently targeted at Xilinx Vivado HLS, its core methodology is designed to be portable to other HLS tools or even other black-box optimization problems, such as automated architecture exploration for ML accelerators. The authors intend to release the source code to facilitate this.
- Hyper-parameter Tuning: While the paper notes that hyper-parameters were kept consistent across benchmarks and generally do not require tuning due to the robustness of the algorithm, further investigation into optimal hyper-parameter settings for specific applications could be beneficial.
Summary updated