GPUVerify with Barrier Invariants

GPUVerify is a tool for verifying race- and divergence-freedom of OpenCL and CUDA kernels. Our OOPSLA 2013 submission presents an extension to GPUVerify for reasoning about barriers using Barrier Invariants. This allows us to verify data-dependent GPU kernels.

In the paper we present a detailed case-study of a data-dependent stream-compaction kernel, as well as a detailed discussion of the Blelloch prefix sum algorithm and two further prefix sum algorithms (Brent Kung and Kogge Stone). For reproducibility, we give binaries and code for our toolchain and experiments.

Contents

Files

gpuverify.ova (md5:bfab540c8008784a95cd62d3fde8cefc) is a VM image (Ubuntu 13.04 32-bit) that can be run with VirtualBox. It contains the GPUVerify toolchain as well as the experiment code and scripts.

Getting Started Guide

VirtualBox

Install VirtualBox if you do not have a local version.

Importing the VM

Run VirtualBox and select File > Import Application and select "gpuverify.ova".

Check the VM settings then select "Import". This will take a few minutes. When the VM has imported, you will see a screen like the following.

import-step-2

Running the VM

In the main window "Oracle VM VirtualBox Manager" select the "gpuverify" VM and select "Start". When the VM boots, login with the following details: username sand and password oopsla13. Note that this will drop you into a shell (there will be no GUI).

Check the VM

After logging in, inside the shell, please make sure that which gpuverify returns /home/sand/build/gpuverify/gpuverify and that the directory $HOME/oopsla13 exists.

shell

Step-by-Step Instructions

Inside $HOME/oopsla13 are five directories that correspond to the experiments and results shown in the paper.

Each directory is self-contained and has a README.txt that details the files, claims and instructions for reproducing the results given in the paper. The recommended order for evaluating the experiments is the one given above.

Further details

Each kernel in the experiments (except for 1-compact, which is expected to fail) has a preprocessor macro FORCE_FAIL that if defined will cause an assertion failure. This demonstrates that the test is not verifying vacuously. You can test this by adding the flag -DFORCE_FAIL to the command suggested by the README.txt. Or by editing the kernel directly and adding a false assertion, e.g., __assert(false).

More example kernels can be found on the GPUVerify documentation and tutorial pages.

Contact

This artifact was prepared by Nathan Chong (nyc04@imperial.ac.uk)