Abstract
High-Level Synthesis (HLS) enables hardware description using high-level languages like C/C++, but the effectiveness of Machine Learning (ML) for predicting Quality of Results (QoR) is limited by the scarcity and non-standardization of available datasets. We introduce HLSFactory, an open-source, multi-vendor framework that automates the generation of large-scale, standardized HLS datasets. By utilizing a modular pipeline for design expansion, synthesis, and data aggregation, HLSFactory facilitates the development of robust ML models for hardware performance prediction.
Introduction
The adoption of High-Level Synthesis (HLS) has streamlined digital logic design, yet predicting performance metrics such as power, area, and speed remains computationally expensive. While Machine Learning (ML) offers a promising alternative for rapid QoR estimation, existing HLS datasets suffer from being small, vendor-locked, and non-standardized. These "data silos" prevent the cross-pollination of research and the training of generalized models.
HLSFactory addresses these challenges by providing a principled framework to generate and share HLS data at scale. As shown in the comparison below, HLSFactory offers a more comprehensive set of features and benchmark support than previous efforts.
Methods
HLSFactory is built upon a tripartite architecture designed for flexibility and scalability. Users can interface with the pipeline at any of the following three stages:
- Design Space Expansion (Stage 1): Utilizing a domain-specific language called OptDSL, the framework transforms a single abstract HLS design into hundreds of concrete implementations. This is achieved by systematically varying optimization directives such as loop unrolling, pipelining, and array partitioning.
- Design Synthesis (Stage 2): The framework automates the execution of commercial HLS tools, including AMD/Xilinx Vitis HLS and Intel i++. A fine-grained parallel backend optimizes CPU utilization, enabling the simultaneous synthesis of thousands of designs.
- Data Aggregation (Stage 3): Raw outputs from various tools and intermediate artifacts (e.g., LLVM IR) are parsed into a standardized, ML-ready JSON format, ensuring consistency across different vendors and projects.
The framework includes several standard benchmark suites, such as PolyBench, MachSuite, Rosetta, and CHStone, and allows for the integration of external datasets like HLSyn.
Key Insights and Results
A core philosophy of HLSFactory is prioritizing diversity over optimality. By intentionally sampling suboptimal designs, the framework provides ML models with the "negative" examples necessary to learn the full design landscape. Visualization using PacMAP confirms that HLSFactory's expansion fills significant gaps in the design space that traditional benchmarks miss.
Key results from our evaluation include:
- Enhanced ML Performance: Models trained on an expanded dataset of 257 designs achieved significantly higher $R^2$ values and lower error rates in post-implementation QoR prediction.
- Efficiency Gains: The fine-grained parallel approach to dataset generation resulted in a 23% speedup compared to traditional sequential methods.
- Tool Benchmarking: HLSFactory enabled a comparison between Xilinx Vitis HLS versions 2021.1 and 2023.1, revealing statistically significant discrepancies in reported resource usage.
Conclusion
HLSFactory provides a robust foundation for data-driven HLS research. While currently focused on synthesis and implementation reports, future work will incorporate simulation-based metrics for cycle-accurate analysis. Additionally, we plan to implement active learning for smarter design space sampling and extend support to other HLS vendors and open-source tools.
Summary updated