VALUE PREDICTION WITH PERCEPTRONS - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

VALUE PREDICTION WITH PERCEPTRONS

Description:

Entries in the set are scanned till tag = PC ... Considering global correlations along with local history for predictions. 10/10/09 ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 17
Provided by: ece48
Category:

less

Transcript and Presenter's Notes

Title: VALUE PREDICTION WITH PERCEPTRONS


1
VALUE PREDICTION WITH PERCEPTRONS
  • Anita Thomas

2
Objectives
  • Speculative Execution of Dependent Instructions
  • Prediction of instruction output values using
    perceptrons
  • Forwarding of predicted values to dependent
    instructions
  • Low Misprediction Rates High IPC

3
Instruction Dependences
  • Control flow dependences overcome by predicting
    direction of branches
  • Data flow dependences
  • -WAW, WAR Removed by static dynamic renaming
  • E.g. MOV R1,R2 MOV R3,R2
  • SUB R1,R2,8 SUB R2,R1,8
  • -RAW
  • E.g. MOV R1,R2
  • SUB R3,R1,8
  • Value prediction overcomes RAW dependences by
    predicting the result of an instruction

4
Value Prediction
  • Prediction
  • Predict the result of an instruction using local
    history global correlations
  • Dependent instructions execute with speculative
    input operands
  • Verification
  • After execution, parent instruction compares the
    result with its predicted value
  • In case of a misprediction, the dependent
    instructions re-execute with correct input
    operands.
  • Misprediction penalty is 1 cycle more than
    non-speculative execution is required for
    verification of the predicted value

5
Perceptrons
...
X 1
X i

1
X n
wi
w1
w0
wn
Y
  • Learns a target boolean function t(x1.xn) of n
    inputs
  • The output y of a perceptron
  • y w0 Sxiwi
  • Inputs x1-xn are bipolar
  • w0 is the bias weight of the perceptron. It
    learns the bias of the target output

6
Perceptions (Cont.)
  • Weights w1wn represent degree of correlation
    between the inputs and the output
  • (Output lt threshold OR Output gt -threshold )
    ?further training required. Prediction can be
    used only for update of weights cannot be used
    in actual execution
  • Output gt threshold ? prediction can be used
    weights updated depending on their correlation
    with the actual value
  • Can use longer history length since perceptron
    size scales linearly with number of inputs

7
Last-2 Value Predictor
  • Predictor has 2 levels Value History Table (VHT)
    Table of Perceptrons
  • VHT 4-way set associative
  • Last 2 values, value0 value1 maintained by LRU
  • Value History Pattern (vhp1,vhp2,vhp3,..,vhp n)
  • Pattern of 0 1 for last n instances of the
    instruction
  • Vhp bit 0 ? value0 Vhp bit 1 ? value1
  • n is the length of history to be considered
  • Table Of Perceptrons
  • Weights0..n - w0 is the bias weight
  • - w1..n represent correlation weights
    where n is the length of history considered

8
Last-2 Value Prediction
Table Of Perceptrons
  • Value History Table

Data Values
Tag
LRU
VHP
Decoder
Decoder
Instruction Address
Hash function
-
Predicted Date Value
w
21 MUX
Prediction Valid
9
Predictor Lookup
  • Index for VHT PC Vht-size
  • vht-size number of sets in the VHT
  • Entries in the set are scanned till tag PC
  • Index for the Perceptron Table (PC xor vhp)
    Pht-size
  • Perceptron Lookup
  • Output y w0
  • For all history bits, i 1n
  • if vhp i 1
  • y y w i
  • else
  • y y w i
  • y gt 0 ? Prediction value0 y lt 0 ?
    Prediction value1
  • Prediction is forwarded to dependent
    instructions only if
  • y gt Threshold

10
Predictor Update
  • If Resolved Output is one among existing 2 values
    in VHT
  • Bias weight w0 captures only Instruction Bias
  • Resolved Output value0 ? w0 decremented
  • Resolved Output value1 ? w0 incremented
  • Remaining Weights w1-wn capture Prediction
    correctness For all i 1- n
  • Vhp i 0 Resolved value value0 or
  • Vhp i 1 Resolved value value1
  • w i is positively correlated ? w i
    incremented
  • Vhp i 0 Resolved value value1 or
  • Vhp i 1 Resolved value value0
  • w i is negatively correlated ? w i
    decremented
  • LRU Vhp are updated in the VHT

11
Predictor Update (Cont.)
  • If Resolved Output is a new value
  • LRU value in VHT is replaced with this new value
  • If w0 indicates bias to the replaced value, bias
    is no longer valid has to be reset
  • (Lru 0 w0 lt 0) OR (Lru 1 w0 gt 0) ? w0
    0
  • All remaining weights are uncorrelated
    decremented
  • LRU Vhp are updated in the VHT

12
Stride-based Value Prediction
Any Stride/ Update value stride
Same Stride/ Update value
VHT miss/Update value
  • Switches from Transient to Steady State if the
    same stride occurs twice consecutively
  • Perceptrons can provide additional confidence
    estimation in this change from Transient to
    Steady state
  • Results are predicted only in the steady state.
    Predicts results like memory addresses that vary
    by a constant stride

Init Dont Predict
Steady Predict
Same Stride/ Update value
Transient Dont Predict
Different Stride/ Update value stride
Different Stride/ Update value stride
13
Stride-based Value Prediction
Value History Table (VHT)
Tag State Value Stride
Decoder
Instruction Address
Hash function
Predicted Date Value


w
(i)
Prediction Valid
14
Thinking Ahead
  • Use Stride Predictor for instructions that
    perform memory address computation
  • Use Last-2 value predictor for predicting memory
    register values
  • Scale Last-2 value predictor to Last-4 values by
    defining additional thresholds
  • Implement perceptrons to provide better
    confidence estimation for Stride Prediction when
    switching from Transient to Steady state
  • Considering global correlations along with local
    history for predictions

15
  • Questions???
  • Comments.
  • Suggestions.

16
  • THANK YOU !!
Write a Comment
User Comments (0)
About PowerShow.com