Abstract
Polly is the LLVM project's polyhedral loop optimizer. Recent 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. To find the best combination of these loop transformations, we have developed a search algorithm based on Monte Carlo tree search (MCTS). The 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 breadth-first, beam, global greedy, and random search methods using PolyBench benchmarks 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.
Original language | English |
---|---|
Title of host publication | Proceedings of PMBS 2021 |
Subtitle of host publication | Performance Modeling, Benchmarking and Simulation of High Performance Computer Systems, Held in conjunction with SC 2021: The International Conference for High Performance Computing, Networking, Storage and Analysis |
Publisher | Institute of Electrical and Electronics Engineers Inc. |
Pages | 82-93 |
Number of pages | 12 |
ISBN (Electronic) | 9781665411189 |
DOIs | |
State | Published - 2021 |
Externally published | Yes |
Event | 12th International Workshop on Performance Modeling, Benchmarking and Simulation of High Performance Computer Systems, PMBS 2021 - St. Louis, United States Duration: Nov 15 2021 → … |
Publication series
Name | Proceedings of PMBS 2021: Performance Modeling, Benchmarking and Simulation of High Performance Computer Systems, Held in conjunction with SC 2021: The International Conference for High Performance Computing, Networking, Storage and Analysis |
---|
Conference
Conference | 12th International Workshop on Performance Modeling, Benchmarking and Simulation of High Performance Computer Systems, PMBS 2021 |
---|---|
Country/Territory | United States |
City | St. Louis |
Period | 11/15/21 → … |
Funding
This research was supported by the Exascale Computing Project (17-SC-20-SC), a collaborative effort of the U.S. Department of Energy Office of Science and the National Nuclear Security Administration.
Keywords
- Clang
- Polly
- autotuning
- loop optimization