Automated Synthesis of Target-Dependent Programs for Polynomial Evaluation in Fixed-Point Arithmetic

The design of both fast and numerically accurate programs is a real challenge. Thus, the CGPE tool was introduced to assist programmers in synthesizing fast and numerically certified codes in fixed-point arithmetic for the particular case of polynomial evaluation. For performance purposes, this tool produces programs using exclusively unsigned arithmetic and addition/subtraction or multiplication operations, thus requiring some constraints on the fixed-point operands. These choices are well-suited when dealing with the implementation of certain mathematical functions, however they prevent from tackling a broader class of polynomial evaluation problems. In this paper, we first expose a rigorous arithmetic model for CGPE that takes into account signed arithmetic. Then, in order to make the most out of advanced instructions, we enhance this tool with a multi-criteria instruction selection module. This allows us to optimize the generated codes according to different criteria, like operation count, evaluation latency, or accuracy. Finally, we illustrate this technique on operation count, and we show that it yields an average reduction of up to 22.3% of the number of operations in the synthesized codes of some functions. We also explicit practical examples to show the impact of using accuracy based rather than latency based instruction selection.

[1]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[2]  David Seal,et al.  ARM Architecture Reference Manual , 2001 .

[3]  Christophe Mouilleron,et al.  Automatic Generation of Fast and Certified Code for Polynomial Evaluation , 2011, 2011 IEEE 20th Symposium on Computer Arithmetic.

[4]  Peter Tang,et al.  The Computation of Transcendental Functions on the IA-64 Architecture , 1999 .

[5]  Sylvie Boldo,et al.  Preuves formelles en arithmétiques à virgule flottante , 2004 .

[6]  James Demmel,et al.  IEEE Standard for Floating-Point Arithmetic , 2008 .

[7]  Guillaume Revy,et al.  Implementation of binary floating-point arithmetic on embedded integer processors - Polynomial evaluation-based algorithms and certified code generation , 2009 .

[8]  David Ryan Koes,et al.  Near-optimal instruction selection on dags , 2008, CGO '08.

[9]  Markus Püschel,et al.  Automatic generation of implementations for DSP transforms on fused multiply-add architectures , 2004, 2004 IEEE International Conference on Acoustics, Speech, and Signal Processing.

[10]  Markus Püschel,et al.  Mechanical Derivation of Fused Multiply–Add Algorithms for Linear Transforms , 2007, IEEE Transactions on Signal Processing.

[11]  Dong-U Lee,et al.  Optimized Custom Precision Function Evaluation for Embedded Processors , 2009, IEEE Transactions on Computers.

[12]  Thibault Hilaire,et al.  Sum-of-products evaluation schemes with fixed-point arithmetic, and their application to IIR filter implementation , 2012, Proceedings of the 2012 Conference on Design and Architectures for Signal and Image Processing.

[13]  Christophe Mouilleron,et al.  Efficient computation with structured matrices and arithmetic expressions. (Calcul efficace avec des matrices structurées et des expressions arithmétiques) , 2011 .

[14]  Guillaume Melquiond,et al.  De l'arithmétique d'intervalles à la certification de programmes. (From interval arithmetic to program verification) , 2006 .

[15]  David Padua,et al.  Encyclopedia of Parallel Computing , 2011 .

[16]  Fabrice Rouillier,et al.  Motivations for an Arbitrary Precision Interval Arithmetic and the MPFI Library , 2005, Reliab. Comput..

[17]  Matthieu Martel Program transformation for numerical precision , 2009, PEPM '09.

[18]  Christoph Quirin Lauter Arrondi correct de fonctions mathématiques : fonctions univariées et bivariées, certification et automatisation , 2008 .

[19]  Chao Wang,et al.  An SMT Based Method for Optimizing Arithmetic Computations in Embedded Software Code , 2013, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems.

[20]  Randy Yates,et al.  Fixed-Point Arithmetic: An Introduction , 2013 .

[21]  Daniel Ménard,et al.  Floating-to-Fixed-Point Conversion for Digital Signal Processors , 2006, EURASIP J. Adv. Signal Process..

[22]  Matthieu Martel Enhancing the implementation of mathematical formulas for fixed-point and floating-point arithmetics , 2009, Formal Methods Syst. Des..