In today’s world it has become of undelayable importance to reduce the amount of energy wasted in all human activities. A sector that may benefit from energy saving is information technology, with respect to the amount of energy required to perform a computation (in the broader sense of the word). In this work we investigate the feasibility of building a compiler driver that optimizes its produced code, such that when being executed on a physical machine, it will consume the least possible amount of energy. We explore the basic components needed to build such a driver, and we highlight that it is of great importance to have an accurate oracle capable of predicting the power consumption of an arbitrary program. Moreover, we note that such an oracle must be trained to the specific processor we wish to emit code for: in this work, we focus ourselves on building this specific component. We explain the design choices we made, the steps we performed to measure and profile a test processor (an ARM Cortex-M4), how we generated the test cases, and how we processed the results to build the oracle, using multiple linear regression models. Then, we assess the quality of the resulting predictor, both with usual statistical goodness indicators and by validating it with real programs, also by testing it with the experimental compiler optimization framework Taffo. We show that our predictor reached an accuracy peak of 86.21 %. In the end, we summarise all the difficulties we encountered in our example predictor building process, and we outline the requirements needed to build accurate oracles.
Nel mondo di oggi è diventato di irrimandabile importanza ridurre la quantità di energia che viene sprecata in tutte le attività umane. Un settore che può trarre beneficio dal risparmio energetico è l’informatica, riferendoci alla quantità di energia richiesta per effettuare un calcolo (nel senso più ampio del termine). In questa tesi indaghiamo la fattibilità di sviluppare un compilatore che ottimizzi il proprio codice prodotto, in modo che quando eseguito sulla macchina target, consumi la minor quantità di energia possibile. Esploriamo i componenti base necessari per costruire un simile compilatore, e sottolineiamo che è di grande importanza avere un oracolo accurato capace di predire il consumo in potenza di un programma arbitrario. Inoltre, notiamo che un simile oracolo deve essere addestrato sul specifico processore per cui vorremmo emettere codice: in questa tesi, ci concentriamo sulla costruzione di questo specifico componente. Spieghiamo le scelte di design che abbiamo fatto, i passi che abbiamo eseguito per misurare e profilare un processore di prova (un ARM Cortex-M4), come abbiamo generato i casi di test, e come abbiamo processato i risultati per costruire l’oracolo, usando modelli lineari a regressione multipla. Dopodiché, valutiamo la qualità del predittore risultante, sia con i soliti indicatori statistici di bontà sia validandolo con programmi reali, anche testandolo con il framework di ottimizzazione per compilatori sperimentale Taffo. Mostriamo che il nostro oracolo raggiunge picchi di accuratezza del 86.21 %. Infine, ricapitoliamo tutte le difficoltà che abbiamo incontrato nella costruzione del nostro predittore d’esempio, e delineiamo i requisiti necessari per costruire oracoli accurati.
A feasibility study for an energy prediction and optimization framework
BERTULLI, ALESSANDRO
2022/2023
Abstract
In today’s world it has become of undelayable importance to reduce the amount of energy wasted in all human activities. A sector that may benefit from energy saving is information technology, with respect to the amount of energy required to perform a computation (in the broader sense of the word). In this work we investigate the feasibility of building a compiler driver that optimizes its produced code, such that when being executed on a physical machine, it will consume the least possible amount of energy. We explore the basic components needed to build such a driver, and we highlight that it is of great importance to have an accurate oracle capable of predicting the power consumption of an arbitrary program. Moreover, we note that such an oracle must be trained to the specific processor we wish to emit code for: in this work, we focus ourselves on building this specific component. We explain the design choices we made, the steps we performed to measure and profile a test processor (an ARM Cortex-M4), how we generated the test cases, and how we processed the results to build the oracle, using multiple linear regression models. Then, we assess the quality of the resulting predictor, both with usual statistical goodness indicators and by validating it with real programs, also by testing it with the experimental compiler optimization framework Taffo. We show that our predictor reached an accuracy peak of 86.21 %. In the end, we summarise all the difficulties we encountered in our example predictor building process, and we outline the requirements needed to build accurate oracles.File | Dimensione | Formato | |
---|---|---|---|
2023_10_Bertulli_Executive Summary_02.pdf
accessibile in internet per tutti
Descrizione: executive summary
Dimensione
523.25 kB
Formato
Adobe PDF
|
523.25 kB | Adobe PDF | Visualizza/Apri |
2023_10_Bertulli_Tesi_01.pdf
accessibile in internet per tutti
Descrizione: testo della tesi
Dimensione
4.87 MB
Formato
Adobe PDF
|
4.87 MB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/210839