Wormhole branch prediction using multi-dimensional histories Jorge - - PowerPoint PPT Presentation
Wormhole branch prediction using multi-dimensional histories Jorge - - PowerPoint PPT Presentation
Wormhole branch prediction using multi-dimensional histories Jorge Albericio, Joshua San Miguel , Natalie Enright Jerger, and Andreas Moshovos 2 Motivation foreach frame: foreach object: if distance( object , p ) < threshold: { /* do
2
3
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
Motivation
3
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
Motivation
3
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
Motivation
3
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
Motivation
1 1 1 1 1 1
Multidimensional histories
4
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
1 1 1 1 1 1
Multidimensional histories
4
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3
1 1 1 1 1 1
Multidimensional histories
4
Frame 0
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
Frame 1 Frame 2 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3
1 1 1 1 1 1
Multidimensional histories
4
Frame 0
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
Frame 1 Frame 2
?
O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3
1 1 1 1 1 1
Multidimensional histories
4
Frame 0
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
Frame 1 Frame 2
?
O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3
1 1 1 1 1 1
Multidimensional histories
4
Frame 0
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
Frame 1 Frame 2 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4 O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3
1 1 1 1 1 1
Multidimensional histories
4
Frames
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4
1 1 1 1 1 1
Multidimensional histories
4
Frames
foreach frame: foreach object: if distance(object, p) < threshold: { /* do something */ }
O b j e c t O b j e c t 1 O b j e c t 2 O b j e c t 3 O b j e c t 4
Summary
- Wormhole predictor:
Side-predictor on top of ISL-TAGE
- Able to capture columns,
diagonals, and other patterns
- 3.995, 2.498, and 2.014
MPKI in the 4KB, 32KB, and unlimited competition tracks
5
Wormhole pred. ISL-TAGE
predictions
6
for j in N: for k in N: if j != k: /*Calculation*/
Detecting diagonals
6
for j in N: for k in N: if j != k: /*Calculation*/
Detecting diagonals
6
for j in N: for k in N: if j != k: /*Calculation*/
Detecting diagonals
1 1 1
6
for j in N: for k in N: if j != k: /*Calculation*/
Detecting diagonals
1 1 1
j=0 j=1 j=2
Detecting diagonals
7
1 1 1
for j in N: //Loop 1 for k in N: //Loop 2 if j != k: /*Calculation*/
j=0 j=1 j=2
Detecting diagonals
7
1 1 1
Outer loop (j) Iterations Inner loop (k) Iterations
for j in N: //Loop 1 for k in N: //Loop 2 if j != k: /*Calculation*/
Multidimensional histories
8
1 1
Outer loop (j) Iterations Inner loop (k) Iterations
for j in N: for k in N: if j != k: /*Calculation*/
Multidimensional histories
8
1 1
?
Outer loop (j) Iterations Inner loop (k) Iterations
for j in N: for k in N: if j != k: /*Calculation*/
Multidimensional histories
8
1 1
? Saturating counters
Outer loop (j) Iterations Inner loop (k) Iterations
for j in N: for k in N: if j != k: /*Calculation*/
Multidimensional histories
8
1 1
?
1
Saturating counters
Outer loop (j) Iterations Inner loop (k) Iterations
for j in N: for k in N: if j != k: /*Calculation*/
Multidimensional histories
8
1 1
?
1
0100 Saturating counters x
Outer loop (j) Iterations Inner loop (k) Iterations
for j in N: for k in N: if j != k: /*Calculation*/
Multidimensional histories
8
1 1
?
1
0100 Saturating counters x 1
Outer loop (j) Iterations Inner loop (k) Iterations
for j in N: for k in N: if j != k: /*Calculation*/
Multidimensional histories
8
1 1
?
1
0100 Saturating counters x 1
1
Outer loop (j) Iterations Inner loop (k) Iterations
for j in N: for k in N: if j != k: /*Calculation*/
Multidimensional histories
9
1 1 1
Saturating counters x
1
for j in N: for k in N: if j != k: /*Calculation*/
Outer loop (j) Iterations Inner loop (k) Iterations
Multidimensional histories
9
1 1 1
? Saturating counters x
1
for j in N: for k in N: if j != k: /*Calculation*/
Outer loop (j) Iterations Inner loop (k) Iterations
Multidimensional histories
9
1 1 1
?
1
Saturating counters x
1
for j in N: for k in N: if j != k: /*Calculation*/
Outer loop (j) Iterations Inner loop (k) Iterations
Multidimensional histories
9
1 1 1
?
1
0100 Saturating counters x
1
for j in N: for k in N: if j != k: /*Calculation*/
Outer loop (j) Iterations Inner loop (k) Iterations
Multidimensional histories
9
1 1 1
?
1
0100 Saturating counters x
1
Prediction: 1
for j in N: for k in N: if j != k: /*Calculation*/
Outer loop (j) Iterations Inner loop (k) Iterations
Multidimensional histories
9
1 1 1
?
1
0100 Saturating counters x 1
1
Prediction: 1
for j in N: for k in N: if j != k: /*Calculation*/
Outer loop (j) Iterations Inner loop (k) Iterations
Multidimensional histories
9
1 1 1
?
1
0100 Saturating counters x 1
1
Prediction: 1
for j in N: for k in N: if j != k: /*Calculation*/
Outer loop (j) Iterations Inner loop (k) Iterations
Wormhole predictor and ISL-TAGE
- On top of ISL-TAGE
(Best performer from last CBP)
- TAGE: bimodal + tagged
- Statistical corrector
- Loop predictor
10
Wormhole pred. bimodal pred. tagged comp. Loop pred. Stat. corr. ISL-TAGE
predictions
Wormhole predictor and ISL-TAGE
- On top of ISL-TAGE
(Best performer from last CBP)
- TAGE: bimodal + tagged
- Statistical corrector
- Loop predictor
10
Wormhole pred. bimodal pred. tagged comp. Loop pred. Stat. corr. ISL-TAGE
predictions
Detect difficult branches
Wormhole predictor and ISL-TAGE
- On top of ISL-TAGE
(Best performer from last CBP)
- TAGE: bimodal + tagged
- Statistical corrector
- Loop predictor
10
Wormhole pred. bimodal pred. tagged comp. Loop pred. Stat. corr. ISL-TAGE
predictions
Detect difficult branches Loop dimensionality
ISL-TAGE
- Difficult branches!
- Statistical corrector calculates accuracy for
TAGE
- Wormhole allocates when low accuracy
- Loop dimensionality!
- Stored at LP_iters
- u field (4KB)!
- 3 bits
- Updated when “as in the original TAGE”
- Not reset: Incremented and decremented
11
Wormhole pred. bimodal pred. tagged comp. Loop pred. Stat. corr. ISL-TAGE
predictions
Wormhole predictor’s configurations
12
1 1 1
?
Wormhole predictor’s configurations
12
1 1 1
?
1
4KB
Wormhole predictor’s configurations
12
1 1 1
?
1
4KB 32KB & Unlim.
1 1 1
?
1
Wormhole predictor’s configurations
12
1 PC Conf 1 1 ???
Local history bits
... ...
Saturating counters
... ...
1 1 1
?
1
4KB 32KB & Unlim.
1 1 1
?
1
Wormhole predictor’s configurations
12
18 4 101 301 16 x 5 256 x 5 4KB: 18 4 32KB & Unlim.: (bits)
1 PC Conf 1 1 ???
Local history bits
... ...
Saturating counters
... ...
1 1 1
?
1
4KB 32KB & Unlim.
1 1 1
?
1
Wormhole predictor’s configurations
12
18 4 101 301 16 x 5 256 x 5 4KB: 18 4 32KB & Unlim.: (bits) = 197 = 1615
1 PC Conf 1 1 ???
Local history bits
... ...
Saturating counters
... ...
1 1 1
?
1
4KB 32KB & Unlim.
1 1 1
?
1
13
Results: 32KB
0" 2" 4" 6" 8" 10" 12" 14" 16" 18" 20" LONG,00" LONG,01" LONG,02" LONG,03" LONG,04" LONG,05" LONG,06" LONG,07" LONG,08" LONG,09" LONG,10" LONG,11" LONG,12" LONG,13" LONG,14" LONG,15" LONG,16" LONG,17" LONG,18" LONG,19" FP,1" FP,2" FP,3" FP,4" FP,5" INT,1" INT,2" INT,3" INT,4" INT,5" MM,1" MM,2" MM,3" MM,4" MM,5" SERV,1" SERV,2" SERV,3" SERV,4" SERV,5" AMEAN" MPKI%% ISL,TAGE,32KB" WH,32KB"
b e t t e r b e t t e r
13
Results: 32KB
0" 2" 4" 6" 8" 10" 12" 14" 16" 18" 20" LONG,00" LONG,01" LONG,02" LONG,03" LONG,04" LONG,05" LONG,06" LONG,07" LONG,08" LONG,09" LONG,10" LONG,11" LONG,12" LONG,13" LONG,14" LONG,15" LONG,16" LONG,17" LONG,18" LONG,19" FP,1" FP,2" FP,3" FP,4" FP,5" INT,1" INT,2" INT,3" INT,4" INT,5" MM,1" MM,2" MM,3" MM,4" MM,5" SERV,1" SERV,2" SERV,3" SERV,4" SERV,5" AMEAN" MPKI%% ISL,TAGE,32KB" WH,32KB"
b e t t e r b e t t e r
13
Results: 32KB
0" 2" 4" 6" 8" 10" 12" 14" 16" 18" 20" LONG,00" LONG,01" LONG,02" LONG,03" LONG,04" LONG,05" LONG,06" LONG,07" LONG,08" LONG,09" LONG,10" LONG,11" LONG,12" LONG,13" LONG,14" LONG,15" LONG,16" LONG,17" LONG,18" LONG,19" FP,1" FP,2" FP,3" FP,4" FP,5" INT,1" INT,2" INT,3" INT,4" INT,5" MM,1" MM,2" MM,3" MM,4" MM,5" SERV,1" SERV,2" SERV,3" SERV,4" SERV,5" AMEAN" MPKI%% ISL,TAGE,32KB" WH,32KB"
b e t t e r
19% 42%
b e t t e r
13
Results: 32KB
0" 2" 4" 6" 8" 10" 12" 14" 16" 18" 20" LONG,00" LONG,01" LONG,02" LONG,03" LONG,04" LONG,05" LONG,06" LONG,07" LONG,08" LONG,09" LONG,10" LONG,11" LONG,12" LONG,13" LONG,14" LONG,15" LONG,16" LONG,17" LONG,18" LONG,19" FP,1" FP,2" FP,3" FP,4" FP,5" INT,1" INT,2" INT,3" INT,4" INT,5" MM,1" MM,2" MM,3" MM,4" MM,5" SERV,1" SERV,2" SERV,3" SERV,4" SERV,5" AMEAN" MPKI%% ISL,TAGE,32KB" WH,32KB"
b e t t e r
19% 42% 2%
b e t t e r
13
Results: 32KB
0" 2" 4" 6" 8" 10" 12" 14" 16" 18" 20" LONG,00" LONG,01" LONG,02" LONG,03" LONG,04" LONG,05" LONG,06" LONG,07" LONG,08" LONG,09" LONG,10" LONG,11" LONG,12" LONG,13" LONG,14" LONG,15" LONG,16" LONG,17" LONG,18" LONG,19" FP,1" FP,2" FP,3" FP,4" FP,5" INT,1" INT,2" INT,3" INT,4" INT,5" MM,1" MM,2" MM,3" MM,4" MM,5" SERV,1" SERV,2" SERV,3" SERV,4" SERV,5" AMEAN" MPKI%% ISL,TAGE,32KB" WH,32KB"
b e t t e r
19% 42% 2%
Big improvements on two traces! 32KB: Avg. MPKI = 2.498
b e t t e r
14
Results: 4KB
0" 2" 4" 6" 8" 10" 12" 14" 16" 18" 20" LONG,00" LONG,01" LONG,02" LONG,03" LONG,04" LONG,05" LONG,06" LONG,07" LONG,08" LONG,09" LONG,10" LONG,11" LONG,12" LONG,13" LONG,14" LONG,15" LONG,16" LONG,17" LONG,18" LONG,19" FP,1" FP,2" FP,3" FP,4" FP,5" INT,1" INT,2" INT,3" INT,4" INT,5" MM,1" MM,2" MM,3" MM,4" MM,5" SERV,1" SERV,2" SERV,3" SERV,4" SERV,5" AMEAN" MPKI%% ISL,TAGE,4KB" WH,4KB"
b e t t e r
14
Results: 4KB
0" 2" 4" 6" 8" 10" 12" 14" 16" 18" 20" LONG,00" LONG,01" LONG,02" LONG,03" LONG,04" LONG,05" LONG,06" LONG,07" LONG,08" LONG,09" LONG,10" LONG,11" LONG,12" LONG,13" LONG,14" LONG,15" LONG,16" LONG,17" LONG,18" LONG,19" FP,1" FP,2" FP,3" FP,4" FP,5" INT,1" INT,2" INT,3" INT,4" INT,5" MM,1" MM,2" MM,3" MM,4" MM,5" SERV,1" SERV,2" SERV,3" SERV,4" SERV,5" AMEAN" MPKI%% ISL,TAGE,4KB" WH,4KB"
b e t t e r
14
Results: 4KB
0" 2" 4" 6" 8" 10" 12" 14" 16" 18" 20" LONG,00" LONG,01" LONG,02" LONG,03" LONG,04" LONG,05" LONG,06" LONG,07" LONG,08" LONG,09" LONG,10" LONG,11" LONG,12" LONG,13" LONG,14" LONG,15" LONG,16" LONG,17" LONG,18" LONG,19" FP,1" FP,2" FP,3" FP,4" FP,5" INT,1" INT,2" INT,3" INT,4" INT,5" MM,1" MM,2" MM,3" MM,4" MM,5" SERV,1" SERV,2" SERV,3" SERV,4" SERV,5" AMEAN" MPKI%% ISL,TAGE,4KB" WH,4KB"
b e t t e r
14
Results: 4KB
0" 2" 4" 6" 8" 10" 12" 14" 16" 18" 20" LONG,00" LONG,01" LONG,02" LONG,03" LONG,04" LONG,05" LONG,06" LONG,07" LONG,08" LONG,09" LONG,10" LONG,11" LONG,12" LONG,13" LONG,14" LONG,15" LONG,16" LONG,17" LONG,18" LONG,19" FP,1" FP,2" FP,3" FP,4" FP,5" INT,1" INT,2" INT,3" INT,4" INT,5" MM,1" MM,2" MM,3" MM,4" MM,5" SERV,1" SERV,2" SERV,3" SERV,4" SERV,5" AMEAN" MPKI%% ISL,TAGE,4KB" WH,4KB"
b e t t e r
Better than ISL-TAGE in 20 out of 40 traces (4.6% on avg.)! 4KB: Avg. MPKI = 3.995
15
4KB 32KB Statistical corrector 96 384 Loop predictor 376 376 TAGE predictor 3589 30476 Wormhole predictor 134 1413 Total size (bytes) 4195 32649
Wormhole predictor’s storage
Conclusion
- Wormhole predictor:
Side-predictor on top of ISL-TAGE
- Able to consider the branch
history as multidimensional, capturing columns, diagonals and other patterns
- 3.995, 2.498, and 2.014 MPKI in
the 4KB, 32KB, and unlimited competition tracks, respectively
16
1 1 1 1 1 1
Conclusion
- Wormhole predictor:
Side-predictor on top of ISL-TAGE
- Able to consider the branch
history as multidimensional, capturing columns, diagonals and other patterns
- 3.995, 2.498, and 2.014 MPKI in
the 4KB, 32KB, and unlimited competition tracks, respectively
16
1 1 1 1 1 1