A Deep Learning Based Cost Model for Automatic Code Optimization

04/11/2021
by   Riyadh Baghdadi, et al.
0

Enabling compilers to automatically optimize code has been a longstanding goal for the compiler community. Efficiently solving this problem requires using precise cost models. These models predict whether applying a sequence of code transformations reduces the execution time of the program. Building an analytical cost model to do so is hard in modern x86 architectures due to the complexity of the microarchitecture. In this paper, we present a novel deep learning based cost model for automatic code optimization. This model was integrated in a search method and implemented in the Tiramisu compiler to select the best code transformations. The input of the proposed model is a set of simple features representing the unoptimized code and a sequence of code transformations. The model predicts the speedup expected when the code transformations are applied. Unlike previous models, the proposed one works on full programs and does not rely on any heavy feature engineering. The proposed model has only 16 full programs. The proposed model enables Tiramisu to automatically find code transformations that match or are better than state-of-the-art compilers without requiring the same level of heavy feature engineering required by those compilers.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/08/2022

Progress Report: A Deep Learning Guided Exploration of Affine Unimodular Loop Transformations

In this paper, we present a work in progress about a deep learning based...
research
11/20/2020

AZP: Automatic Specialization for Zero Values in Gaming Applications

Recent research has shown that dynamic zeros in shader programs of gamin...
research
02/24/2021

Learning to Make Compiler Optimizations More Effective

Because loops execute their body many times, compiler developers place m...
research
10/13/2020

Autotuning Search Space for Loop Transformations

One of the challenges for optimizing compilers is to predict whether app...
research
03/09/2021

ModelingToolkit: A Composable Graph Transformation System For Equation-Based Modeling

Getting good performance out of numerical equation solvers requires that...
research
01/03/2023

Autovesk: Automatic vectorization of unstructured static kernels by graph transformations

Leveraging the SIMD capability of modern CPU architectures is mandatory ...
research
05/24/2023

Invited Paper: Initial Steps Toward a Compiler for Distributed Programs

In the Hydro project we are designing a compiler toolkit that can optimi...

Please sign up or login with your details

Forgot password? Click here to reset