kth.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Interfacing DSP Architecture Compiler and Reinforcement Learning Based Instruction Scheduler
KTH, School of Electrical Engineering and Computer Science (EECS).
2024 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
Ansluta DSP-arkitekturkompilator och Förstärkningslärningsbaserad Instruktionsschemaläggare (Swedish)
Abstract [en]

In modern compiler design, instruction scheduling in the compiler backend plays an important role in producing high-quality assembly code. Most existing optimizations for instruction scheduling need to be fine-tuned to adapt to different targets. Optimizing the instruction scheduling algorithm is not straightforward. The instruction scheduler has to produce high-quality schedules within the constraints of dependencies between instructions, the limitations of computational units, and physical registers. Although there have been previous studies on solving task scheduling problems using machine learning or using machine learning to guide compiler optimization, using machine learning methods to optimize instruction scheduling is still an area that needs further study. Given a pre-trained RL-based instruction scheduler, we have this question: how to design an interface that can efficiently connect the RL-based instruction scheduler to a compiler and compile radio application test programs in real-time? This master’s thesis focuses on optimizing the instruction scheduling phase in the compiler by designing an interface that connects a reinforcement learning-based scheduler to an LLVM-based compiler. In this work, we designed and implemented an interface between a reinforcement learning-based scheduler and compiler to achieve better code execution speed. We proposed a mechanism to communicate between the compiler and the reinforcement learning-based scheduler, which includes programs that control the communication between the compiler and the scheduler using a file-based methodology. We also proposed an efficient method to access data from the compiler using a custom format. We conducted experiments using this interface with benchmark programs to evaluate the code execution time. The compilation result from the system passed all the benchmark tests. It demonstrated that the interface successfully applies the RL-based instruction scheduler to the compiler and compiles radio application test programs in real-time.

Abstract [sv]

I modern kompilatordesign spelar instruktionsschemaläggning i kompilatorns backend en viktig roll för att producera högkvalitativ assemblerkod. De flesta befintliga optimeringar för instruktionsschemaläggning behöver finjusteras för att anpassas till olika mål. Optimering av instruktionsschemaläggningalgoritmen är inte enkel. instruktionsschemaläggning måste producera högkvalitativa scheman inom begränsningarna av beroenden mellan instruktioner, begränsningar av beräkningsenheter och fysiska register. Trots att det har genomförts tidigare studier om att lösa problem med uppgiftsplanering med hjälp av maskininlärning eller att använda maskininlärning för att vägleda kompilatoroptimering, är användning av maskininlärning för att optimera instruktionsschemaläggning fortfarande ett ämne som behöver studeras vidare. Med tanke på en förtränad RL-baserad instruktionsschemaläggare har vi denna fråga: hur kan vi designa ett gränssnitt som effektivt kan koppla den RL-baserade instruktionsschemaläggning till en kompilator och kompilera testprogram för radioapplikationer i realtid? Denna masteruppsats fokuserar på att optimera instruktionens schemaläggningsfas i kompilatorn genom att designa ett gränssnitt som kopplar en förstärkningsinlärningsbaserad schemaläggare till en LLVM-baserad kompilator. I detta arbete byggde vi ett gränssnitt mellan en förstärkningsinlärningsbaserad schemaläggare och kompilator för att uppnå bättre kodexekveringshastighet. Vi föreslog en mekanism för att kommunicera mellan kompilatorn och den RL-baserade schemaläggaren, som inkluderar program som styr kommunikationen mellan kompilatorn och schemaläggaren med hjälp av en filbaserad metodik. Vi föreslog också en metod för att effektivt få tillgång till data från kompilatorn med hjälp av ett anpassat format. Vi genomförde experiment på denna RL-baserad kompilator med benchmarkprogram för att utvärdera körtiden. Sammanställningsresultatet från systemet klarade alla benchmark-tester. Det visade att gränssnittet kunde tillämpa den RL-baserade instruktionsschemaläggaren på kompilatorn och kompilera testprogram för radioapplikationer i realtid.

Place, publisher, year, edition, pages
2024. , p. 61
Series
TRITA-EECS-EX ; 2024:689
Keywords [en]
Compiler Optimization, Instruction Scheduling, Interface, LLVM
Keywords [sv]
Kompilatoroptimering, Instruktionsschemaläggning, Gränssnitt, LLVM
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-356161OAI: oai:DiVA.org:kth-356161DiVA, id: diva2:1911812
External cooperation
Ericsson AB
Supervisors
Examiners
Available from: 2025-01-21 Created: 2024-11-08 Last updated: 2025-01-21Bibliographically approved

Open Access in DiVA

fulltext(1493 kB)41 downloads
File information
File name FULLTEXT01.pdfFile size 1493 kBChecksum SHA-512
975722e6640171424a73c0a618a8c103e29efb032f31a4f9bf62ce7eb7b8858b9a334f020886cfeed8ec9bc281da3571b12d3e879556991b36cbef3d98b313dd
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 41 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 783 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf