PolyDL
- 7 January 2021
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Architecture and Code Optimization
- Vol. 18 (1), 1-27
- https://doi.org/10.1145/3433103
Abstract
Deep Neural Networks (DNNs) have revolutionized many aspects of our lives. The use of DNNs is becoming ubiquitous, including in software for image recognition, speech recognition, speech synthesis, language translation, to name a few. The training of DNN architectures, however, is computationally expensive. Once the model is created, its use in the intended application—the inference task, is computationally heavy too and the inference needs to be fast for real time use. For obtaining high performance today, the code of Deep Learning (DL) primitives optimized for specific architectures by expert programmers exposed via libraries is the norm. However, given the constant emergence of new DNN architectures, creating hand optimized code is expensive, slow and is not scalable. To address this performance-productivity challenge, in this article we present compiler algorithms to automatically generate high-performance implementations of DL primitives that closely match the performance of hand optimized libraries. We develop novel data reuse analysis algorithms using the polyhedral model to derive efficient execution schedules automatically. In addition, because most DL primitives use some variant of matrix multiplication at their core, we develop a flexible framework where it is possible to plug in library implementations of the same in lieu of a subset of the loops. We show that such a hybrid compiler plus a minimal library-use approach results in state-of-the-art performance. We develop compiler algorithms to also perform operator fusions that reduce data movement through the memory hierarchy of the computer system. Using Convolution Neural Network (CNN) models and matrix multiplication operations, we demonstrate that our approach automatically creates high performing DNN building blocks whose performance matches the performance of hand-crafted kernels of Intel’s oneDNN library on high end CPUs. At the same time, our techniques take only a fraction of time (1/20 or less) compared to AutoTVM, a deep learning auto-tuner to create optimized implementations.Keywords
This publication has 32 references indexed in Scilit:
- Optimal operating room scheduling for normal and unexpected events in a smart hospitalOperational Research, 2016
- Fast R-CNNPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2015
- Adaptive parallel tiled code generation and accelerated auto-tuningThe International Journal of High Performance Computing Applications, 2013
- Decoupling algorithms from schedules for easy optimization of image processing pipelinesACM Transactions on Graphics, 2012
- Decoupled sampling for graphics pipelinesACM Transactions on Graphics, 2011
- isl: An Integer Set Library for the Polyhedral ModelLecture Notes in Computer Science, 2010
- Iterative optimization in the polyhedral modelACM SIGPLAN Notices, 2008
- Anatomy of high-performance matrix multiplicationACM Transactions on Mathematical Software, 2008
- Parameterized tiled loops for freePublished by Association for Computing Machinery (ACM) ,2007
- Loop Optimization using Hierarchical Compilation and Kernel DecompositionPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2007