A Hybrid Machine Learning Model for Code Optimization
Author(s)
Hakimi, Yacine; Baghdadi, Riyadh; Challal, Yacine
Download10766_2023_758_ReferencePDF.pdf (2.690Mb)
Publisher Policy
Publisher Policy
Article is made available in accordance with the publisher's policy and may be subject to US copyright law. Please refer to the publisher's site for terms of use.
Terms of use
Metadata
Show full item recordAbstract
Abstract
The complexity of programming modern heterogeneous systems raises huge challenges. Over the past two decades, researchers have aimed to alleviate these difficulties by employing classical Machine Learning and Deep Learning techniques within compilers to optimize code automatically. This work presents a novel approach to optimize code using at the same time Classical Machine Learning and Deep Learning techniques by maximizing their benefits while mitigating their drawbacks. Our proposed model extracts features from the code using Deep Learning and then applies Classical Machine Learning to map these features to specific outputs for various tasks. The effectiveness of our model is evaluated on three downstream tasks: device mapping, optimal thread coarsening, and algorithm classification. Our experimental results demonstrate that our model outperforms previous models in device mapping with an average accuracy of 91.60% on two datasets and in optimal thread coarsening task where we are the first to achieve a positive speedup on all four platforms while achieving a comparable result of 91.48% in the algorithm classification task. Notably, our approach yields better results even with a small dataset without requiring a pre-training phase or a complex code representation, offering the advantage of reducing training time and data volume requirements.
Date issued
2023-09-22Department
Massachusetts Institute of Technology. Computer Science and Artificial Intelligence LaboratoryPublisher
Springer US
Citation
Hakimi, Yacine, Baghdadi, Riyadh and Challal, Yacine. 2023. "A Hybrid Machine Learning Model for Code Optimization."
Version: Author's final manuscript