Detecting and Exploiting Narrow Bitwidth Computations - PowerPoint PPT Presentation

About This Presentation
Title:

Detecting and Exploiting Narrow Bitwidth Computations

Description:

CPU support for narrow widths. Reconfigurable hardware. Motivation: hardware ... Mihai Budiu -- Narrowing bitwidths -- SOCS2. 4. No programming language support ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 15
Provided by: Mihai49
Learn more at: http://www.cs.cmu.edu
Category:

less

Transcript and Presenter's Notes

Title: Detecting and Exploiting Narrow Bitwidth Computations


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

2
Motivation applications
  • Media processing
  • Digital Signal Processing

FFT
3
Motivation hardware
  • MMX
  • CPU support for narrow widths
  • Reconfigurable hardware






b
a
(a 0xf) (b 0x18)
4
Motivation
  • No programming language support
  • No compiler support

int a long b
int a a (a gtgt 16) 0xf0
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 dont care (x)
  • cannot predict bit -- dont know (u)

6
Why?
  • You dont have to implement
  • dont care bits
  • constant bits
  • This may enable you to exploit hardware more
    efficiently, increasing performance

7
The Type Inference
1. Sign inference 2. Width inference (forward) 3.
Width inference (backward) 4. Constant
propagation (forward) 5. Dont care discovery
(backward)
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(n2 w)

.
9
Constant Propagation
u00uu
u001u

u0uuu
10
Dont Care Propagation
xxuuu
xxuuu
xxuuu
In

Out
xxuux
xxuux
  • lsb out bit from lsb in bit
  • msb out bit from all in bits

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.
12
Circuit Reduction forReconfigurable Hardware
13
Circuit Reduction for Reconfigurable Hardware--
after synthesis --
14
C Program Size Reduction
G721 from Mediabench
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)
Write a Comment
User Comments (0)
About PowerShow.com