MetaML-Pro: Cross-Stage Design Flow Automation for Efficient Deep Learning Acceleration

Zhiqiang Que, Jose G. F. Coutinho, Ce Guo, Hongxiang Fan, Wayne Luk · DOI

TL;DR

MetaML-Pro is an automated co-optimization framework that bridges the gap between software-level deep learning optimizations and hardware-level High-Level Synthesis (HLS) for FPGAs. By combining a modular "blackboard" architecture with constraint-aware Bayesian optimization, it automatically navigates complex design trade-offs to drastically reduce hardware resource usage while preserving model accuracy.

What Problem Does This Paper Address?

Deploying Deep Neural Networks (DNNs) onto resource-constrained hardware like FPGAs requires a delicate balance between performance, resource utilization (such as DSPs and LUTs), and inference accuracy. Traditionally, this process is siloed: machine learning engineers optimize the model in software (e.g., via pruning or scaling), while hardware engineers optimize the implementation details in hardware.

Information typically flows one way—top-down—from the application to the hardware. When hardware constraints are violated, fixing them requires slow, manual, expert-driven iterations. Existing frameworks lack a unified, automated way to handle both top-down and bottom-up feedback loops across these distinct abstraction layers, making the design space exploration (DSE) incredibly time-consuming and heavily reliant on domain expertise.

Methods

MetaML-Pro introduces a customizable, multi-level, cross-stage design flow automation framework. Its architecture relies on two pillars:

  1. Pipe Tasks: Reusable building blocks categorized into O-tasks (optimization tasks like pruning and scaling), K-tasks (control flow tasks like BRANCH, FORK, REDUCE), and $\lambda$-tasks (functional transformations like HLS4ML or Vivado HLS compilation).
  2. Meta-Model (Blackboard Architecture): Instead of tasks communicating directly, they interact via a shared meta-model containing configuration data (CFG), execution logs (LOG), and a versioned model space. This allows downstream hardware metrics to seamlessly inform upstream software optimizations.
Fig. 1. The proposed approach.
The pipe task and meta-model architecture enabling cross-stage communication.

To optimize the hardware directly, MetaML-Pro leverages HLS Metaprogramming to operate directly on the C++ Abstract Syntax Tree (AST). This allows it to dynamically adjust data types, bit-widths, and insert pragmas (like loop unrolling) across heterogeneous codebases.

Finally, the entire flow is governed by a Cross-Stage Constrained Bayesian Optimization (BO) algorithm. It uses FORK/REDUCE to explore different optimization task permutations in parallel and aggregates the results based on Pareto dominance, automatically tuning global tolerance variables without manual intervention.

Datasets

The framework was evaluated using diverse benchmark workloads across multiple application domains:

  • Jet-HLF: A high-level features dataset used for a jet identification task (Jet-DNN / Jet-CNN) in particle physics, targeting ultra-low latency CERN Large Hadron Collider (LHC) trigger systems.
  • MNIST: Used for standard image classification with a VGG-7 network and sequence classification with an LSTM network.
  • SVHN (Street View House Numbers): Used for image classification with a ResNet-9 network.
  • GNN Case Study: The authors also evaluated their framework on an irregular, graph-based jet classifier model family to demonstrate scaling.

No new datasets were introduced in this paper.

Key Insights and Ideas

  • The Order of Optimizations Matters: The sequence in which optimizations are applied (e.g., scaling before pruning vs. pruning before scaling) significantly alters the final hardware efficiency and accuracy trade-off. MetaML-Pro automates this ordering search rather than assuming a fixed pipeline.
  • AST Metaprogramming Beats Templates: Traditional HLS code generation relies on rigid templates. By manipulating the AST directly, MetaML-Pro ensures type consistency across intermediate streams and customizes code without needing to modify the underlying generator tool.
  • Bottom-Up Feedback Prevents Wasted Search: Allowing hardware synthesis reports to actively adjust software-level accuracy tolerances (via BRANCH K-tasks) prevents the design space exploration from getting stuck on unroutable or over-mapped hardware candidates.

Key Results

  • Massive Resource Savings: For the Jet-DNN network, the optimized S→P→Q (Scaling $\rightarrow$ Pruning $\rightarrow$ Quantization) design achieved up to a 92% reduction in DSP usage and an 89% reduction in LUT usage compared to the baseline, while preserving model accuracy.
  • 15.6× Faster Exploration: The constraint-aware Bayesian Optimization strategy achieved comparable Pareto-optimal results to an extensive grid search but with a 15.6-fold reduction in optimization time (22 iterations over 40 hours vs. 343 iterations over 624 hours).
  • Cross-Vendor Portability: The framework successfully targeted both AMD/Xilinx (Vivado HLS) and Intel (oneAPI) FPGAs, automatically adapting to vendor-specific architectural tendencies (e.g., Intel's compiler favoring soft multipliers over DSP blocks for certain tasks).

Limitations and Future Work

  • Downstream Hardware Stages: The current implementation focuses primarily on custom optimizations in the software (SW) and HLS stages, leaving default configurations for downstream stages like RTL generation and Netlist placement.
  • Evolving Model Architectures: While evaluated successfully on CNNs, RNNs, and GNNs, the authors note that extending the framework to support emerging Transformer families and Large Language Models (LLMs) is a crucial next step.
  • ASIC Backend: The framework currently targets FPGAs; the authors plan to extend future iterations to include RTL space and ASIC platform support.

Summary updated

Abstract

This paper presents a unified framework for codifying and automating optimization strategies to efficiently deploy deep neural networks (DNNs) on resource-constrained hardware, such as FPGAs, while maintaining high performance, accuracy, and resource efficiency. Deploying DNNs on such platforms involves addressing the significant challenge of balancing performance, resource usage (e.g., DSPs and LUTs), and inference accuracy, which often requires extensive manual effort and domain expertise. Our novel approach addresses two core key issues: (i)~encoding custom optimization strategies and (ii)~enabling cross-stage optimization search. In particular, our proposed framework seamlessly integrates programmatic DNN optimization techniques with high-level synthesis (HLS)-based metaprogramming, leveraging advanced design space exploration (DSE) strategies like Bayesian optimization to automate both top-down and bottom-up design flows. Hence, we reduce the need for manual intervention and domain expertise. In addition, the framework introduces customizable optimization, transformation, and control blocks to enhance DNN accelerator performance and resource efficiency. Experimental results demonstrate up to a 92\% DSP and 89\% LUT usage reduction for select networks, while preserving accuracy, along with a 15.6-fold reduction in optimization time compared to grid search. These results highlight the potential for automating the generation of resource-efficient DNN accelerator designs with minimum effort.
BibTeX
@article{que2026metaml,
  author = {Zhiqiang Que and Jose G. F. Coutinho and Ce Guo and Hongxiang Fan and Wayne Luk},
  title = {{MetaML-Pro: Cross-Stage Design Flow Automation for Efficient Deep Learning Acceleration}},
  journal = {ACM Trans. Reconfigurable Technol. Syst.},
  year = {2026},
  doi = {10.1145/3795794},
}
Figure