Affiliation:
1. Intel Labs, Bengaluru, Karnataka, India
2. IIT Hyderabad
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.
Publisher
Association for Computing Machinery (ACM)
Subject
Hardware and Architecture,Information Systems,Software
Reference55 articles.
1. 2020. Google is AI first: 12 AI projects powering Google products. Retrieved from https://blog.aimultiple.com/ai-is-already-at-the-heart-of-google. 2020. Google is AI first: 12 AI projects powering Google products. Retrieved from https://blog.aimultiple.com/ai-is-already-at-the-heart-of-google.
2. 2020. How to optimize GEMM on CPU. Retrieved from https://tvm.apache.org/docs/tutorials/optimize/opt_gemm.html. 2020. How to optimize GEMM on CPU. Retrieved from https://tvm.apache.org/docs/tutorials/optimize/opt_gemm.html.
3. 2020. Library targeting Intel Architecture for specialized dense and sparse matrix operations and deep learning primitives.Retrieved from https://github.com/hfp/libxsmm. 2020. Library targeting Intel Architecture for specialized dense and sparse matrix operations and deep learning primitives.Retrieved from https://github.com/hfp/libxsmm.
4. 2020. oneAPI Deep Neural Network Library (oneDNN). Retrieved from https://github.com/oneapi-src/oneDNN. 2020. oneAPI Deep Neural Network Library (oneDNN). Retrieved from https://github.com/oneapi-src/oneDNN.
5. 2015. Why GEMM is at the heart of deep learning. Retrieved from https://petewarden.com/2015/04/20/why-gemm-is-at-the-heart-of-deep-learning/. 2015. Why GEMM is at the heart of deep learning. Retrieved from https://petewarden.com/2015/04/20/why-gemm-is-at-the-heart-of-deep-learning/.
Cited by
14 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. TensorMap: A Deep RL-Based Tensor Mapping Framework for Spatial Accelerators;IEEE Transactions on Computers;2024-08
2. Soter: Analytical Tensor-Architecture Modeling and Automatic Tensor Program Tuning for Spatial Accelerators;2024 ACM/IEEE 51st Annual International Symposium on Computer Architecture (ISCA);2024-06-29
3. Harnessing Deep Learning and HPC Kernels via High-Level Loop and Tensor Abstractions on CPU Architectures;2024 IEEE International Parallel and Distributed Processing Symposium (IPDPS);2024-05-27
4. Optimizing Deep Learning Inference via Global Analysis and Tensor Expressions;Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 1;2024-04-17
5. oneDNN Graph Compiler: A Hybrid Approach for High-Performance Deep Learning Compilation;2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO);2024-03-02