TL;DR
This paper introduces AutoAccel, a framework that automates the generation of high-performance FPGA accelerators from C/C++ software. By proposing a "composable, parallel, and pipeline" (CPP) microarchitecture template and an analytical model for design space exploration, AutoAccel significantly reduces the complexity of FPGA programming, achieving an average 72x speedup over software implementations.
What Problem Does This Paper Address?
Modern datacenters are increasingly adopting heterogeneous architectures, combining CPUs with specialized hardware accelerators like FPGAs, to meet growing computational demands and improve energy efficiency. While FPGAs offer significant performance-per-watt advantages, their traditional programming model, Register-Transfer Level (RTL) design, is complex and requires deep hardware expertise. High-Level Synthesis (HLS) tools have improved programmability by allowing C/C++ code to be synthesized into hardware, but they still leave programmers with the daunting task of navigating a vast design space to achieve optimal performance. Naively translating software to HLS often results in accelerators that perform orders of magnitude worse than their CPU counterparts due to inefficiencies in data transfer, caching, and parallelism. This paper addresses the challenge of bridging the gap between software programs and high-quality, efficient FPGA accelerators, making FPGA acceleration more accessible to software developers.
Methods
The core of AutoAccel lies in its three-stage approach:
- Design Space Reduction (CPP Microarchitecture): The authors introduce the "composable, parallel, and pipeline" (CPP) microarchitecture as a standardized template for accelerator designs. This template is designed to efficiently handle a broad class of computation kernels and drastically reduces the design space by restricting generated accelerators to configurations of this specific architecture. The CPP microarchitecture addresses common inefficiencies by incorporating coarse-grained pipelines (load-compute-store), data caching, optimized loop scheduling (parallelism and pipelining), and on-chip buffer reorganization.
- Automatic Design Space Exploration (Analytical Model): An analytical model is developed to estimate the performance (execution cycles) and resource (BRAM, LUT, DSP, FF) trade-offs for different configurations within the CPP microarchitecture. This model is crucial for fast design space exploration. It leverages HLS synthesis reports from a few design points to capture scheduling optimizations, making it more accurate than purely static models. The model recursively traverses the architecture hierarchy to quantify loop and module execution times.
- Automated Accelerator Generation (AutoAccel Framework): The AutoAccel framework orchestrates the entire process. It takes a C/C++ program as input, performs legalization checking to ensure it fits the CPP template, and then uses the Merlin compiler's transformation library to refactor the code into the CPP microarchitecture. A design space builder identifies the search space, and the analytical model guides a machine-learning-based search engine (OpenTuner) to efficiently find the near-optimal configuration. Finally, the framework applies the best configuration to generate the final accelerator design, which can then be fed into HLS tools.
Datasets
The paper evaluates AutoAccel using the MachSuite benchmark suite. MachSuite is described as a benchmark suite containing a broad class of computational kernels programmed as C functions, suitable for accelerator studies. The paper does not introduce new benchmarks but uses existing ones to demonstrate the framework's effectiveness.
Key Insights and Ideas
- Standardized Microarchitecture Template is Key: The CPP microarchitecture acts as a crucial abstraction layer. By defining a target architecture, the enormous design space of FPGAs is dramatically pruned, making automated exploration feasible and ensuring a baseline level of quality.
- Analytical Model for Fast Exploration: The ability to accurately predict performance and resource usage without exhaustive HLS runs is critical. The proposed analytical model, informed by HLS reports, provides this capability, enabling rapid design space exploration.
- Bridging the Software-Hardware Gap: The core contribution is demonstrating that a near-push-button approach can generate high-performance FPGA accelerators, significantly lowering the barrier to entry for software developers and making FPGAs more practical for datacenter acceleration.
- Addressing Inefficiencies Systematically: The CPP microarchitecture is explicitly designed to tackle common performance bottlenecks in naive HLS translations, such as inefficient data transfers, lack of caching, and suboptimal loop scheduling.
Key Results
- AutoAccel-generated accelerators outperform their corresponding software implementations by an average of 72x.
- Compared to naive HLS implementations (without AutoAccel's optimization), AutoAccel achieves a speedup of up to 27,000x.
- The analytical model shows an average absolute difference rate of less than 1% for performance and BRAM/DSP usage compared to HLS reports, and moderate differences for LUT/FF usage.
- The model's on-board execution time prediction accuracy is within 6.2% on average.
- Energy efficiency improvements reach up to 1677.9x, with an average of 260.4x, due to the significant performance gains and the lower power consumption of FPGAs compared to CPUs.
Limitations and Future Work
- Applicability of CPP: The CPP microarchitecture is not universally applicable to all computation kernels. It favors kernels with regular data-level parallelism and streaming/batch processing patterns (e.g., MapReduce). Kernels with extensive random accesses on large memory footprints (e.g., PageRank, BFS) are not a good fit.
- Data Tiling Granularity: The current analytical model does not account for different data tiling granularities. The authors plan to include this in future work.
- Complex Transformations: The analytical model currently doesn't capture all optimizations, such as dynamic resource-efficient implementations of multiplexers in the VITERBI benchmark. Future work aims to extend the model to cover more complex transformations.
- Coverage of Microarchitectures: The framework currently focuses on the CPP microarchitecture. Expanding AutoAccel to support other microarchitectural templates would broaden its applicability.
- Advanced Transformations: The authors suggest supporting more sophisticated, high-abstract code transformations (e.g., loop permutation) and integrating polyhedral analysis to explore a larger design space.
Summary updated