License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.ECOOP.2018.16
URN: urn:nbn:de:0030-drops-92217
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2018/9221/
Go to the corresponding LIPIcs Volume Portal


Qunaibit, Mohaned ; Brunthaler, Stefan ; Na, Yeoul ; Volckaert, Stijn ; Franz, Michael

Accelerating Dynamically-Typed Languages on Heterogeneous Platforms Using Guards Optimization

pdf-format:
LIPIcs-ECOOP-2018-16.pdf (1 MB)


Abstract

Scientific applications are ideal candidates for the "heterogeneous computing" paradigm, in which parts of a computation are "offloaded" to available accelerator hardware such as GPUs. However, when such applications are written in dynamic languages such as Python or R, as they increasingly are, things become less straightforward. The same flexibility that makes these languages so appealing to programmers also significantly complicates the problem of automatically and transparently partitioning a program's execution between a CPU and available accelerator hardware without having to rely on programmer annotations.
A common way of handling the features of dynamic languages is by introducing speculation in conjunction with guards to ascertain the validity of assumptions made in the speculative computation. Unfortunately, a single guard violation during the execution of "offloaded" code may result in a huge performance penalty and necessitate the complete re-execution of the offloaded computation. In the case of dynamic languages, this problem is compounded by the fact that a full compiler analysis is not always possible ahead of time.
This paper presents MegaGuards, a new approach for speculatively executing dynamic languages on heterogeneous platforms in a fully automatic and transparent manner. Our method translates each target loop into a single static region devoid of any dynamic type features. The dynamic parts are instead handled by a construct that we call a mega guard which checks all the speculative assumptions ahead of its corresponding static region. Notably, the advantage of MegaGuards is not limited to heterogeneous computing; because it removes guards from compute-intensive loops, the approach also improves sequential performance.
We have implemented MegaGuards along with an automatic loop parallelization backend in ZipPy, a Python Virtual Machine. The results of a careful and detailed evaluation reveal very significant speedups of an order of magnitude on average with a maximum speedup of up to two orders of magnitudes when compared to the original ZipPy performance as a baseline. These results demonstrate the potential for applying heterogeneous computing to dynamic languages.

BibTeX - Entry

@InProceedings{qunaibit_et_al:LIPIcs:2018:9221,
  author =	{Mohaned Qunaibit and Stefan Brunthaler and Yeoul Na and Stijn Volckaert and Michael Franz},
  title =	{{Accelerating Dynamically-Typed Languages on Heterogeneous Platforms Using Guards Optimization}},
  booktitle =	{32nd European Conference on Object-Oriented Programming  (ECOOP 2018)},
  pages =	{16:1--16:29},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-079-8},
  ISSN =	{1868-8969},
  year =	{2018},
  volume =	{109},
  editor =	{Todd Millstein},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{http://drops.dagstuhl.de/opus/volltexte/2018/9221},
  URN =		{urn:nbn:de:0030-drops-92217},
  doi =		{10.4230/LIPIcs.ECOOP.2018.16},
  annote =	{Keywords: Type Specialization, Guards Optimization, Automatic Heterogeneous Computing, Automatic Parallelism}
}

Keywords: Type Specialization, Guards Optimization, Automatic Heterogeneous Computing, Automatic Parallelism
Collection: 32nd European Conference on Object-Oriented Programming (ECOOP 2018)
Issue Date: 2018
Date of publication: 10.07.2018


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI