一句话:提出 AuCS,首个在 LLVM 级对 CUDA 内核自动插入同步屏障的通用框架,可处理数据竞争、屏障分歧与冗余屏障。
CUDA 是通用 GPU 计算的主流并行编程模型,但其复杂的并行执行机制和编程实践使同步成为程序员的重大挑战。本文提出 AuCS,这是首个面向 CUDA 内核函数自动实现同步的通用框架。AuCS 以语义保持的方式变换 LLVM 级 CUDA 程序控制流图,以探索可能的屏障函数插入位置,并进一步设计机制在多种错误同步场景中正确放置屏障函数,包括数据竞争、屏障分歧与冗余屏障。为了评估有效性与效率,作者进行了大量实验,结果表明 AuCS 能够自动处理 24 个错误同步场景中的 20 个。
While CUDA has been the most popular parallel computing platform and programming model for general purpose GPU computing, CUDA synchronization undergoes significant challenges for GPU programmers due to its intricate parallel computing mechanism and coding practices. In this paper, we propose AuCS, the first general framework to automate synchronization for CUDA kernel functions. AuCS transforms the original LLVM-level CUDA program control flow graph in a semantic-preserving manner for exploring the possible barrier function locations. Accordingly, AuCS develops mechanisms to correctly place barrier functions for automating synchronization in multiple erroneous (challenging-to-be-detected) synchronization scenarios, including data race, barrier divergence, and redundant barrier functions. To evaluate the effectiveness and efficiency of AuCS, we conduct an extensive set of experiments and the results demonstrate that AuCS can automate 20 out of 24 erroneous synchronization scenarios.
DOI 原文 ·
@inproceedings{paperbot5272,
title = {Automating CUDA Synchronization via Program Transformation},
author = {Mingyuan Wu and Lingming Zhang and Cong Liu and Shin Hwei Tan and Yuqun Zhang},
booktitle = {ASE},
year = {2019},
doi = {10.1109/ase.2019.00075}
}