Contract-Based General-Purpose GPU Programming
Department of Computer Science, ETH Zurich
arXiv:1410.6685 [cs.DC], (24 Oct 2014)
@article{2014arXiv1410.6685K,
author={Kolesnichenko}, A. and {Poskitt}, C.~M. and {Nanz}, S. and {Meyer}, B.},
title={"{Contract-Based General-Purpose GPU Programming}"},
journal={ArXiv e-prints},
archivePrefix={"arXiv"},
eprint={1410.6685},
primaryClass={"cs.DC"},
keywords={Computer Science – Distributed, Parallel, and Cluster Computing, Computer Science – Software Engineering},
year={2014},
month={oct},
adsurl={http://adsabs.harvard.edu/abs/2014arXiv1410.6685K},
adsnote={Provided by the SAO/NASA Astrophysics Data System}
}
Using GPUs as general-purpose processors has revolutionized parallel computing by offering, for a large and growing set of algorithms, massive data-parallelization on desktop machines. As an obstacle to widespread adoption, programming GPUs has remained difficult due to the need of using low-level control of the hardware to achieve good performance. This paper suggests a programming framework, SafeGPU, that aims at striking a balance between programmer productivity and performance by defining an API that makes GPU data-parallel operations accessible from within a classical object-oriented programming language. We further integrate this solution with the design-by-contract approach, which increases confidence in functional program correctness by embedding executable program specifications into the program text. We show that our API leads to modular and maintainable code that is accessible to GPGPU non-experts, while providing performance that is comparable with hand-written CUDA code. Also runtime contract checking turns out to be feasible, as the contracts can be executed on the GPU.
October 27, 2014 by hgpu