A data-centric optimization framework for machine learning

Oliver Rausch, Tal Ben-Nun, Nikoli Dryden, Andrei Ivanov, Shigang Li, Torsten Hoefler · DOI

Introduction

Modern deep learning performance is increasingly constrained by memory management rather than raw computational power. While peak TFLOPS continue to rise, the real bottleneck for state-of-the-art models is data movement—the energy and time cost of transferring tensors between memory hierarchies and processors.

Current compilers, such as XLA or TorchScript, typically adopt an "operator-centric" approach, optimizing by matching specific patterns (e.g., Convolution followed by ReLU) with hand-tuned kernels. This paradigm often leads to a "hardware lottery," where researchers are restricted to standard operators that the compiler recognizes, stifling innovation in novel architectures. If a researcher invents a model with unusual data patterns, these black-box compilers often fail to provide meaningful speedups, forcing a choice between slow training or manual CUDA kernel development.

Methods

To address these challenges, the authors present DaCeML, a framework that shifts the focus to a "data-centric" optimization strategy. DaCeML is built upon the Data-Centric Parallel Programming (DaCe) framework and utilizes Stateful Dataflow Multigraphs (SDFGs) as its core intermediate representation.

The DaCeML optimization pipeline, showing progressive lowering from high-level frameworks to hardware-specific implementations.

The framework employs progressive lowering, gradually transforming models from high-level PyTorch or ONNX representations through multiple levels of abstraction. This allows for optimizations at various granularities, from coarse-grained operator fusion to hardware-specific work partitioning. A key technical pillar is Symbolic Automatic Differentiation (AD), which operates directly on the SDFG. By differentiating the lowered graph, DaCeML can optimize forward and backward passes jointly, uncovering fusion opportunities that high-level compilers often miss.

The Data-Centric Intermediate Representation

The heart of DaCeML is the SDFG, which explicitly separates computation from data movement. This separation makes it possible to analyze memory volumes and access patterns symbolically.

Transformation of a PyTorch module into an ONNX graph and finally into a Stateful Dataflow Multigraph (SDFG).

As shown in the figure above, the SDFG consists of several key components:

  • Tasklets: Stateless computation blocks.
  • Memlets: Explicit representations of data movement at all granularities.
  • Access Nodes: Connections to data containers.
  • Maps: Scopes for parametric parallelism.

This explicit representation allows for precise symbolic analysis, enabling optimizations like local data movement reduction and global data layout tuning (e.g., switching between NCHW and NHWC formats).

Key Insights

One of the primary advantages of DaCeML is its ability to "break out of the library jail." While vendor libraries like cuDNN are highly optimized, they are often opaque. DaCeML allows users to "expand" these library nodes into native code, facilitating custom fusions—such as integrating a bias-add into a preceding layer—that vendor libraries may not support.

Furthermore, the framework provides an interactive, VS Code-based GUI. This visual toolkit allows performance engineers to inspect the dataflow, identify bottlenecks, and manually apply transformations like tiling or fusion. This interactivity bridges the gap between automated heuristics and human intuition, allowing for "non-local" optimization opportunities that automated tools often overlook.

Evaluation and Results

The framework was evaluated across a diverse set of architectures, including ResNet-50, BERT-Large, and WaveNet. Key performance highlights include:

  • Mish Activation: DaCeML achieved a 3.43x speedup over PyTorch by eliminating unnecessary global memory roundtrips through full operation fusion.
  • EfficientNet-B0: Human-guided optimization via the GUI revealed a new fusion opportunity in the MBConv block, resulting in a 1.33x speedup over the hand-optimized cuDNN version.
  • Wide ResNet: DaCeML outperformed other frameworks by up to 2.89x, demonstrating its effectiveness for architectures with large memory footprints.

Across ten different networks, DaCeML's automated optimization "recipe" consistently matched or outperformed state-of-the-art compilers like XLA and JAX.

Conclusion

DaCeML offers a powerful alternative to black-box compilers by making data movement a first-class citizen in the optimization process. While currently focused primarily on NVIDIA GPUs and requiring some manual intervention for peak performance, its ability to provide significant speedups on non-standard architectures makes it a valuable tool for deep learning researchers. Future work aims to expand automated optimization recipes for a broader range of hardware backends, including FPGAs.

Summary updated

BibTeX
@inproceedings{rausch2021data,
  author = {Oliver Rausch and Tal Ben-Nun and Nikoli Dryden and Andrei Ivanov and Shigang Li and Torsten Hoefler},
  title = {{A data-centric optimization framework for machine learning}},
  booktitle = {ICS},
  year = {2021},
  doi = {10.1145/3524059.3532364},
}
Figure