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 something */ } 3
Motivation foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 3
Motivation foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 3
Motivation foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 3
Multidimensional histories 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 4
Multidimensional histories 0 1 2 3 4 0 1 2 3 4 0 1 2 3 t t t t t t t t t t t t t t c c c c c c c c c c c c c c e e e e e e e e e e e e e e j j j j j j j j j j j j j j b b b b b b b b b b b b b b O O O O O O O O O O O O O O 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 4
Multidimensional histories 0 1 2 3 4 0 1 2 3 4 0 1 2 3 t t t t t t t t t t t t t t c c c c c c c c c c c c c c e e e e e e e e e e e e e e j j j j j j j j j j j j j j b b b b b b b b b b b b b b O O O O O O O O O O O O O O 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 Frame 0 Frame 1 Frame 2 foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 4
Multidimensional histories 0 1 2 3 4 0 1 2 3 4 0 1 2 3 t t t t t t t t t t t t t t c c c c c c c c c c c c c c e e e e e e e e e e e e e e j j j j j j j j j j j j j j b b b b b b b b b b b b b b O O O O O O O O O O O O O O 1 0 1 0 0 1 0 1 0 0 1 0 1 0 ? 0 Frame 0 Frame 1 Frame 2 foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 4
Multidimensional histories 0 1 2 3 4 0 1 2 3 4 0 1 2 3 t t t t t t t t t t t t t t c c c c c c c c c c c c c c e e e e e e e e e e e e e e j j j j j j j j j j j j j j b b b b b b b b b b b b b b O O O O O O O O O O O O O O 1 0 1 0 0 1 0 1 0 0 1 0 1 0 ? 0 Frame 0 Frame 1 Frame 2 foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 4
Multidimensional histories 0 1 2 3 4 0 1 2 3 4 0 1 2 3 t t t t t t t t t t t t t t c c c c c c c c c c c c c c e e e e e e e e e e e e e e j j j j j j j j j j j j j j b b b b b b b b b b b b b b O O O O O O O O O O O O O O 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 Frame 0 Frame 1 Frame 2 foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 4
Multidimensional histories 0 1 2 3 4 t t t t t c c c c c e e e e e j j j j j b b b b b O O O O O 1 0 1 0 0 Frames 1 0 1 0 0 1 0 1 0 0 foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 4
Multidimensional histories 0 1 2 3 4 t t t t t c c c c c e e e e e j j j j j b b b b b O O O O O 1 0 1 0 0 Frames 1 0 1 0 0 1 0 1 0 0 foreach frame: foreach object: if distance( object , p ) < threshold: { /* do something */ } 4
Summary • Wormhole predictor : ISL-TAGE Side-predictor on top of Wormhole ISL-TAGE pred. • Able to capture columns, diagonals, and other patterns predictions • 3.995 , 2.498 , and 2.014 MPKI in the 4KB, 32KB, and unlimited competition tracks 5
Detecting diagonals for j in N: for k in N: if j != k: /*Calculation*/ 6
Detecting diagonals for j in N: for k in N: if j != k: /*Calculation*/ 6
Detecting diagonals for j in N: for k in N: if j != k: /*Calculation*/ 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 6
Detecting diagonals for j in N: for k in N: if j != k: /*Calculation*/ 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 j=0 j=1 j=2 6
Detecting diagonals 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 j=0 j=1 j=2 for j in N: //Loop 1 for k in N: //Loop 2 if j != k: /*Calculation*/ 7
Detecting diagonals Inner loop (k) Iterations 1 0 0 0 0 0 0 Outer loop (j) 0 1 0 0 0 0 0 Iterations 0 0 1 0 0 0 0 for j in N: //Loop 1 for k in N: //Loop 2 if j != k: /*Calculation*/ 7
Multidimensional histories 1 0 0 0 0 0 0 Outer loop (j) 0 1 0 0 0 0 0 Iterations Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 8
Multidimensional histories 1 0 0 0 0 0 0 Outer loop (j) ? 0 1 0 0 0 0 0 Iterations Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 8
Multidimensional histories Saturating counters 1 0 0 0 0 0 0 Outer loop (j) ? 0 1 0 0 0 0 0 Iterations Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 8
Multidimensional histories Saturating counters 1 0 1 0 0 0 0 0 0 0 Outer loop (j) ? 0 0 1 0 0 0 0 0 Iterations Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 8
Multidimensional histories Saturating counters 0100 x 1 0 1 0 0 0 0 0 0 0 Outer loop (j) ? 0 0 1 0 0 0 0 0 Iterations Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 8
Multidimensional histories Saturating counters 0100 x 1 0 1 0 0 0 0 0 0 0 Outer loop (j) 1 ? 0 0 1 0 0 0 0 0 Iterations Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 8
Multidimensional histories Saturating counters 0100 x 1 1 0 1 0 0 0 0 0 0 0 Outer loop (j) 1 ? 0 0 1 0 0 0 0 0 Iterations Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 8
Multidimensional histories Saturating counters x 1 0 1 0 0 0 0 0 0 Outer loop (j) 0 0 0 0 1 0 0 0 Iterations 0 0 0 1 0 0 0 Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 9
Multidimensional histories Saturating counters x 1 0 1 0 0 0 0 0 0 Outer loop (j) 0 0 0 0 1 0 0 0 Iterations 0 ? 0 0 1 0 0 0 Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 9
Multidimensional histories Saturating counters x 1 0 1 0 0 0 0 0 0 Outer loop (j) 1 0 0 0 0 0 0 1 0 0 0 Iterations 0 0 ? 0 0 1 0 0 0 Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 9
Multidimensional histories Saturating counters 0100 x 1 0 1 0 0 0 0 0 0 Outer loop (j) 1 0 0 0 0 0 0 1 0 0 0 Iterations 0 0 ? 0 0 1 0 0 0 Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 9
Multidimensional histories Saturating counters 0100 x 1 Prediction: 1 0 1 0 0 0 0 0 0 Outer loop (j) 1 0 0 0 0 0 0 1 0 0 0 Iterations 0 0 ? 0 0 1 0 0 0 Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 9
Multidimensional histories Saturating counters 0100 x 1 Prediction: 1 0 1 0 0 0 0 0 0 Outer loop (j) 1 0 0 0 0 0 0 1 0 0 0 Iterations 1 0 0 ? 0 0 1 0 0 0 Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 9
Multidimensional histories Saturating counters 0100 x 1 Prediction: 1 0 1 0 0 0 0 0 0 Outer loop (j) 1 0 0 0 0 0 0 1 0 0 0 Iterations 1 0 0 ? 0 0 1 0 0 0 Inner loop (k) for j in N: Iterations for k in N: if j != k: /*Calculation*/ 9
Wormhole predictor and ISL-TAGE • On top of ISL-TAGE ISL-TAGE (Best performer from last CBP) Loop Wormhole tagged pred. pred. comp. bimodal • TAGE: bimodal + tagged Stat. pred. corr. • Statistical corrector predictions • Loop predictor 10
Wormhole predictor and ISL-TAGE • On top of ISL-TAGE ISL-TAGE (Best performer from last CBP) Loop Wormhole tagged pred. pred. comp. bimodal • TAGE: bimodal + tagged Stat. pred. corr. • Statistical corrector predictions • Loop predictor Detect difficult branches 10
Wormhole predictor and ISL-TAGE • On top of ISL-TAGE ISL-TAGE (Best performer from last CBP) Loop Wormhole tagged pred. pred. comp. bimodal • TAGE: bimodal + tagged Stat. pred. corr. • Statistical corrector predictions • Loop predictor Detect difficult branches Loop dimensionality 10
Recommend
More recommend