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

Productivity, Portability, Performance: Data-Centric Python

Alexandros Nikolaos Ziogas, Timo Schneider, Tal Ben-Nun, Alexandru Calotoiu, Tiziano De Matteis, Johannes de Fine Licht, Luca Lavarini, Torsten Hoefler

Abstract

Python has become the standard for scientific productivity, yet it frequently falls short of the performance requirements for High-Performance Computing (HPC). This paper presents a workflow based on the Data-Centric (DaCe) framework, which converts high-level Python/NumPy code into a Stateful Dataflow multiGraph (SDFG). By prioritizing data movement as a first-class citizen, DaCe enables sophisticated global optimizations that surpass the capabilities of specialized compilers like Numba and CuPy. Our evaluation across CPUs, GPUs, and FPGAs demonstrates speedups of up to 3.75x while maintaining near-linear scalability on large-scale supercomputers.

Introduction

In the realm of scientific computing, researchers often face a difficult choice between productivity and performance. Python's ease of use makes it ideal for rapid development, but the resulting code is often orders of magnitude slower than equivalent implementations in C++ or Fortran. While Just-In-Time (JIT) compilers like Numba and library-based accelerators like CuPy have made strides, they often focus on local instruction-level optimizations. In modern computing, however, the primary bottleneck is not computation but data movement. This paper introduces a framework designed to achieve the "Three Ps": Productivity, Portability, and Performance, by focusing on a data-centric approach to compilation.

The DaCe Framework and SDFG

The proposed workflow centers on the Data-Centric (DaCe) framework. The process begins with a high-level Python frontend where users annotate standard NumPy functions with a @dace.program decorator. This allows the framework to perform static analysis while ensuring the code remains valid Python.

The core innovation is the Stateful Dataflow multiGraph (SDFG). This intermediate representation explicitly separates data containers (arrays) from computations. By making the flow of data visible to the compiler, DaCe can identify and eliminate redundant data movement that traditional compilers often miss.

Overview of the DaCe framework architecture, showing the path from Data-Centric Python to various hardware targets and summarizing performance gains.

Optimization and Hardware Specialization

Once a program is represented as an SDFG, the framework applies a series of automatic graph transformations. These transformations, such as "State Fusion," act as high-level compiler optimizations that fuse operations and minimize memory overhead to keep data in fast caches or registers.

Illustration of the StateFusion transformation, which merges separate computational states in the SDFG to optimize data flow and reduce memory overhead.

The framework supports hardware specialization by lowering the high-level SDFG into architecture-specific code:

  • CPUs: Generates code utilizing OpenMP and optimized libraries like Intel MKL.
  • GPUs: Produces CUDA kernels and leverages cuBLAS.
  • FPGAs: Automatically implements complex streaming memory architectures and systolic arrays, a task traditionally requiring significant manual effort.
  • Distributed Systems: Automatically transforms local operations into MPI-based communication for large-scale clusters.

Experimental Results

The framework was rigorously tested using the Polybench suite and real-world applications in machine learning and weather prediction. Key results include:

  • CPU Performance: A 2.47x geometric mean speedup over Numba and Pythran.
  • GPU Performance: A 3.75x geometric mean speedup over CuPy.
  • FPGA Breakthrough: The first demonstration of automatic, high-performance FPGA bitstream generation from annotated Python, matching the performance of hand-optimized High-Level Synthesis (HLS) code.
  • Scalability: On the Piz Daint supercomputer, the framework scaled to 512 nodes with 93.16% efficiency, significantly outperforming distributed frameworks like Dask.

Conclusion

By elevating data movement to a first-class concern, the DaCe framework allows scientists to maintain the productivity of Python without sacrificing the performance required for modern HPC. Future work will focus on expanding the range of supported Python features and further automating the optimization of complex communication patterns in distributed environments.

Summary updated

BibTeX
@inproceedings{ziogas2021productivity,
  author = {Alexandros Nikolaos Ziogas and Timo Schneider and Tal Ben-Nun and Alexandru Calotoiu and Tiziano De Matteis and Johannes de Fine Licht and Luca Lavarini and Torsten Hoefler},
  title = {{Productivity, Portability, Performance: Data-Centric Python}},
  booktitle = {SC},
  year = {2021},
  url = {https://openreview.net/forum?id=KQFYqmNRBm},
}
Figure