一句话:提出 Swizzle Inventor,通过程序草图与自动合成器为 GPU 内核生成 swizzle 映射,获得优于专家手写 CUDA 的性能。
现代架构中,利用内存和寄存器带宽常需要 swizzle,即数据与计算到硬件资源的非平凡映射(如 shuffle)。手工编写这类程序困难且易错。Swizzle Inventor 让程序员编写省略 swizzle 的程序草图,并将 swizzle 的创建委托给自动合成器。其合成算法可扩展到真实程序,能够为 stencil 计算、矩阵转置和密码学中的有限域乘法发明新的 GPU 内核。评估表明,合成的 2D 卷积和有限域乘法内核平均比专家优化的 CUDA 内核分别快 1.5–3.2 倍和 1.1–1.7 倍。
Utilizing memory and register bandwidth in modern architectures may require swizzles --- non-trivial mappings of data and computations onto hardware resources --- such as shuffles. We develop Swizzle Inventor to help programmers implement swizzle programs, by writing program sketches that omit swizzles and delegating their creation to an automatic synthesizer. Our synthesis algorithm scales to real-world programs, allowing us to invent new GPU kernels for stencil computations, matrix transposition, and a finite field multiplication algorithm (used in cryptographic applications). The synthesized 2D convolution and finite field multiplication kernels are on average 1.5--3.2x and 1.1--1.7x faster, respectively, than expert-optimized CUDA kernels.
@inproceedings{paperbot4904,
title = {Swizzle Inventor},
author = {Phitchaya Mangpo Phothilimthana and Archibald Samuel Elliott and An Wang and Abhinav Jangda and Bastian Hagedorn and Henrik Barthels and Samuel J. Kaufman and Vinod Grover and Emina Torlak and Rastislav Bodik},
booktitle = {ASPLOS},
year = {2019},
doi = {10.1145/3297858.3304059}
}