Compiler generated feedback for Large Language Models

We introduce a novel paradigm in compiler optimization powered by Large Language Models with compiler feedback to optimize the code size of LLVM assembly. The model takes unoptimized LLVM IR as input and produces optimized IR, the best optimization passes, and instruction counts of both unoptimized...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Grubisic, Dejan, Cummins, Chris, Seeker, Volker, Leather, Hugh
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title
container_volume
creator Grubisic, Dejan
Cummins, Chris
Seeker, Volker
Leather, Hugh
description We introduce a novel paradigm in compiler optimization powered by Large Language Models with compiler feedback to optimize the code size of LLVM assembly. The model takes unoptimized LLVM IR as input and produces optimized IR, the best optimization passes, and instruction counts of both unoptimized and optimized IRs. Then we compile the input with generated optimization passes and evaluate if the predicted instruction count is correct, generated IR is compilable, and corresponds to compiled code. We provide this feedback back to LLM and give it another chance to optimize code. This approach adds an extra 0.53% improvement over -Oz to the original model. Even though, adding more information with feedback seems intuitive, simple sampling techniques achieve much higher performance given 10 or more samples.
doi_str_mv 10.48550/arxiv.2403.14714
format Article
fullrecord <record><control><sourceid>arxiv_GOX</sourceid><recordid>TN_cdi_arxiv_primary_2403_14714</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2403_14714</sourcerecordid><originalsourceid>FETCH-LOGICAL-a674-423c7838917d73f66a53439c74a210793e2f1a4d2dd7745105a4169cfc8b97533</originalsourceid><addsrcrecordid>eNotzsFOwzAQBFBfOKDCB3BqfiDB9q6z8RFFFJCCeuk92trrKGraVC6g8veUwmVmTqOn1IPRFTbO6UfO5_GrsqihMkgGb5Vr5_1xnCQXgxwk84fEIonELYddkeZcdJwHueRh-OTLeJ-jTKc7dZN4Osn9fy_UZvW8aV_Lbv3y1j51JdeEJVoI1EDjDUWCVNfsAMEHQrZGkwexyTBGGyMROqMdo6l9SKHZenIAC7X8u726-2Me95y_-19_f_XDDw1EPf0</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Compiler generated feedback for Large Language Models</title><source>arXiv.org</source><creator>Grubisic, Dejan ; Cummins, Chris ; Seeker, Volker ; Leather, Hugh</creator><creatorcontrib>Grubisic, Dejan ; Cummins, Chris ; Seeker, Volker ; Leather, Hugh</creatorcontrib><description>We introduce a novel paradigm in compiler optimization powered by Large Language Models with compiler feedback to optimize the code size of LLVM assembly. The model takes unoptimized LLVM IR as input and produces optimized IR, the best optimization passes, and instruction counts of both unoptimized and optimized IRs. Then we compile the input with generated optimization passes and evaluate if the predicted instruction count is correct, generated IR is compilable, and corresponds to compiled code. We provide this feedback back to LLM and give it another chance to optimize code. This approach adds an extra 0.53% improvement over -Oz to the original model. Even though, adding more information with feedback seems intuitive, simple sampling techniques achieve much higher performance given 10 or more samples.</description><identifier>DOI: 10.48550/arxiv.2403.14714</identifier><language>eng</language><subject>Computer Science - Learning ; Computer Science - Programming Languages</subject><creationdate>2024-03</creationdate><rights>http://creativecommons.org/licenses/by/4.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,780,885</link.rule.ids><linktorsrc>$$Uhttps://arxiv.org/abs/2403.14714$$EView_record_in_Cornell_University$$FView_record_in_$$GCornell_University$$Hfree_for_read</linktorsrc><backlink>$$Uhttps://doi.org/10.48550/arXiv.2403.14714$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Grubisic, Dejan</creatorcontrib><creatorcontrib>Cummins, Chris</creatorcontrib><creatorcontrib>Seeker, Volker</creatorcontrib><creatorcontrib>Leather, Hugh</creatorcontrib><title>Compiler generated feedback for Large Language Models</title><description>We introduce a novel paradigm in compiler optimization powered by Large Language Models with compiler feedback to optimize the code size of LLVM assembly. The model takes unoptimized LLVM IR as input and produces optimized IR, the best optimization passes, and instruction counts of both unoptimized and optimized IRs. Then we compile the input with generated optimization passes and evaluate if the predicted instruction count is correct, generated IR is compilable, and corresponds to compiled code. We provide this feedback back to LLM and give it another chance to optimize code. This approach adds an extra 0.53% improvement over -Oz to the original model. Even though, adding more information with feedback seems intuitive, simple sampling techniques achieve much higher performance given 10 or more samples.</description><subject>Computer Science - Learning</subject><subject>Computer Science - Programming Languages</subject><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>GOX</sourceid><recordid>eNotzsFOwzAQBFBfOKDCB3BqfiDB9q6z8RFFFJCCeuk92trrKGraVC6g8veUwmVmTqOn1IPRFTbO6UfO5_GrsqihMkgGb5Vr5_1xnCQXgxwk84fEIonELYddkeZcdJwHueRh-OTLeJ-jTKc7dZN4Osn9fy_UZvW8aV_Lbv3y1j51JdeEJVoI1EDjDUWCVNfsAMEHQrZGkwexyTBGGyMROqMdo6l9SKHZenIAC7X8u726-2Me95y_-19_f_XDDw1EPf0</recordid><startdate>20240318</startdate><enddate>20240318</enddate><creator>Grubisic, Dejan</creator><creator>Cummins, Chris</creator><creator>Seeker, Volker</creator><creator>Leather, Hugh</creator><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20240318</creationdate><title>Compiler generated feedback for Large Language Models</title><author>Grubisic, Dejan ; Cummins, Chris ; Seeker, Volker ; Leather, Hugh</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a674-423c7838917d73f66a53439c74a210793e2f1a4d2dd7745105a4169cfc8b97533</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Computer Science - Learning</topic><topic>Computer Science - Programming Languages</topic><toplevel>online_resources</toplevel><creatorcontrib>Grubisic, Dejan</creatorcontrib><creatorcontrib>Cummins, Chris</creatorcontrib><creatorcontrib>Seeker, Volker</creatorcontrib><creatorcontrib>Leather, Hugh</creatorcontrib><collection>arXiv Computer Science</collection><collection>arXiv.org</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Grubisic, Dejan</au><au>Cummins, Chris</au><au>Seeker, Volker</au><au>Leather, Hugh</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Compiler generated feedback for Large Language Models</atitle><date>2024-03-18</date><risdate>2024</risdate><abstract>We introduce a novel paradigm in compiler optimization powered by Large Language Models with compiler feedback to optimize the code size of LLVM assembly. The model takes unoptimized LLVM IR as input and produces optimized IR, the best optimization passes, and instruction counts of both unoptimized and optimized IRs. Then we compile the input with generated optimization passes and evaluate if the predicted instruction count is correct, generated IR is compilable, and corresponds to compiled code. We provide this feedback back to LLM and give it another chance to optimize code. This approach adds an extra 0.53% improvement over -Oz to the original model. Even though, adding more information with feedback seems intuitive, simple sampling techniques achieve much higher performance given 10 or more samples.</abstract><doi>10.48550/arxiv.2403.14714</doi><oa>free_for_read</oa></addata></record>
fulltext fulltext_linktorsrc
identifier DOI: 10.48550/arxiv.2403.14714
ispartof
issn
language eng
recordid cdi_arxiv_primary_2403_14714
source arXiv.org
subjects Computer Science - Learning
Computer Science - Programming Languages
title Compiler generated feedback for Large Language Models
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-06T01%3A47%3A55IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-arxiv_GOX&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Compiler%20generated%20feedback%20for%20Large%20Language%20Models&rft.au=Grubisic,%20Dejan&rft.date=2024-03-18&rft_id=info:doi/10.48550/arxiv.2403.14714&rft_dat=%3Carxiv_GOX%3E2403_14714%3C/arxiv_GOX%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true