{"title":"MIREncoder:基于预训练嵌入的多模态红外编码器的性能优化","authors":"Akash Dutta, Ali Jannesari","doi":"arxiv-2407.02238","DOIUrl":null,"url":null,"abstract":"One of the primary areas of interest in High Performance Computing is the\nimprovement of performance of parallel workloads. Nowadays, compilable source\ncode-based optimization tasks that employ deep learning often exploit LLVM\nIntermediate Representations (IRs) for extracting features from source code.\nMost such works target specific tasks, or are designed with a pre-defined set\nof heuristics. So far, pre-trained models are rare in this domain, but the\npossibilities have been widely discussed. Especially approaches mimicking\nlarge-language models (LLMs) have been proposed. But these have prohibitively\nlarge training costs. In this paper, we propose MIREncoder, a M}ulti-modal\nIR-based Auto-Encoder that can be pre-trained to generate a learned embedding\nspace to be used for downstream tasks by machine learning-based approaches. A\nmulti-modal approach enables us to better extract features from compilable\nprograms. It allows us to better model code syntax, semantics and structure.\nFor code-based performance optimizations, these features are very important\nwhile making optimization decisions. A pre-trained model/embedding implicitly\nenables the usage of transfer learning, and helps move away from task-specific\ntrained models. Additionally, a pre-trained model used for downstream\nperformance optimization should itself have reduced overhead, and be easily\nusable. These considerations have led us to propose a modeling approach that i)\nunderstands code semantics and structure, ii) enables use of transfer learning,\nand iii) is small and simple enough to be easily re-purposed or reused even\nwith low resource availability. Our evaluations will show that our proposed\napproach can outperform the state of the art while reducing overhead.","PeriodicalId":501291,"journal":{"name":"arXiv - CS - Performance","volume":"29 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-07-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"MIREncoder: Multi-modal IR-based Pretrained Embeddings for Performance Optimizations\",\"authors\":\"Akash Dutta, Ali Jannesari\",\"doi\":\"arxiv-2407.02238\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"One of the primary areas of interest in High Performance Computing is the\\nimprovement of performance of parallel workloads. Nowadays, compilable source\\ncode-based optimization tasks that employ deep learning often exploit LLVM\\nIntermediate Representations (IRs) for extracting features from source code.\\nMost such works target specific tasks, or are designed with a pre-defined set\\nof heuristics. So far, pre-trained models are rare in this domain, but the\\npossibilities have been widely discussed. Especially approaches mimicking\\nlarge-language models (LLMs) have been proposed. But these have prohibitively\\nlarge training costs. In this paper, we propose MIREncoder, a M}ulti-modal\\nIR-based Auto-Encoder that can be pre-trained to generate a learned embedding\\nspace to be used for downstream tasks by machine learning-based approaches. A\\nmulti-modal approach enables us to better extract features from compilable\\nprograms. It allows us to better model code syntax, semantics and structure.\\nFor code-based performance optimizations, these features are very important\\nwhile making optimization decisions. A pre-trained model/embedding implicitly\\nenables the usage of transfer learning, and helps move away from task-specific\\ntrained models. Additionally, a pre-trained model used for downstream\\nperformance optimization should itself have reduced overhead, and be easily\\nusable. These considerations have led us to propose a modeling approach that i)\\nunderstands code semantics and structure, ii) enables use of transfer learning,\\nand iii) is small and simple enough to be easily re-purposed or reused even\\nwith low resource availability. Our evaluations will show that our proposed\\napproach can outperform the state of the art while reducing overhead.\",\"PeriodicalId\":501291,\"journal\":{\"name\":\"arXiv - CS - Performance\",\"volume\":\"29 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-07-02\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Performance\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2407.02238\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Performance","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2407.02238","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
MIREncoder: Multi-modal IR-based Pretrained Embeddings for Performance Optimizations
One of the primary areas of interest in High Performance Computing is the
improvement of performance of parallel workloads. Nowadays, compilable source
code-based optimization tasks that employ deep learning often exploit LLVM
Intermediate Representations (IRs) for extracting features from source code.
Most such works target specific tasks, or are designed with a pre-defined set
of heuristics. So far, pre-trained models are rare in this domain, but the
possibilities have been widely discussed. Especially approaches mimicking
large-language models (LLMs) have been proposed. But these have prohibitively
large training costs. In this paper, we propose MIREncoder, a M}ulti-modal
IR-based Auto-Encoder that can be pre-trained to generate a learned embedding
space to be used for downstream tasks by machine learning-based approaches. A
multi-modal approach enables us to better extract features from compilable
programs. It allows us to better model code syntax, semantics and structure.
For code-based performance optimizations, these features are very important
while making optimization decisions. A pre-trained model/embedding implicitly
enables the usage of transfer learning, and helps move away from task-specific
trained models. Additionally, a pre-trained model used for downstream
performance optimization should itself have reduced overhead, and be easily
usable. These considerations have led us to propose a modeling approach that i)
understands code semantics and structure, ii) enables use of transfer learning,
and iii) is small and simple enough to be easily re-purposed or reused even
with low resource availability. Our evaluations will show that our proposed
approach can outperform the state of the art while reducing overhead.