Pricing Python Parallelism: A Dynamic Language Cost Model for Heterogeneous Platforms

Jacob, D. , Trinder, P. and Singer, J. (2020) Pricing Python Parallelism: A Dynamic Language Cost Model for Heterogeneous Platforms. In: 16th ACM SIGPLAN International Symposium on Dynamic Languages, Virtual, USA, 17 Nov 2020, pp. 29-42. ISBN 9781450381758 (doi: 10.1145/3426422.3426979)

[img] Text
226320.pdf - Accepted Version



Execution times may be reduced by offloading parallel loop nests to a GPU. Auto-parallelizing compilers are common for static languages, often using a cost model to determine when the GPU execution speed will outweigh the offload overheads. Nowadays scientific software is increasingly written in dynamic languages and would benefit from compute accelerators. The ALPyNA framework analyses moderately complex Python loop nests and automatically JIT compiles code for heterogeneous CPU and GPU architectures. We present the first analytical cost model for auto-parallelizing loop nests in a dynamic language on heterogeneous architectures. Predicting execution time in a language like Python is extremely challenging, since aspects like the element types, size of the iteration space, and amenability to parallelization can only be determined at runtime. Hence the cost model must be both staged, to combine compile and run-time information, and lightweight to minimize runtime overhead. GPU execution time prediction must account for factors like data transfer, block-structured execution, and starvation. We show that a comparatively simple, staged analytical model can accurately determine during execution when it is profitable to offload a loop nest. We evaluate our model on three heterogeneous platforms across 360 experiments with 12 loop-intensive Python benchmark programs. The results show small misprediction intervals and a mean slowdown of just 13.6%, relative to the optimal (oracular) offload strategy.

Item Type:Conference Proceedings
Glasgow Author(s) Enlighten ID:Singer, Dr Jeremy and Jacob, Dr Dejice and Trinder, Professor Phil
Authors: Jacob, D., Trinder, P., and Singer, J.
College/School:College of Science and Engineering > School of Computing Science
Copyright Holders:Copyright © 2020 Association for Computing Machinery
Publisher Policy:Reproduced in accordance with the copyright policy of the publisher

University Staff: Request a correction | Enlighten Editors: Update this record

Project CodeAward NoProject NamePrincipal InvestigatorFunder's NameFunder RefLead Dept
190906EPSRC 2015 DTPMary Beth KneafseyEngineering and Physical Sciences Research Council (EPSRC)EP/M508056/1Research and Innovation Services
310130Capable VMsJeremy SingerEngineering and Physical Sciences Research Council (EPSRC)EP/V000349/1Computing Science