Machine Learning-Driven Automatic Program Transformation to Increase Performance in Heterogeneous Architectures
Salvador Tamarit (),
Guillermo Vigueras (),
Manuel Carro () and
Julio Mariño ()
Additional contact information
Salvador Tamarit: Universitat Politècnica de València
Guillermo Vigueras: IMDEA Software Institute
Manuel Carro: IMDEA Software Institute
Julio Mariño: Universitat Politècnica de València
A chapter in Tools for High Performance Computing 2016, 2017, pp 115-140 from Springer
Abstract:
Abstract We present a program transformation approach to convert procedural code into functionally equivalent code adapted to a given platform. Our framework is based on the application of guarded transformation rules that capture semantic conditions to ensure the soundness of their application. Our goal is to determine a sequence of rule applications which transform some initial code into final code which optimizes some non-functional properties. The code to be transformed is adorned with semantic annotations, either provided by the user or by external analysis tools. These annotations give information to decide whether applying a transformation rule is or is not sound. In general, there are several rules applicable at several program points and, besides, transformation sequences do not monotonically change the optimization function. Therefore, we face a search problem that grows exponentially with the length of the transformation sequence. In our experience with even small examples, that becomes impractical very quickly. In order to effectively deal with this issue, we have adopted a machine-learning approach using classification trees and reinforcement learning. It learns from successful transformation sequences and produces encodings of strategies which can provide long-term rewards for a given characteristic, avoiding local minima. We have evaluated the proposed technique in a series of benchmarks, adapting standard C code to GPU execution via OpenCL. We have found the automatically produced code to be as efficient as hand-written code generated by an expert human programmer.
Keywords: Reinforcement Learning; Classification Tree; Transformation Rule; Program Transformation; Transformation Sequence (search for similar items in EconPapers)
Date: 2017
References: Add references at CitEc
Citations:
There are no downloads for this item, see the EconPapers FAQ for hints about obtaining it.
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:spr:sprchp:978-3-319-56702-0_7
Ordering information: This item can be ordered from
http://www.springer.com/9783319567020
DOI: 10.1007/978-3-319-56702-0_7
Access Statistics for this chapter
More chapters in Springer Books from Springer
Bibliographic data for series maintained by Sonal Shukla () and Springer Nature Abstracting and Indexing ().