Compiling Python to a hybrid execution environment

  • Authors:
  • Rahul Garg;José Nelson Amaral

  • Affiliations:
  • McGill University;University of Alberta

  • Venue:
  • Proceedings of the 3rd Workshop on General-Purpose Computation on Graphics Processing Units
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

A new compilation framework enables the execution of numerical-intensive applications, written in Python, on a hybrid execution environment formed by a CPU and a GPU. This compiler automatically computes the set of memory locations that need to be transferred to the GPU, and produces the correct mapping between the CPU and the GPU address spaces. Thus, the programming model implements a virtual shared address space. This framework is implemented as a combination of unPython, an ahead-of-time compiler from Python/NumPy to the C programming language, and jit4GPU, a just-in-time compiler from C to the AMD CAL interface. Experimental evaluation demonstrates that for some benchmarks the generated GPU code is 50 times faster than generated OpenMP code. The GPU performance also compares favorably with optimized CPU BLAS code for single-precision computations in most cases.