Bridging Control-Centric and Data-Centric Optimization
arXiv:2306.00366 · doi:10.1145/3579990.3580018
Abstract
With the rise of specialized hardware and new programming languages, code optimization has shifted its focus towards promoting data locality. Most production-grade compilers adopt a control-centric mindset - instruction-driven optimization augmented with scalar-based dataflow - whereas other approaches provide domain-specific and general purpose data movement minimization, which can miss important control-flow optimizations. As the two representations are not commutable, users must choose one over the other. In this paper, we explore how both control- and data-centric approaches can work in tandem via the Multi-Level Intermediate Representation (MLIR) framework. Through a combination of an MLIR dialect and specialized passes, we recover parametric, symbolic dataflow that can be optimized within the DaCe framework. We combine the two views into a single pipeline, called DCIR, showing that it is strictly more powerful than either view. On several benchmarks and a real-world application in C, we show that our proposed pipeline consistently outperforms MLIR and automatically uncovers new optimization opportunities with no additional effort.
arXiv commentCGO'23
References in corpus (6)
- YOLOv4: Optimal Speed and Accuracy of Object Detection
- Gunrock: A High-Performance Graph Processing Library on the GPU
- Tensor Comprehensions: Framework-Agnostic High-Performance Machine Learning Abstractions
- TVM: An Automated End-to-End Optimizing Compiler for Deep Learning
- SLEEF: A Portable Vectorized Library of C Standard Mathematical Functions
- High Performance GPU Code Generation for Matrix-Matrix Multiplication using MLIR: Some Early Results