AMOS
Authors:
Open Access
- 11 June 2022
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 874-887
Abstract
Hardware specialization is a promising trend to sustain performance growth. Spatial hardware accelerators that employ specialized and hierarchical computation and memory resources have recently shown high performance gains for tensor applications such as deep learning, scientific computing, and data mining. To harness the power of these hardware accelerators, programmers have to use specialized instructions with certain hardware constraints. However, these hardware accelerators and instructions are quite new and there is a lack of understanding of the hardware abstraction, performance optimization space, and automatic methodologies to explore the space. Existing compilers use hand-tuned computation implementations and optimization templates, resulting in sub-optimal performance and heavy development costs. In this paper, we propose AMOS, which is an automatic compilation framework for spatial hardware accelerators. Central to this framework is the hardware abstraction that not only clearly specifies the behavior of spatial hardware instructions, but also formally defines the mapping problem from software to hardware. Based on the abstraction, we develop algorithms and performance models to explore various mappings automatically. Finally, we build a compilation framework that uses the hardware abstraction as compiler intermediate representation (IR), explores both compute mappings and memory mappings, and generates high-performance code for different hardware backends. Our experiments show that AMOS achieves more than 2.50× speedup to hand-optimized libraries on Tensor Core, 1.37× speedup to TVM on vector units of Intel CPU for AVX-512, and up to 25.04× speedup to AutoTVM on dot units of Mali GPU. The source code of AMOS is publicly available.Keywords
Funding Information
- Science and Technology Commission of Shanghai Municipality, China (20DZ1100800)
- National Natural Science Foundation of China (NSFC) (U21B2017)
This publication has 33 references indexed in Scilit:
- In-Datacenter Performance Analysis of a Tensor Processing Unit2017
- DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFsIEEE Transactions on Pattern Analysis and Machine Intelligence, 2017
- Automatically scheduling halide image processing pipelinesACM Transactions on Graphics, 2016
- Deep Residual Learning for Image Recognition2016
- A Scheduling Framework for Spatial Architectures Across Multiple Constraint-Solving TheoriesACM Transactions on Programming Languages and Systems, 2014
- Halide2013
- Polyhedral parallel code generation for CUDAACM Transactions on Architecture and Code Optimization, 2013
- isl: An Integer Set Library for the Polyhedral Model2010
- A practical automatic polyhedral parallelizer and locality optimizer2008
- A set of level 3 basic linear algebra subprogramsACM Transactions on Mathematical Software, 1990