Exploitation of GPUs for the Parallelisation of Probably Parallel Legacy Code

  • Zheng Wang
  • Daniel Powell
  • Björn Franke
  • Michael O’Boyle
Conference paper

DOI: 10.1007/978-3-642-54807-9_9

Part of the Lecture Notes in Computer Science book series (LNCS, volume 8409)
Cite this paper as:
Wang Z., Powell D., Franke B., O’Boyle M. (2014) Exploitation of GPUs for the Parallelisation of Probably Parallel Legacy Code. In: Cohen A. (eds) Compiler Construction. CC 2014. Lecture Notes in Computer Science, vol 8409. Springer, Berlin, Heidelberg

Abstract

General purpose Gpus provide massive compute power, but are notoriously difficult to program. In this paper we present a complete compilation strategy to exploit Gpus for the parallelisation of sequential legacy code. Using hybrid data dependence analysis combining static and dynamic information, our compiler automatically detects suitable parallelism and generates parallel OpenCl code from sequential programs. We exploit the fact that dependence profiling provides us with parallel loop candidates that are highly likely to be genuinely parallel, but cannot be statically proven so. For the efficient Gpu parallelisation of those probably parallel loop candidates, we propose a novel software speculation scheme, which ensures correctness for the unlikely, yet possible case of dynamically detected dependence violations. Our scheme operates in place and supports speculative read and write operations. We demonstrate the effectiveness of our approach in detecting and exploiting parallelism using sequential codes from the Nas benchmark suite. We achieve an average speedup of 3.2x, and up to 99x, over the sequential baseline. On average, this is 1.42 times faster than state-of-the-art speculation schemes and corresponds to 99% of the performance level of a manual Gpu implementation developed by independent expert programmers.

Keywords

GPU OpenCL Parallelization Thread Level Speculation 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Zheng Wang
    • 1
  • Daniel Powell
    • 2
  • Björn Franke
    • 2
  • Michael O’Boyle
    • 2
  1. 1.School of Computing and CommunicationsLancaster UniversityUnited Kingdom
  2. 2.School of InformaticsUniversity of EdinburghUnited Kingdom

Personalised recommendations