GPU-to-CPU callbacks
University of California, Davis
Euro-Par 2010 Workshops: Proceedings of the Third Workshop on UnConventional High Performance Computing (UCHPC 2010), volume 6586 of Lecture Notes in Computer Science, pages 365-372, Springer, 2010
@inproceedings{Stuart:2010:GC,
author={Jeff A. Stuart and Michael Cox and John D. Owens},
title={GPU}-to-{CPU} Callbacks},
series={Lecture Notes in Computer Science},
volume={6586},
publisher={Springer},
booktitle={Euro-Par 2010 Workshops: Proceedings of the Third Workshop on UnConventional High Performance Computing (UCHPC 2010)},
year={2011},
pages={365–372},
url={http://www.idav.ucdavis.edu/publications/print_pub?pub_id=1039},
doi={10.1007/978-3-642-21878-1_45},
month={jul},
lncsurl={http://www.springer.com/computer/communication+networks/book/978-3-642-21877-4},
acceptance={9/16 (56%)},
ucdcite={a56}
}
We present GPU-to-CPU callbacks, a new mechanism and abstraction for GPUs that offers them more independence in a heterogeneous computing environment. Specifically, we provide a method for GPUs to issue callback requests to the CPU. These requests serve as a tool for ease-of-use, future proofing of code, and new functionality. We classify the types of these requests into three categories: System calls (e.g. network and file I/O), device/host memory transfers, and CPU compute, and provide motivation as to why all are important. We show how to implement such a mechanism in CUDA using pinned system memory and discuss possible GPU-driver features to alleviate the need for polling, thus making callbacks more efficient with CPU usage and power consumption. We implement several examples demonstrating the use of callbacks for file I/O, network I/O, memory allocation, and debugging.
October 16, 2011 by hgpu