Heuristiky využívající strojového učení pro GraalVM Native Image
Loading...
Date
Authors
Kender, Tomáš
Advisor
Referee
Mark
C
Journal Title
Journal ISSN
Volume Title
Publisher
Vysoké učení technické v Brně. Fakulta informačních technologií
ORCID
Abstract
Důležitou součástí optimalizace kódu jsou volání metod. Každé volání metody má navíc výpočetní režii, které se lze vyhnout inlinováním, tj. nahrazením volání metody tělem metody. Tato práce se zaměřuje na vylepšení heuristiky používané k inlinování metod po mocí strojového učení v nástroji Native Image, který je součástí sady nástrojů GraalVM. Za tímto účelem optimalizuje vnitřnou reprezentaci kódu pomocí neuronových sítí za ložených na grafu. K trénování těchto sítí jsme navrhli kódové řešení inspirované ge netickými algoritmy. Toto řešení nasazuje vygenerované modely, vyhodnocuje je pomocí srovnávacího testu a nejlepší modely z aktuální generace používá jako referenční pro bu doucí generace modelů. Trénujeme a testujeme dvě varianty architektur modelů, jedna je tradiční neuronová síť s dopředným posuvem a druhá je konvoluční grafová síť. Pro každý typ ověřujeme nejlepší sítové konfigurace na nové sadě scénářů, než která byla použita pro trénování.
An important part of code optimization is method calls. Each call of a method has an extra computing overhead, which can be avoided by inlining, i.e., replacing the method call with the method body. This thesis is focused on improving the heuristic used to inline methods by the use of machine learning in Native Image, which is a part of the GraalVM toolkit. To achieve this, it optimizes the intermediate representation of the code with graph-based neural networks. To train these networks, we designed a pipeline inspired by genetic algorithms. The pipeline deploys the models it has generated, evaluates them by benchmarking them, and uses the best models as reference for future generations of models. Two variants of model architectures are trained and tested, one is a traditional feedforward neural network and one a convolutional graph network. For each type, we validate the best performing network configurations on a different set of scenarios than the one used for training.
An important part of code optimization is method calls. Each call of a method has an extra computing overhead, which can be avoided by inlining, i.e., replacing the method call with the method body. This thesis is focused on improving the heuristic used to inline methods by the use of machine learning in Native Image, which is a part of the GraalVM toolkit. To achieve this, it optimizes the intermediate representation of the code with graph-based neural networks. To train these networks, we designed a pipeline inspired by genetic algorithms. The pipeline deploys the models it has generated, evaluates them by benchmarking them, and uses the best models as reference for future generations of models. Two variants of model architectures are trained and tested, one is a traditional feedforward neural network and one a convolutional graph network. For each type, we validate the best performing network configurations on a different set of scenarios than the one used for training.
Description
Keywords
Java , GraalVM , kompilátor , function inlining , Torch , graf , neuronová síť , optimalizace , Java , GraalVM , compiler , function inlining , Torch , graph , neural network , optimization
Citation
KENDER, T. Heuristiky využívající strojového učení pro GraalVM Native Image [online]. Brno: Vysoké učení technické v Brně. Fakulta informačních technologií. 2025.
Document type
Document version
Date of access to the full text
Language of document
en
Study field
Kybernetická bezpečnost
Comittee
Mgr. Kamil Malinka, Ph.D. (člen)
Ing. Zbyněk Křivka, Ph.D. (člen)
Ing. Radek Hranický, Ph.D. (člen)
Ing. Matěj Grégr, Ph.D. (člen)
Dr. Ing. Petr Peringer (člen)
doc. Ing. František Zbořil, CSc. (předseda)
Date of acceptance
2025-06-24
Defence
Student nejprve prezentoval výsledky, kterých dosáhl v rámci své práce. Komise se poté seznámila s hodnocením vedoucího a posudkem oponenta práce. Student následně odpověděl na otázky oponenta a na další otázky přítomných. Komise se na základě posudku oponenta, hodnocení vedoucího, přednesené prezentace a odpovědí studenta na položené otázky rozhodla práci hodnotit stupněm C.
Result of defence
práce byla úspěšně obhájena
