1 / 14

Detecting and Exploiting Narrow Bitwidth Computations

Detecting and Exploiting Narrow Bitwidth Computations. Mihai Budiu Carnegie Mellon University mihaib@cs.cmu.edu joint work with Seth Copen Goldstein. Motivation: applications. Media processing Digital Signal Processing. FFT. Motivation: hardware. “MMX”

Albert_Lan
Download Presentation

Detecting and Exploiting Narrow Bitwidth Computations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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. Motivation: applications • Media processing • Digital Signal Processing FFT Mihai Budiu -- Narrowing bitwidths -- SOCS2

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

  4. Motivation • No programming language support • No compiler support int a; long b; int a; a = (a >> 16) & 0xf0; Mihai 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 (0or1) • bit is don’t care (x) • cannot predict bit -- don’t know (u) Mihai 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 Mihai 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) Mihai 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) . Mihai Budiu -- Narrowing bitwidths -- SOCS2

  9. Constant Propagation u00uu u001u + u0uuu Mihai Budiu -- Narrowing bitwidths -- SOCS2

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

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

  12. Circuit Reduction forReconfigurable Hardware Mihai Budiu -- Narrowing bitwidths -- SOCS2

  13. C Program Size Reduction G721 from Mediabench Mihai Budiu -- Narrowing bitwidths -- SOCS2

  14. 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) Mihai Budiu -- Narrowing bitwidths -- SOCS2

More Related