Learning to compile smartly for program size reduction
- URL: http://arxiv.org/abs/2301.05104v1
- Date: Mon, 9 Jan 2023 16:42:35 GMT
- Title: Learning to compile smartly for program size reduction
- Authors: Youwei Liang, Kevin Stone, Ali Shameli, Chris Cummins, Mostafa
Elhoushi, Jiadong Guo, Benoit Steiner, Pengtao Xie, Hugh Leather, Yuandong
Tian
- Abstract summary: We propose a novel approach that learns a policy to select passes for program size reduction.
Our approach uses a search mechanism that helps identify useful pass sequences and a GNN with customized attention that selects the optimal sequence to use.
- Score: 35.58682369218936
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Compiler optimization passes are an important tool for improving program
efficiency and reducing program size, but manually selecting optimization
passes can be time-consuming and error-prone. While human experts have
identified a few fixed sequences of optimization passes (e.g., the Clang -Oz
passes) that perform well for a wide variety of programs, these sequences are
not conditioned on specific programs. In this paper, we propose a novel
approach that learns a policy to select passes for program size reduction,
allowing for customization and adaptation to specific programs. Our approach
uses a search mechanism that helps identify useful pass sequences and a GNN
with customized attention that selects the optimal sequence to use. Crucially
it is able to generalize to new, unseen programs, making it more flexible and
general than previous approaches. We evaluate our approach on a range of
programs and show that it leads to size reduction compared to traditional
optimization techniques. Our results demonstrate the potential of a single
policy that is able to optimize many programs.
Related papers
- Genetic-based Constraint Programming for Resource Constrained Job
Scheduling [5.068093754585243]
Resource constrained job scheduling is a hard computation optimisation problem that originates in the mining industry.
Off-the-shelf solutions cannot solve this problem satisfactorily in reasonable timeframes.
This paper proposes a genetic programming algorithm to discover efficient search strategies of constraint programming.
arXiv Detail & Related papers (2024-02-01T09:57:38Z) - Large Language Models as Optimizers [106.52386531624532]
We propose Optimization by PROmpting (OPRO), a simple and effective approach to leverage large language models (LLMs) as prompts.
In each optimization step, the LLM generates new solutions from the prompt that contains previously generated solutions with their values.
We demonstrate that the best prompts optimized by OPRO outperform human-designed prompts by up to 8% on GSM8K, and by up to 50% on Big-Bench Hard tasks.
arXiv Detail & Related papers (2023-09-07T00:07:15Z) - Learning from Self-Sampled Correct and Partially-Correct Programs [96.66452896657991]
We propose to let the model perform sampling during training and learn from both self-sampled fully-correct programs and partially-correct programs.
We show that our use of self-sampled correct and partially-correct programs can benefit learning and help guide the sampling process.
Our proposed method improves the pass@k performance by 3.1% to 12.3% compared to learning from a single reference program with MLE.
arXiv Detail & Related papers (2022-05-28T03:31:07Z) - Improved Learning Bounds for Branch-and-Cut [98.92725321081994]
Branch-and-cut is the most widely used algorithm for solving integer programs.
An increasingly popular approach is to use machine learning to tune these parameters.
In this paper, we prove sample guarantees for this procedure.
arXiv Detail & Related papers (2021-11-18T04:07:29Z) - Learning to Superoptimize Real-world Programs [79.4140991035247]
We propose a framework to learn to superoptimize real-world programs by using neural sequence-to-sequence models.
We introduce the Big Assembly benchmark, a dataset consisting of over 25K real-world functions mined from open-source projects in x86-64 assembly.
arXiv Detail & Related papers (2021-09-28T05:33:21Z) - Searching for More Efficient Dynamic Programs [61.79535031840558]
We describe a set of program transformations, a simple metric for assessing the efficiency of a transformed program, and a search procedure to improve this metric.
We show that in practice, automated search can find substantial improvements to the initial program.
arXiv Detail & Related papers (2021-09-14T20:52:55Z) - Generating Adversarial Computer Programs using Optimized Obfuscations [43.95037234252815]
We investigate principled ways to adversarially perturb a computer program to fool such learned models.
We use program obfuscations, which have conventionally been used to avoid attempts at reverse engineering programs.
We show that our best attack proposal achieves a $52%$ improvement over a state-of-the-art attack generation approach.
arXiv Detail & Related papers (2021-03-18T10:47:15Z) - Software Pipelining for Quantum Loop Programs [1.1878820609988696]
We present a software pipelining exploiting instruction-level parallelism in quantum loop programs.
The method is then evaluated on some test cases, including popular applications like QAOA, and compared with several baseline results.
This is the first step towards optimization of a quantum program with such loop control flow as far as we know.
arXiv Detail & Related papers (2020-12-23T14:27:05Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.