FlowTune: End-to-End Automatic Logic Optimization Exploration via Domain-Specific Multiarmed Bandit

Walter Lau Neto, Yingjie Li, Pierre-Emmanuel Gaillardon, Cunxi Yu

TL;DR

This paper introduces FlowTune, an automated system that uses a novel domain-specific multi-armed bandit (MAB) approach to explore and optimize complex logic synthesis and place-and-route (PnR) flows for integrated circuits. FlowTune significantly outperforms existing methods in terms of quality of results and is orders of magnitude faster, paving the way for more efficient and automated hardware design.

What Problem Does This Paper Address?

Designing integrated circuits (ICs) and Systems-on-Chip (SoCs) involves a multi-step process called a "design flow," which includes transformations like synthesis, placement, and routing. Traditionally, these flows are crafted by human experts based on their experience. However, the sheer complexity of modern designs and the vast number of possible transformations create an enormous "design space" that is incredibly difficult to navigate. This makes it challenging to find optimal flows that achieve high Quality of Results (QoR) and meet tight time-to-market demands. While machine learning (ML) has shown promise in automating parts of this process, existing ML techniques often require massive amounts of labeled data, are computationally expensive to train, or struggle with seamless integration into existing Electronic Design Automation (EDA) tools. Furthermore, many prior ML approaches only optimize for pre-placement-and-route metrics, neglecting the crucial impact of these optimizations on the final physical design.

Methods

The core innovation of this paper is FlowTune, a framework that employs a domain-specific, multi-stage multi-armed bandit (MAB) approach for optimizing logic synthesis and PnR flows.

Here's a breakdown of the key methods:

  • Domain-Specific MAB: Unlike traditional MABs where each "arm" represents a fixed choice, FlowTune's arms are sampling functions that represent permutations of synthesis transformations. This allows it to explore sequences of operations. The MAB agent learns to balance exploration (trying new sequences) and exploitation (using promising sequences) to find optimal flows.
  • Leveraging Domain Knowledge: FlowTune incorporates crucial insights about DAG-aware synthesis algorithms. It recognizes that early transformations in a synthesis flow have a disproportionately large impact on the final outcome. This domain knowledge is used to guide the MAB's initialization and exploration strategy, making it more efficient.
  • Multi-Stage Bandit: To handle longer synthesis flows and improve convergence, FlowTune uses a multi-stage approach. The MAB is divided into several stages, where the output of one stage (the best-performing flow sequences) becomes the input for the next. This allows for a more focused and efficient exploration of the design space.
  • End-to-End Integration: FlowTune is designed for seamless integration with popular EDA tools like ABC, Yosys, VTR, LSOracle, and OpenFPGA. This allows it to evaluate optimization strategies across various stages of the design process, including post-place-and-route (post-PnR) for FPGAs.
  • Support for AIG and MIG: The framework is demonstrated to work effectively with both And-Inverter Graphs (AIGs) and Majority-Inverter Graphs (MIGs), two common representations for logic circuits.

Datasets

The paper primarily uses benchmark circuits for evaluation. These are standard designs commonly used in the FPGA and ASIC design communities. Specific benchmarks mentioned include:

  • VTR benchmarks: A set of six designs (bfly, dscg, fir, ode, or1200, syn2) collected from the VTR project. These are used for both ASIC and FPGA evaluations.
  • 128-bit AES design: Used in the motivating examples to illustrate the performance differences between default and explored flows.

The paper does not introduce new datasets but rather uses existing benchmarks to demonstrate the effectiveness of FlowTune.

Key Insights and Ideas

  • Early Transformations Dominate: A critical insight is that the initial transformations in a synthesis flow have a much larger impact on the final Quality of Result (QoR) than later ones. This is because they shape the circuit's structure early on, influencing the effectiveness of subsequent steps. This observation is key to FlowTune's domain-specific approach.
  • Vast Design Space: The sheer number of possible synthesis flow combinations is astronomically large (e.g., over $10^{16}$ for a simple scenario). This highlights the necessity of automated, intelligent exploration methods like FlowTune, as manual exploration is practically impossible.
  • Expert Flows Aren't Always Optimal: The experiments show that even well-crafted, expert-designed flows can be outperformed by flows discovered through automated exploration. This suggests that human intuition, while valuable, may not always find the absolute best solutions in such complex search spaces.
  • Domain Knowledge is Crucial for Efficiency: Simply applying generic ML techniques to synthesis is less effective than incorporating specific knowledge about how synthesis algorithms work. FlowTune's success stems from its ability to leverage this domain knowledge to guide its search.
  • End-to-End Evaluation Matters: Optimizing for metrics before placement and routing doesn't always guarantee good results after. FlowTune's ability to evaluate flows at the post-PnR stage provides a more realistic assessment of its effectiveness.

Key Results

FlowTune demonstrates significant improvements across various design stages and metrics:

  • Outperforms Handcrafted and ML Flows: FlowTune consistently achieves better Quality of Results (QoR) compared to both traditional handcrafted flows and previously proposed ML-based exploration methods.
  • Faster Exploration: FlowTune is orders of magnitude faster than comparable ML-based approaches, significantly reducing the time required for design closure.
  • ASIC Optimization: For standard-cell technology mapping, FlowTune effectively explores the design space to find better synthesis flows for both area and timing optimization.
  • FPGA Post-PnR Optimization:
    • Area Reduction: FlowTune achieves an average reduction of ~30% in total area (logic + routing) for VTR-based evaluations and up to 10% with an average of 4.5% for OpenFPGA.
  • Wirelength Reduction: FlowTune improves total routing wirelength, with gains up to 14% and an average of 5% in OpenFPGA.
  • Timing Improvement: FlowTune significantly improves critical path delay and total negative slack (TNS) in FPGA designs, with improvements up to 37% for critical path delay in some cases.
  • Flexibility and Portability: The framework is shown to be easily integrated and effective across different logic representations (AIG and MIG) and backend tools (VTR and OpenFPGA).

Limitations and Future Work

  • Initialization Sensitivity: The paper acknowledges that the initialization step is crucial for MAB-based exploration performance. While FlowTune uses domain knowledge for initialization, the performance can still be influenced by this initial step.
  • Design Space Limitations: For certain designs (e.g., or1200), the available synthesis flow design space might be very limited, leading to less significant improvements.
  • Future Work: The authors suggest several avenues for future research:
  • Explainability and Robustness: Further analysis into why FlowTune's discovered flows are effective and how robust they are across different designs.
  • Architecture-Aware Optimizations: Developing optimizations that are more specifically tailored to the target FPGA architecture.
  • Parallelization: Exploring further parallelization techniques to speed up the exploration process, especially for larger designs.

Summary updated

BibTeX
@article{neto2023flowtune,
  author = {Walter Lau Neto and Yingjie Li and Pierre-Emmanuel Gaillardon and Cunxi Yu},
  title = {{FlowTune: End-to-End Automatic Logic Optimization Exploration via Domain-Specific Multiarmed Bandit}},
  journal = {IEEE Trans. Comput. Aided Des. Integr. Circuits Syst.},
  year = {2023},
  url = {https://openreview.net/forum?id=cLmgeChzOa},
}
Figure