1212

Debugging GPU stream programs through automatic dataflow recording and visualization

Qiming Hou,Kun Zhou,Baining Guo
Tsinghua University
ACM Transactions on Graphics (TOG) – Proceedings of ACM SIGGRAPH Asia 2009, Vol. 28, Issue 5, December 2009

@article{hou2009debugging,

   title={Debugging GPU stream programs through automatic dataflow recording and visualization},

   author={Hou, Q. and Zhou, K. and Guo, B.},

   journal={ACM Transactions on Graphics (TOG)},

   volume={28},

   number={5},

   pages={1–11},

   issn={0730-0301},

   year={2009},

   publisher={ACM}

}

Download Download (PDF)   View View   Source Source   

1821

views

We present a novel framework for debugging GPU stream programs through automatic dataflow recording and visualization. Our debugging system can help programmers locate errors that are common in general purpose stream programs but very difficult to debug with existing tools. A stream program is first compiled into an instrumented program using a compiler. This instrumenting compiler automatically adds to the original program dataflow recording code that saves the information of all GPU memory operations into log files. The resulting stream program is then executed on the GPU. With dataflow recording, our debugger automatically detects common memory errors such as out-of-bound access, uninitialized data access, and race conditions — these errors are extremely difficult to debug with existing tools. When the instrumented program terminates, either normally or due to an error, a dataflow visualizer is launched and it allows the user to examine the memory operation history of all threads and values in all streams. Thus the user can analyze error sources by tracing through relevant threads and streams using the recorded dataflow. A key ingredient of our debugging framework is the GPU interrupt, a novel mechanism that we introduce to support CPU function calls from inside GPU code. We enable interrupts on the GPU by designing a specialized compilation algorithm that translates these interrupts into GPU kernels and CPU management code. Dataflow recording involving disk I/O operations can thus be implemented as interrupt handlers. The GPU interrupt mechanism also allows the programmer to discover errors in more active ways by developing customized debugging functions that can be directly used in GPU code. As examples we show two such functions: assert for data verification and watch for visualizing intermediate results.
No votes yet.
Please wait...

* * *

* * *

HGPU group © 2010-2024 hgpu.org

All rights belong to the respective authors

Contact us: