LIP Laboratory, CNRS, ENSL, INRIA, UCBL · LIP Laboratory, CNRS, ENSL, INRIA, UCBL SymB INRIA...
Transcript of LIP Laboratory, CNRS, ENSL, INRIA, UCBL · LIP Laboratory, CNRS, ENSL, INRIA, UCBL SymB INRIA...
Focus & Challenges Contributions Future
Computer Arithmetic
Arenaire project-team
LIP Laboratory, CNRS, ENSL, INRIA, UCBL
SymB INRIA Evaluation Seminar – Paris, November 14
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
The team, facts
Created in 1998, former head J.-M. Muller (1998-2004)
2002 change 2006Permanent professors and researchers 7 -2+3 8Permanent engineer 0 +0.4 0.4Temporary engineers, postdocs 1 -3+4 2PhD students 4 -5+9 8
5 PhD awarded: 2 researchers, 1 engineer1 temporary researcher, 1 industry
144 publications 2002-2006 (50 books/journals)
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Outline
1 Scientific focus and challenges
2 ContributionsHardware arithmeticSoftware operators and toolsArithmetic and Formal ProofsAlgorithms and Arithmetics
3 Objectives 2007-2010
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Outline
1 Scientific focus and challenges
2 ContributionsHardware arithmeticSoftware operators and toolsArithmetic and Formal ProofsAlgorithms and Arithmetics
3 Objectives 2007-2010
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Scientific FocusImproving Knowledge in Computer Arithmetic
Arithmetic operators
Number representation+,−, ,×,÷,
√, ·/cst, . . .
Integers, real/complex numbersIntervals, exact computation
Elementary/special functions
Specific: DSP, cryptography, . . .
Improving quality
PerformanceAccuracy, reliability
portabilityPower consumption
Code size
Implementationtargets
Hardware: ASIC, FPGA (Verilog, VHDL, ...)
Low-level: dedicated and embedded chipsSoftware libraries (C++, Coq, Maple, ...)
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Improving knowledge in Computer ArithmeticMain challenges
Increasing machine power/problem dimensionsComplex software
Various target architectures/constraintsSophisticated operator algorithms
◦ Guaranteeing the reliability of software-intensive systems
◦ Adequacy software/hardware (ex: embedded systems)
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Scientific methodologyAlgorithmics, specification, automatic tools
Algorithmic, specification
Arithmetic algorithms and algorithms for arithmetic
Specification, normalization actions, properties of operators
Trade-off reliability/performance
Impact of the arithmetic choices on solving methods
Automatic tools
Code analysis and error diagnosing tools
Automatic tools : algorithm/code synthesis, automatic proof
Code optimization for performance
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Algorithmic, specification, automatic toolsEx: Correctly rounded elementary function library
Better numericsLHC@home
36000 heterogeneous machines
Fine−grainarithmetic
Arithmeticand algorithms
Formal proofNumber theory
approximation
Tools for
polynomial TMD Gappa tool Validated infnorm
CRLibm
Coq proofs
Performance Proven correct rounding
Perfect double−precision elementary functions
Normalization
IEEE−754 R
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Algorithmic, specification, automatic toolsOur strengths
From algebra and numerical analysis to code development
From hardware to software
From fixed-point numbers to intervals and exact computation
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Outline
1 Scientific focus and challenges
2 ContributionsHardware arithmeticSoftware operators and toolsArithmetic and Formal ProofsAlgorithms and Arithmetics
3 Objectives 2007-2010
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Contribution 1Hardware arithmetic
Automatic tools for the generation of arithmetic operators
Fixed-point elementary functionsMultipartite tablesSMSOSmallApproxHOTBM
Floating-point operators and elementary functionsFPLibrary
Algebraic functions: ÷,√
, 1/√
, n√
, . . .
DivGen
CryptographyModular operatorsApplications in encryption and signature
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Contribution 1Hardware arithmetic
0
0.25
0.5
0.75
1
0 0.25 0.5 0.75 1
x
f(x)
0
0
1
0 0.25 0.5 0.75 1
x
f(x)
f(X)wO
..
.
wO + g
wO + g
wO + g
wO + g
XwI
T0( )A0
A
B
A0
A1
A2
A3
B1
Bn
B2
Tn( , )
T2( , )
T1( , )
An Bn
A2 B2
A1 B1
O
X
R
O
X
R
O
X
R
Ak
B′
k
b1
.
.
.
...
...
k
Kk( )
Kk( )
Kk( ) ·
O
X
R
O
X
R
O
X
R
O
X
R
Sk,1
Sk,2
B′
k
Ak,2
Ak,1
Ak,1
Ak,2
Sk,mkS ′
k,mkAk,mk
Ak,mk
Target architecture
Parameters
Constraints
Hardware operator
Input function
Function approximationError analysis
FPGA implementation
VHDL generation
Architectural exploration
Evaluation algorithm
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Contribution 2Software operators and tools
Leading position on the correct rounding of elementaryfunctions in double-precision floating-point arithmetic
Meplib library, a key point for function evaluation: newmethods for generating best polynomial approximationsunder constraints such as size, accuracy, or evaluation costconstraints
Various algorithmic progress: use of fused multiply-add, errorrepresentation, range reduction, RN-coding, etc.
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Contribution 2Software operators and tools
FLIP: A floating-point library for integer processors
Basic arithmetic operators±,×,÷,
√, fma, 1/x , 1/
√, ...
Adaptation of algorithmsto the target architecture
⇓
Speed-ups from 1.25 to 4without sacrificing accuracy
ST200 embedded processorsVLIW / No hardware floating-point
Multimedia applications(satellite boxes, TV cables, DVD, ...)
Control
8BR(1bit)
IPUException
Control
16x32
Mult
16x32
MultDPU
Prefetch
buffer
4 set
D$
32KB
Store
Load
Unit
64
GPR
(32b)
File
Reg
32KB
I$
Branch Br RegFile
ALU ALU ALU ALU
Pre−D
ecod
e
Cluster0 Cluster
Unit
Reg’s
Impact on technology:Integration of FLIP into the industrial version of the ST200 compiler (2005)
Ongoing extension to other targets like Texas Instruments DSPs
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Contribution 3Arithmetic and formal proofs
@@
@@R
��
����
Basic arithmetic blocks
/∗ Mul12 : e r r o r−f r e e m u l t i p l i c a t i o n ∗/double c = 134217729.;up = u * c; vp = v * c;u1 = (u - up) + up;v1 = (v - vp) + vp;u2 = u - u1; v2 = v - v1;p = u * v;e = u1 * v1 - p + u1 * v2 + u2 * v1 +
u2 * v2;
/∗ Add12 : e r r o r−f r e e a d d i t i o n ∗/s = u + v;t = s - u;e = v - t;
Hand-written proof in Coq
Complete function
/∗ Compute app rox imat i on to r = 1/ s q r t (m) ∗/r0 = SQRTPOLYC0 + m * (SQRTPOLYC1 + m * (
SQRTPOLYC2 + m * (SQRTPOLYC3 + m *SQRTPOLYC4)));
/∗ I t e r a t e two t imes on doub l e ∗/r1 = 0.5 * r0 * (3 - m * (r0 * r0));r2 = 0.5 * r1 * (3 - m * (r1 * r1));
/∗ I t e r a t e two t imes on double−doub l e ∗/Mul12(r2Sqh , r2Sql , r2 , r2);Add12(r2PHr2h , r2PHr2l , r2 , 0.5 * r2);Mul12(mMr2h , mMr2l , m, r2);Mul22(mMr2Ch , mMr2Cl , mMr2h , mMr2l , r2Sqh ,
r2Sql);
MHmMr2Ch = -0.5 * mMr2Ch;MHmMr2Cl = -0.5 * mMr2Cl;Add22(r3h , r3l , r2PHr2h , r2PHr2l , MHmMr2Ch ,
MHmMr2Cl);Mul22(r3Sqh , r3Sql , r3h , r3l , r3h , r3l);Mul22(mMr3Sqh , mMr3Sql , m,0, r3Sqh , r3Sql);Mul22(r4h , r4l , r3h , r3l , 1, -0.5* mMr3Sql);
/∗ Mu l t i p l y r e c i p r o c a l squa r e r oo t by m ∗/Mul22(srtmh , srtml , m, 0, r4h , r4l);
Automatic proof by Gappa
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Contribution 3Floating-point arithmetic and proofs
A Coq library of basic properties and algorithms in floating-pointarithmetic
Motivation:
Improve confidence in proofs
Accurate yet generic hypotheses
A comprehensive basis of formal blocks to build upon
Examples:
- Argument reduction, Horner’s scheme
- Knuth’s error-free addition, use of the FMA operator
- Exotic rounding modes, etc.
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Contribution 3Certification of numerical algorithms
Verifying correctness of complex numerical algorithms is long,tedious, and error-prone, when done by hand
Objective: automate this process
Given some source code, bound values and rounding errors:Gappa
Bound truncation and approximation errors introduced bynumerical algorithms
Applications:
- FLIP library: high confidence in the embedded code
- CRlibm library: faster design and tighter bounds
- CGAL library: robust geometric predicates
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Contribution 4Comparing and combining arithmetics
Algorithmic Complexity
algebraic model
bit model
division−free
polynomials
integers
for linear algebra
Guaranteed Enclosures
expansions withinterval remainders
Taylor modelarithmetic
floating−pointarithmetic roundoff errors
Software developmentLinBox: finite field linear algebra via floats, faster than BLASMPFI: arbitrary precision interval arithmetic
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Contribution 4Algorithmic complexity in linear algebra
Divideand
conquer
Hint: try to at most double the data size (or the precision) whenthe dimension is divided by two
Application: essentially optimal computation of the inverse of ann × n polynomial matrix of degree d in O˜(n3d) operations(output size = n3d)
2000-2006 progress: reductions to matrix multiplication over thepolynomials or in bit complexity
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Contribution 4Algorithmic complexity in linear algebra
Divide-doubleand
conquer
Hint: try to at most double the data size (or the precision) whenthe dimension is divided by two
Application: essentially optimal computation of the inverse of ann × n polynomial matrix of degree d in O˜(n3d) operations(output size = n3d)
2000-2006 progress: reductions to matrix multiplication over thepolynomials or in bit complexity
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics
Industrial transfer
STMicroelectronics
-STMicroelectonics and Region Rhone-Alpes grant-STMicroelectronis/Arenaire contract-Joint implication in the Pole de competitivite mondialMinalogic (function approximation at compile-time)
Intel (correctly rounded functions)
Maple (linear algebra, matrix polynomials)
NIA-NASA (automatic proof)
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Outline
1 Scientific focus and challenges
2 ContributionsHardware arithmeticSoftware operators and toolsArithmetic and Formal ProofsAlgorithms and Arithmetics
3 Objectives 2007-2010
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Challenge
New automated development approach for handling softwarecomplexity and hardware/software intrication in computerarithmetic
- From specification to automatic proving- Diagnose and circumvent numerical errors- Expression or critical code evaluation- Higher level of programmation, algorithm synthesis- Code synthesis
Problem
Algorithm
Mathematical approach
Model
Code
Chip/Computer
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Three main directions
Arithmetics and algorithms. New algorithms for coarseroperators. Standardization actions. Function approximation,linear algebra, lattice basis reduction, global optimization.
Quality issues: specification and validation. Specification:mathematics, accuracy, performance, property to prove, etc.Algorithmic complexity of certified computation.
Synthesis of the implementation. Analysis of thespecification. Approximation/evaluation and code generation.Proof design and check. Prototyping future compilers.
Arenaire project-team Computer Arithmetic
Focus & Challenges Contributions Future
Synthesis/compilation for computer arithmetic
Arenaire project-team Computer Arithmetic