Computer Arithmetic Ar enaire project-team LIP Laboratory, CNRS, - - PowerPoint PPT Presentation

computer arithmetic
SMART_READER_LITE
LIVE PREVIEW

Computer Arithmetic Ar enaire project-team LIP Laboratory, CNRS, - - PowerPoint PPT Presentation

Focus & Challenges Contributions Future Computer Arithmetic Ar enaire project-team LIP Laboratory, CNRS, ENSL, INRIA, UCBL SymB INRIA Evaluation Seminar Paris, November 14 Ar enaire project-team Computer Arithmetic Focus &


slide-1
SLIDE 1

Focus & Challenges Contributions Future

Computer Arithmetic

Ar´ enaire project-team

LIP Laboratory, CNRS, ENSL, INRIA, UCBL SymB INRIA Evaluation Seminar – Paris, November 14

Ar´ enaire project-team Computer Arithmetic

slide-2
SLIDE 2

Focus & Challenges Contributions Future

The team, facts

Created in 1998, former head J.-M. Muller (1998-2004) 2002 change 2006 Permanent professors and researchers 7

  • 2+3

8 Permanent engineer +0.4 0.4 Temporary engineers, postdocs 1

  • 3+4

2 PhD students 4

  • 5+9

8 5 PhD awarded: 2 researchers, 1 engineer 1 temporary researcher, 1 industry 144 publications 2002-2006 (50 books/journals)

Ar´ enaire project-team Computer Arithmetic

slide-3
SLIDE 3

Focus & Challenges Contributions Future

Outline

1

Scientific focus and challenges

2

Contributions Hardware arithmetic Software operators and tools Arithmetic and Formal Proofs Algorithms and Arithmetics

3

Objectives 2007-2010

Ar´ enaire project-team Computer Arithmetic

slide-4
SLIDE 4

Focus & Challenges Contributions Future

Outline

1

Scientific focus and challenges

2

Contributions Hardware arithmetic Software operators and tools Arithmetic and Formal Proofs Algorithms and Arithmetics

3

Objectives 2007-2010

Ar´ enaire project-team Computer Arithmetic

slide-5
SLIDE 5

Focus & Challenges Contributions Future

Scientific Focus Improving Knowledge in Computer Arithmetic

Arithmetic operators Number representation

+, −, , ×, ÷, √ , ·/cst, . . .

Integers, real/complex numbers Intervals, exact computation Elementary/special functions Specific: DSP, cryptography, . . . Improving quality Performance Accuracy, reliability portability Power consumption Code size Implementation targets    Hardware: ASIC, FPGA (Verilog, VHDL, ...) Low-level: dedicated and embedded chips Software libraries (C++, Coq, Maple, ...)

Ar´ enaire project-team Computer Arithmetic

slide-6
SLIDE 6

Focus & Challenges Contributions Future

Improving knowledge in Computer Arithmetic Main challenges

Increasing machine power/problem dimensions Complex software Various target architectures/constraints Sophisticated operator algorithms

  • Guaranteeing the reliability of software-intensive systems
  • Adequacy software/hardware (ex: embedded systems)

Ar´ enaire project-team Computer Arithmetic

slide-7
SLIDE 7

Focus & Challenges Contributions Future

Scientific methodology Algorithmics, 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

Ar´ enaire project-team Computer Arithmetic

slide-8
SLIDE 8

Focus & Challenges Contributions Future

Algorithmic, specification, automatic tools Ex: Correctly rounded elementary function library

Better numerics LHC@home 36000 heterogeneous machines Fine−grain arithmetic Arithmetic and algorithms Formal proof Number 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

Ar´ enaire project-team Computer Arithmetic

slide-9
SLIDE 9

Focus & Challenges Contributions Future

Algorithmic, specification, automatic tools Our strengths

From algebra and numerical analysis to code development From hardware to software From fixed-point numbers to intervals and exact computation

Ar´ enaire project-team Computer Arithmetic

slide-10
SLIDE 10

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Outline

1

Scientific focus and challenges

2

Contributions Hardware arithmetic Software operators and tools Arithmetic and Formal Proofs Algorithms and Arithmetics

3

Objectives 2007-2010

Ar´ enaire project-team Computer Arithmetic

slide-11
SLIDE 11

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Contribution 1 Hardware arithmetic

Automatic tools for the generation of arithmetic operators Fixed-point elementary functions

Multipartite tables SMSO SmallApprox HOTBM

Floating-point operators and elementary functions

FPLibrary

Algebraic functions: ÷, √ , 1/√ ,

n

√ , . . .

DivGen

Cryptography

Modular operators Applications in encryption and signature

Ar´ enaire project-team Computer Arithmetic

slide-12
SLIDE 12

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Contribution 1 Hardware arithmetic

0.25 0.5 0.75 1 0.25 0.5 0.75 1 x f(x) 1 0.25 0.5 0.75 1 x f(x) ˜ f(X) wO . . . wO + g wO + g wO + g wO + g X wI 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,mk S′ k,mk Ak,mk Ak,mk

Target architecture Parameters Constraints Hardware operator Input function Function approximation Error analysis FPGA implementation

VHDL generation Architectural exploration Evaluation algorithm

