Automatic Matching of Legacy Code to Heterogeneous APIs: An Idiomatic Approach

Ginsbach, P., Remmelg, T., Steuwer, M. , Bodin, B., Dubach, C. and O’Boyle, M. F.P. (2018) Automatic Matching of Legacy Code to Heterogeneous APIs: An Idiomatic Approach. In: 23rd ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS'18), Williamsburg, VA, USA, 24-28 Mar 2018, pp. 139-153. ISBN 9781450349116 (doi: 10.1145/3173162.3173182)

[img]
Preview
Text
156406.pdf - Accepted Version

856kB

Abstract

Heterogeneous accelerators often disappoint. They provide the prospect of great performance, but only deliver it when using vendor specific optimized libraries or domain specific languages. This requires considerable legacy code modifications, hindering the adoption of heterogeneous computing. This paper develops a novel approach to automatically detect opportunities for accelerator exploitation. We focus on calculations that are well supported by established APIs: sparse and dense linear algebra, stencil codes and generalized reductions and histograms. We call them idioms and use a custom constraint-based Idiom Description Language (IDL) to discover them within user code. Detected idioms are then mapped to BLAS libraries, cuSPARSE and clSPARSE and two DSLs: Halide and Lift. We implemented the approach in LLVM and evaluated it on the NAS and Parboil sequential C/C++ benchmarks, where we detect 60 idiom instances. In those cases where idioms are a significant part of the sequential execution time, we generate code that achieves 1.26× to over 20× speedup on integrated and external GPUs.

Item Type:Conference Proceedings
Additional Information:This work was supported in part by the EPSRC Centre for Doctoral Training in Pervasive Parallelism, funded by the UK Engineering and Physical Sciences Research Council (grant EP/L01503X/1) and the University of Edinburgh. Some of the hardware used for this research was donated by the NVIDIA Corporation.
Status:Published
Refereed:Yes
Glasgow Author(s) Enlighten ID:Steuwer, Dr Michel
Authors: Ginsbach, P., Remmelg, T., Steuwer, M., Bodin, B., Dubach, C., and O’Boyle, M. F.P.
College/School:College of Science and Engineering > School of Computing Science
ISSN:0362-1340
ISBN:9781450349116
Copyright Holders:Copyright © 2018 The Authors
Publisher Policy:Reproduced in accordance with the copyright policy of the publisher

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