NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Python FPGA Programming with Data-Centric Multi-Level Design

Johannes de Fine Licht, Tiziano De Matteis, Tal Ben-Nun, Andreas Kuster, Oliver Rausch, Manuel Burger, Carl-Johannes Johnsen, Torsten HoeflerarXiv 2022 · DOI

Abstract

This paper introduces a multi-level design approach for FPGA programming using the Data-Centric (DaCe) framework. By representing programs as Stateful DataFlow multiGraphs (SDFGs) and utilizing "Library Nodes," the authors enable developers to write high-level Python code that can be automatically transformed and optimized for both Xilinx and Intel FPGAs, achieving performance on par with manually tuned implementations.

The Challenge of FPGA Programming

High-Level Synthesis (HLS) was intended to simplify FPGA programming by allowing developers to use C++ or similar languages. However, in practice, it remains a "leaky abstraction." To achieve competitive performance, developers must manually insert vendor-specific pragmas, restructure loops to fit hardware templates, and manage complex memory movement. This results in code that is non-portable, difficult to maintain, and requires deep hardware-specific expertise.

The authors address this by focusing on data movement—the primary bottleneck in modern computing. Their goal is to decouple the algorithmic "what" from the hardware-specific "how" through a framework that enables automated, graph-based optimizations.

The DaCe Framework and SDFGs

The core of the proposed approach is the DaCe framework and its Stateful DataFlow multiGraph (SDFG) intermediate representation. As shown in the framework overview, the process begins with a high-level program description (e.g., in Python/PyTorch) which is then lowered into a data-centric representation.

Overview of the DaCe framework flow from high-level frontend to hardware bitstream.

Key technical components include:

  • SDFGs: A graph representation where nodes represent data containers or computations (tasklets), and edges (memlets) represent data movement. This makes data flow explicit and analyzable.
  • Multi-Level Transformations: The framework provides automated graph-rewriting passes, such as StreamingMemory (converting memory accesses to FIFOs) and PipelineFusion (connecting computations via streams to avoid off-chip DRAM round-trips).
  • Dual-Vendor Backend: The compiler generates structured HLS code for both Xilinx (Vivado HLS) and Intel (OpenCL SDK for FPGA), handling vendor-specific syntax and architectural quirks under the hood.

Library Nodes and Lowering

A pivotal concept in this work is the Library Node. These are abstract nodes representing operations like "Matrix Multiplication" that can be "lowered" or expanded into different concrete implementations.

The expansion of an abstract operator into a platform-specific optimized implementation.

As illustrated above, a single high-level operator can be specialized based on input dimensions and target hardware. This allows domain experts to write mathematical expressions while performance engineers guide the transformation into highly specialized FPGA systolic arrays or vendor-optimized BLAS calls.

Evaluation and Key Results

The framework was evaluated using representative computational kernels, demonstrating significant gains over naive HLS implementations:

  • Linear Algebra: The AXPYDOT kernel achieved 9.34 GB/s on a Xilinx Alveo U250, representing a 2.6x speedup over unoptimized versions.
  • Machine Learning: For LeNet-5 inference, the framework achieved an 8.8x speedup compared to the original SDFG by utilizing domain-specific transformations like streaming composition.
  • Stencil Computations: Specialized stencil expansions yielded up to 373 GOp/s, outperforming state-of-the-art FPGA stencil frameworks like SODA by 2.8x.
  • Portability: The same high-level Python code was successfully compiled and optimized for both Xilinx Alveo U250 and Intel Stratix 10 boards, proving the framework's cross-vendor utility.

Conclusion and Future Work

By making data movement a first-class citizen, the DaCe framework enables optimizations that are difficult for standard compilers to prove safe. While achieving peak performance still requires some guidance from a performance engineer, the framework significantly lowers the barrier to entry for high-performance FPGA programming. Future work will focus on integrating direct host-to-device streaming (e.g., via QDMA) and increasing the automation of the optimization process.

Summary updated

BibTeX
@misc{licht2022python,
  author = {Johannes de Fine Licht and Tiziano De Matteis and Tal Ben-Nun and Andreas Kuster and Oliver Rausch and Manuel Burger and Carl-Johannes Johnsen and Torsten Hoefler},
  title = {{Python FPGA Programming with Data-Centric Multi-Level Design}},
  year = {2022},
  eprint = {2212.13768},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.13768},
}
Figure