GPUVerify: A Verifier for GPU Kernels

被引:78
作者
Betts, Adam [1 ]
Chong, Nathan [1 ]
Donaldson, Alastair F. [1 ]
Qadeer, Shaz [2 ]
Thomson, Paul [1 ]
机构
[1] Univ London Imperial Coll Sci Technol & Med, Dept Comp, London SW7 2AZ, England
[2] Microsoft Res, Redmond, WA USA
关键词
Verification; GPUs; concurrency; data races; barrier synchronization;
D O I
10.1145/2398857.2384625
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present a technique for verifying race- and divergence-freedom of GPU kernels that are written in mainstream kernel programming languages such as OpenCL and CUDA. Our approach is founded on a novel formal operational semantics for GPU programming termed synchronous, delayed visibility (SDV) semantics. The SDV semantics provides a precise definition of barrier divergence in GPU kernels and allows kernel verification to be reduced to analysis of a sequential program, thereby completely avoiding the need to reason about thread interleavings, and allowing existing modular techniques for program verification to be leveraged. We describe an efficient encoding for data race detection and propose a method for automatically inferring loop invariants required for verification. We have implemented these techniques as a practical verification tool, GPUVerify, which can be applied directly to OpenCL and CUDA source code. We evaluate GPUVerify with respect to a set of 163 kernels drawn from public and commercial sources. Our evaluation demonstrates that GPUVerify is capable of efficient, automatic verification of a large number of real-world kernels.
引用
收藏
页码:113 / 131
页数:19
相关论文
共 37 条
[1]  
AMD, AMD ACC PAR PROC APP
[2]  
[Anonymous], C AMP SAMPL PROJ DOW
[3]  
[Anonymous], OPENCL SPEC VERS 1 1
[4]  
[Anonymous], 2008, TACAS
[5]  
[Anonymous], 1977, POPL
[6]  
[Anonymous], 2012, PPOPP
[7]  
[Anonymous], PLDI
[8]  
Barnett M., 2005, FMCO
[9]  
Beyer D, 2007, PLDI
[10]  
Boyer M., 2008, STMCS