Customized Monte Carlo Tree Search for LLVM/Polly's Composable Loop Optimization Transformations

05/10/2021
by   Jaehoon Koo, et al.
0

Polly is the LLVM project's polyhedral loop nest optimizer. Recently, user-directed loop transformation pragmas were proposed based on LLVM/Clang and Polly. The search space exposed by the transformation pragmas is a tree, wherein each node represents a specific combination of loop transformations that can be applied to the code resulting from the parent node's loop transformations. We have developed a search algorithm based on Monte Carlo tree search (MCTS) to find the best combination of loop transformations. Our algorithm consists of two phases: exploring loop transformations at different depths of the tree to identify promising regions in the tree search space and exploiting those regions by performing a local search. Moreover, a restart mechanism is used to avoid the MCTS getting trapped in a local solution. The best and worst solutions are transferred from the previous phases of the restarts to leverage the search history. We compare our approach with random, greedy, and breadth-first search methods on PolyBench kernels and ECP proxy applications. Experimental results show that our MCTS algorithm finds pragma combinations with a speedup of 2.3x over Polly's heuristic optimizations on average.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/13/2020

Autotuning Search Space for Loop Transformations

One of the challenges for optimizing compilers is to predict whether app...
research
10/22/2020

Exploring search space trees using an adapted version of Monte Carlo tree search for combinatorial optimization problems

In this article, a novel approach to solve combinatorial optimization pr...
research
09/27/2022

Efficient Non-Parametric Optimizer Search for Diverse Tasks

Efficient and automated design of optimizers plays a crucial role in ful...
research
04/06/2019

On the Representation of Partially Specified Implementations and its Application to the Optimization of Linear Algebra Kernels on GPU

Traditional optimizing compilers rely on rewrite rules to iteratively ap...
research
02/05/2020

Toward Optimal FDM Toolpath Planning with Monte Carlo Tree Search

The most widely used methods for toolpath planning in fused deposition 3...
research
01/29/2021

Optimizing αμ

αμ is a search algorithm which repairs two defaults of Perfect Informati...
research
07/16/2021

Loop Transformations using Clang's Abstract Syntax Tree

OpenMP 5.1 introduced the first loop nest transformation directives unro...

Please sign up or login with your details

Forgot password? Click here to reset