Improving OpenCL Performance by Specializing Compiler Phase Selection and Ordering

10/24/2018
by   Ricardo Nobre, et al.
0

Automatic compiler phase selection/ordering has traditionally been focused on CPUs and, to a lesser extent, FPGAs. We present experiments regarding compiler phase ordering specialization of OpenCL kernels targeting a GPU. We use iterative exploration to specialize LLVM phase orders on 15 OpenCL benchmarks to an NVIDIA GPU. We analyze the generated NVIDIA PTX code for the various versions to identify the main causes of the most significant improvements and present results of a set of experiments that demonstrate the importance of using specific phase orders. Using specialized compiler phase orders, we were able to achieve geometric mean improvements of 1.54x (up to 5.48x) and 1.65x (up to 5.7x) over PTX generated by the NVIDIA CUDA compiler from CUDA versions of the same kernels, and over execution of the OpenCL kernels compiled from source with the NVIDIA OpenCL driver, respectively. We also evaluate the use of code-features in the OpenCL kernels. More specifically, we evaluate an approach that achieves geometric mean improvements of 1.49x and 1.56x over the same OpenCL baseline, by using the compiler sequences of the 1 or 3 most similar benchmarks, respectively.

READ FULL TEXT
research
07/02/2018

Compiler Phase Ordering as an Orthogonal Approach for Reducing Energy Consumption

Compiler writers typically focus primarily on the performance of the gen...
research
07/22/2022

Fast, feature-rich weakly-compressible SPH on GPU: coding strategies and compiler choices

GPUSPH was the first implementation of the weakly-compressible Smoothed ...
research
01/15/2019

AutoPhase: Compiler Phase-Ordering for High Level Synthesis with Deep Reinforcement Learning

The performance of the code generated by a compiler depends on the order...
research
04/10/2019

Compiling a Calculus for Relaxed Memory: Practical constraint-based low-level concurrency

Crary and Sullivan's Relaxed Memory Calculus (RMC) proposed a new declar...
research
01/13/2018

A Survey on Compiler Autotuning using Machine Learning

Since the mid-1990s, researchers have been trying to use machine-learnin...
research
07/18/2022

MLGOPerf: An ML Guided Inliner to Optimize Performance

For the past 25 years, we have witnessed an extensive application of Mac...
research
08/20/2020

Static Neural Compiler Optimization via Deep Reinforcement Learning

The phase-ordering problem of modern compilers has received a lot of att...

Please sign up or login with your details

Forgot password? Click here to reset