# Exposing Errors Related to Weak Memory in GPU Applications

**Authors:** T. Sorensen, A. F. Donaldson  
**Venue:** PLDI, 2016  
**PDF:** [pldi2016.pdf](../pldi2016.pdf) | **Full Markdown:** [pldi2016.md](../markdown/pldi2016.md)

This paper presents a systematic testing environment that uses stressing and fuzzing to reveal weak memory bugs in GPU applications.

## Key Contributions

- **Novel testing environment**: Sophisticated memory stressing strategy tuned per chip using nearly half a billion micro-benchmark executions — no prior knowledge of the application required.
- **Practical bug discovery**: Evaluated on 7 GPUs x 3 Nvidia architectures x 10 CUDA applications; discovered previously unknown weak memory issues in two applications.
- **Automatic fence suggestion**: Identifies root causes and suggests fence insertions to harden applications against weak memory bugs.

## Summary

GPU applications can exhibit subtle bugs due to weak memory effects. These bugs are extremely difficult to reproduce normally. This paper provides the first practical method for systematically provoking such bugs in real GPU applications, using a carefully tuned stressing environment that makes rare weak memory behaviors occur frequently.
