The demand of computational power on every kind of device, from low-cost processors to High Performance Computing, is continuously growing.Approximate computing has seen significant interest as a design philosophy oriented to performance and energy efficiency. In precision tuning, accuracy is traded in favor of performance and energy by employing less precise data types, such as fixed-point instead of floating-point. Thanks to the advantages that it brings, precision tuning is increasingly being used in many application areas, exploiting multiple data types for number representation, each one with its own strengths.However, the current state-of-the-art does not consider the possibility of optimizing mathematical functions whose computation is usually offloaded to a library.In this work, we extend a precision-tuning framework to perform tuning of trigonometric functions. We developed a new kind of mathematical function library, which is parameterizable at compile-time depending on the data type and works natively in the fixed point numeric representation.Our approach, which we test on two microcontrollers with different architectures, achieves a speedup of up to 282%, and energy savings up to 60%, with a negligible cost in terms of error in the results.We also extend a precision-tuning framework mixing precision capabilities to support new data types.This was possible developing a new algorithm to choose which data type allocate and changing the generation procedures.We tested it against the Polybench benchmark suite to prove the proposed solution's effectiveness.

La richiesta di capacità di elaborazione dei dati stacresendo su ogni tipo di dispositivo siano processori a basso costo o grandi centri di elaborazione, l'approximate computing sta suscitando sempre più interesse come paradigma di progettazione orientato sia al risparmio energetico sia alle prestazioni. Nel precision tuning, l'accuratezza della computazione è ridotta in favore di maggiori prestazioni e minor consumi. Tutto questo è possibile grazie alla possibilità di cambiare i tipi dei dati utilizzati, pre esempio da floating-point a fixed-point. Per queste ragioni il precision tuning sta venendo sempre più adottato, per poter sfruttare a pieno tutti i tipi di rappresentazione possibili e tutti i loro punti di forza.Lo stato dell'arte però non considera la possibilità di ottimizzare le librerie matematiche che spesso vengono calcolate da librerie esterne.In questo lavoro abbiamo esteso un framework per il precision tuning affinchè fosse ingrado di calcolare nativamente le funzione trigonometriche.Abbiamo quindi sviluppato un nuovo tipo di approccio alle librerie matematiche, totalmente parametrizzabile, capace di lavorare a compile-time generando codice pensato appositamente per i fixed point.Il nostro approccio è stato testato su due micocontrollori differenti aventi differenti tipi di architetture. Lo speedup massimo ha raggiunto i 282% con un rispormio energetico del 60% e trascurabili costi in termini di errore generato.Abbiamo inoltre esteso lo stesso framework di precision tuning per supportare nuovi tipi di dato.Per raggiungere questo obbiettivo abbiamo modificato gli algorittmi di selezione e di generazione del codice.Infine abbiamo testato l'efficacia di questi algoritmi sulla suite Polybench.

Precision tuning of mathematically intensive programs : a comparative study between fixed point and floating point representations

MAGNANI, GABRIELE
2020/2021

Abstract

The demand of computational power on every kind of device, from low-cost processors to High Performance Computing, is continuously growing.Approximate computing has seen significant interest as a design philosophy oriented to performance and energy efficiency. In precision tuning, accuracy is traded in favor of performance and energy by employing less precise data types, such as fixed-point instead of floating-point. Thanks to the advantages that it brings, precision tuning is increasingly being used in many application areas, exploiting multiple data types for number representation, each one with its own strengths.However, the current state-of-the-art does not consider the possibility of optimizing mathematical functions whose computation is usually offloaded to a library.In this work, we extend a precision-tuning framework to perform tuning of trigonometric functions. We developed a new kind of mathematical function library, which is parameterizable at compile-time depending on the data type and works natively in the fixed point numeric representation.Our approach, which we test on two microcontrollers with different architectures, achieves a speedup of up to 282%, and energy savings up to 60%, with a negligible cost in terms of error in the results.We also extend a precision-tuning framework mixing precision capabilities to support new data types.This was possible developing a new algorithm to choose which data type allocate and changing the generation procedures.We tested it against the Polybench benchmark suite to prove the proposed solution's effectiveness.
CATTANEO, DANIELE
CHERUBIN, STEFANO
ING - Scuola di Ingegneria Industriale e dell'Informazione
9-giu-2021
2020/2021
La richiesta di capacità di elaborazione dei dati stacresendo su ogni tipo di dispositivo siano processori a basso costo o grandi centri di elaborazione, l'approximate computing sta suscitando sempre più interesse come paradigma di progettazione orientato sia al risparmio energetico sia alle prestazioni. Nel precision tuning, l'accuratezza della computazione è ridotta in favore di maggiori prestazioni e minor consumi. Tutto questo è possibile grazie alla possibilità di cambiare i tipi dei dati utilizzati, pre esempio da floating-point a fixed-point. Per queste ragioni il precision tuning sta venendo sempre più adottato, per poter sfruttare a pieno tutti i tipi di rappresentazione possibili e tutti i loro punti di forza.Lo stato dell'arte però non considera la possibilità di ottimizzare le librerie matematiche che spesso vengono calcolate da librerie esterne.In questo lavoro abbiamo esteso un framework per il precision tuning affinchè fosse ingrado di calcolare nativamente le funzione trigonometriche.Abbiamo quindi sviluppato un nuovo tipo di approccio alle librerie matematiche, totalmente parametrizzabile, capace di lavorare a compile-time generando codice pensato appositamente per i fixed point.Il nostro approccio è stato testato su due micocontrollori differenti aventi differenti tipi di architetture. Lo speedup massimo ha raggiunto i 282% con un rispormio energetico del 60% e trascurabili costi in termini di errore generato.Abbiamo inoltre esteso lo stesso framework di precision tuning per supportare nuovi tipi di dato.Per raggiungere questo obbiettivo abbiamo modificato gli algorittmi di selezione e di generazione del codice.Infine abbiamo testato l'efficacia di questi algoritmi sulla suite Polybench.
File allegati
File Dimensione Formato  
Precision Tuning of Mathematically Intensive Programs: a comparative study between fixed point and floating point representations.pdf

accessibile in internet per tutti

Dimensione 1.62 MB
Formato Adobe PDF
1.62 MB Adobe PDF Visualizza/Apri

I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10589/176006