Presentation is loading. Please wait.

Presentation is loading. Please wait.

Detecting and Exploiting Narrow Bitwidth Computations Mihai Budiu Carnegie Mellon University joint work with Seth Copen Goldstein.

Similar presentations


Presentation on theme: "Detecting and Exploiting Narrow Bitwidth Computations Mihai Budiu Carnegie Mellon University joint work with Seth Copen Goldstein."— Presentation transcript:

1 Detecting and Exploiting Narrow Bitwidth Computations Mihai Budiu Carnegie Mellon University mihaib@cs.cmu.edu joint work with Seth Copen Goldstein

2 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 2 Motivation: applications Media processing Digital Signal Processing FFT

3 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 3 “MMX” CPU support for narrow widths Reconfigurable hardware Motivation: hardware + ++++ (a & 0xf) | (b & 0x18) ba

4 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 4 No programming language support No compiler support Motivation int a; long b; int a; a = (a >> 16) & 0xf0;

5 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 5 Types The type of an integer value describes: sign (signed or unsigned) width in bits information about each bit –bit is constant ( 0 or 1 ) –bit is don’t care ( x ) –cannot predict bit -- don’t know ( u )

6 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 6 Why? You don’t have to implement: –don’t care bits –constant bits This may enable you to exploit hardware more efficiently, increasing performance

7 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 7 The Type Inference 1. Sign inference 2. Width inference (forward) 3. Width inference (backward) 4. Constant propagation (forward) 5. Don’t care discovery (backward)

8 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 8 The Type Inference Algorithms (from 10000 feet) Forms of abstract interpretation I/O values are assigned types conservatively Iterate until a fixed-point is reached “Data-flow at the bit level” Low complexity O(n^2 w).

9 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 9 u0uuu + u00uu u001u Constant Propagation

10 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 10 Don’t Care Propagation + xxuuu xxuux xxuuu lsb out bit from lsb in bit msb out bit from all in bits In Out

11 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 11 Mixing + xxuux xx0uu xx01u The mixing phase just takes bitwise the best of the information provided by the two propagations. u00uu u001u xxuuu xxuux u0uuu

12 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 12 Circuit Reduction for Reconfigurable Hardware

13 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 13 Circuit Reduction for Reconfigurable Hardware -- after synthesis --

14 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 14 C Program Size Reduction G721 from Mediabench

15 10/02/99Mihai Budiu -- Narrowing bitwidths - - SOCS2 15 Conclusions Finding useless bits in a computation as a type inference problem Efficient algorithms exhibited (data-flow analysis) Big performance gain for reconfigurable hardware benchmarks (up to 95%) Effective even for C programs (e.g. 7% dynamic size reduction)


Download ppt "Detecting and Exploiting Narrow Bitwidth Computations Mihai Budiu Carnegie Mellon University joint work with Seth Copen Goldstein."

Similar presentations


Ads by Google