Ar´ enaire project-team Computer Arithmetic

slide-13
SLIDE 13

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Contribution 2 Software operators and tools

Leading position on the correct rounding of elementary functions in double-precision floating-point arithmetic Meplib library, a key point for function evaluation: new methods for generating best polynomial approximations under constraints such as size, accuracy, or evaluation cost constraints Various algorithmic progress: use of fused multiply-add, error representation, range reduction, RN-coding, etc.

Ar´ enaire project-team Computer Arithmetic

slide-14
SLIDE 14

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Contribution 2 Software operators and tools

FLIP: A floating-point library for integer processors Basic arithmetic operators

±, ×, ÷, √ , fma, 1/x, 1/√ , ...

Adaptation of algorithms to the target architecture ⇓ Speed-ups from 1.25 to 4 without sacrificing accuracy ST200 embedded processors

VLIW / No hardware floating-point Multimedia applications (satellite boxes, TV cables, DVD, ...)

Control 8BR (1bit) IPU Exception Control 16x32 Mult 16x32 Mult DPU Prefetch buffer 4 set D$ 32KB Store Load Unit 64 GPR (32b) File Reg 32KB I$ Branch Br RegFile ALU ALU ALU ALU Pre−Decode 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

Ar´ enaire project-team Computer Arithmetic

slide-15
SLIDE 15

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Contribution 3 Arithmetic and formal proofs

❅ ❅ ❅ ❅ ❘

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 approximation 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 times

  • n

double ∗/ r1 = 0.5 * r0 * (3 - m * (r0 * r0)); r2 = 0.5 * r1 * (3 - m * (r1 * r1)); /∗ I t e r a t e two times

  • n

double−double ∗/ 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);

/∗ M u l t i p l y r e c i p r o c a l square root by m ∗/ Mul22(srtmh , srtml , m, 0, r4h , r4l);

Automatic proof by Gappa

Ar´ enaire project-team Computer Arithmetic

slide-16
SLIDE 16

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Contribution 3 Floating-point arithmetic and proofs

A Coq library of basic properties and algorithms in floating-point arithmetic 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.

Ar´ enaire project-team Computer Arithmetic

slide-17
SLIDE 17

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Contribution 3 Certification 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 by numerical algorithms Applications:

  • FLIP library: high confidence in the embedded code
  • CRlibm library: faster design and tighter bounds
  • CGAL library: robust geometric predicates

Ar´ enaire project-team Computer Arithmetic

slide-18
SLIDE 18

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Contribution 4 Comparing and combining arithmetics Algorithmic Complexity

algebraic model bit model

division−free polynomials integers

for linear algebra Guaranteed Enclosures

expansions with interval remainders

Taylor model arithmetic floating−point arithmetic

roundoff errors

Software development

LinBox: finite field linear algebra via floats, faster than BLAS MPFI: arbitrary precision interval arithmetic

Ar´ enaire project-team Computer Arithmetic

slide-19
SLIDE 19

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Contribution 4 Algorithmic complexity in linear algebra

Divide and conquer

Ar´ enaire project-team Computer Arithmetic

slide-20
SLIDE 20

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Contribution 4 Algorithmic complexity in linear algebra

Divide-double and conquer Hint: try to at most double the data size (or the precision) when the dimension is divided by two Application: essentially optimal computation of the inverse of an n × n polynomial matrix of degree d in O˜(n3d) operations (output size = n3d) 2000-2006 progress: reductions to matrix multiplication over the polynomials or in bit complexity

Ar´ enaire project-team Computer Arithmetic

slide-21
SLIDE 21

Focus & Challenges Contributions Future Hardware Operators Proofs Algorithms & Arithmetics

Industrial transfer

STMicroelectronics

  • STMicroelectonics and R´

egion Rhˆ

  • ne-Alpes grant
  • STMicroelectronis/Ar´

enaire contract

  • Joint implication in the Pˆ
  • le de comp´

etitivit´ e mondial Minalogic (function approximation at compile-time) Intel (correctly rounded functions) Maple (linear algebra, matrix polynomials) NIA-NASA (automatic proof)

Ar´ enaire project-team Computer Arithmetic

slide-22
SLIDE 22

Focus & Challenges Contributions Future

Outline

1

Scientific focus and challenges

2

Contributions Hardware arithmetic Software operators and tools Arithmetic and Formal Proofs Algorithms and Arithmetics

3

Objectives 2007-2010

Ar´ enaire project-team Computer Arithmetic

slide-23
SLIDE 23

Focus & Challenges Contributions Future

Challenge

New automated development approach for handling software complexity and hardware/software intrication in computer arithmetic

  • 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

Ar´ enaire project-team Computer Arithmetic

slide-24
SLIDE 24

Focus & Challenges Contributions Future

Three main directions

Arithmetics and algorithms. New algorithms for coarser

  • perators. 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 the

  • specification. Approximation/evaluation and code generation.

Proof design and check. Prototyping future compilers.

Ar´ enaire project-team Computer Arithmetic

slide-25
SLIDE 25

Focus & Challenges Contributions Future

Synthesis/compilation for computer arithmetic

Ar´ enaire project-team Computer Arithmetic