Approximate computing has seen significant interest as a design philosophy oriented to performance and energy efficiency [1]. Precision tuning is an approximate computing technique that trades off the accuracy of operations for performance and energy by employing less precise data types, such as fixed point instead of floating point. However, the current state-of-the-art does not consider the possibility of optimizing mathematical functions whose computation is usually off-loaded to a library. In this work we extend a precision-tuning framework to perform tuning of trigonometric functions as well. We developed a new mathematical function library, which is parameterizable at compile-time depending on the data type and works natively in the fixed point numeric representation. Through modification of a compiler pass, the parameterized implementations of these trigonometric functions are inserted into the program seamlessly during the precision tuning process. Our approach, which we test on two microcontrollers with different architectures, achieves a speedup of up to 180%, and energy savings up to 60%, with a negligible cost in terms of error in the results.

FixM: Code generation of fixed point mathematical functions

Cattaneo, Daniele;Chiari, Michele;Magnani, Gabriele;Fossati, Nicola;Cherubin, Stefano;Agosta, Giovanni
2021-01-01

Abstract

Approximate computing has seen significant interest as a design philosophy oriented to performance and energy efficiency [1]. Precision tuning is an approximate computing technique that trades off the accuracy of operations for performance and energy by employing less precise data types, such as fixed point instead of floating point. However, the current state-of-the-art does not consider the possibility of optimizing mathematical functions whose computation is usually off-loaded to a library. In this work we extend a precision-tuning framework to perform tuning of trigonometric functions as well. We developed a new mathematical function library, which is parameterizable at compile-time depending on the data type and works natively in the fixed point numeric representation. Through modification of a compiler pass, the parameterized implementations of these trigonometric functions are inserted into the program seamlessly during the precision tuning process. Our approach, which we test on two microcontrollers with different architectures, achieves a speedup of up to 180%, and energy savings up to 60%, with a negligible cost in terms of error in the results.
2021
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS 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/11311/1152178
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 6
  • ???jsp.display-item.citation.isi??? 1
social impact