19
ECSE 425 Lecture 24: The Limits of ILP H&P Chapter 3 © 2011 Pa@erson, Vu, Meyer; © 2007 Elsevier Science

L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

ECSE  425  Lecture  24:  The  Limits  of  ILP  

H&P  Chapter  3  

©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  Elsevier  Science  

Page 2: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

Last  Time  

•  Virtual  Memory  – Why  do  we  need  it?  

– How  do  we  meet  those  needs?  – What  do  we  do  to  make  it  fast?  

©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24   2  

Page 3: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

Today  

•  Studies  of  the  LimitaPons  of  ILP  – Chapter  3.1-­‐3.3  

©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24   3  

Page 4: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

Recall  ILP  techniques  •  Goal:  CPI  <  1,  preserving  the  programming  model  –  Pipelining  –  Loop  unrolling  –  Branch  predicPon  (staPc  and  dynamic)  – Dynamic  scheduling  –  SpeculaPon  – MulPple  issue  

•  Modern  problems:  –  Bigger  processor,  faster  clock,  but  same  basic  structure  –  Complex  designs,  that  are  power-­‐hungry  and  hot  – Growing  gap  between  peak  and  delivered  performance  

4  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

Page 5: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

Overcoming  the  Limits  of  Available  ILP  •  Can  these  challenges  be  overcome?  •  What  if  there  are  – SubstanPal  advances  in  compiler  technology,  and  – Significantly  new  and  different  hardware  techniques?  

•  Studies  have  shown  that  – Even  in  the  best  case,  ILP  is  limited,  and  that  – RealisPc  hardware  is  unlikely  to  overcome  these  limits  in  the  near  future.  

•  We’ll  evaluate  ILP  perfect  hardware,  and  observe  what  happens  as  we  make  it  more  realisPc  

5  ECSE  425,  Fall  2011,  Lecture  24  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  

Page 6: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

An  Ideal  Hardware  model  1.  Register  renaming  –  infinite  virtual  registers    –  all  register  WAW  &  WAR  hazards  are  avoided  

2.  Branch  predic4on  –  perfect;  no  mispredicPons    3.  Jump  predic4on  –  all  jumps  perfectly  predicted  (returns,  

case  statements).  (2)  and  (3)  mean  –  no  control  dependencies  –  perfect  speculaPon,  unbounded  buffer  of  instrucPons  

4. Memory-­‐address  alias  analysis  –  all  addresses  are  known,  and  all  accesses  to  different  addresses  can  be  re-­‐ordered    –  (1)  and  (4)  mean  all  hazards  are  eliminated  but  RAW  

5.  Perfect  caches  –  1  cycle  latency  for  all  instrucPons  (FP*,/);  unlimited  instrucPons  issued/clock  cycle  

6  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

Page 7: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

Model  Comparison  Ideal  Model   IBM  Power  5  

InstrucPons  Issued  per  clock  

Infinite   4  can  be  issued;  6  can  begin  execuPon  

InstrucPon  Window  Size  (in  flight)  

Infinite   200,  inc.  up  to  32  loads  or  stores  

Renaming  Registers   Infinite   88  Integer  +  88  FloaPng  Point  (In  addiPon  to  64  arch  regs)  

Branch  PredicPon   Perfect   2%  to  6%  mispredicPon  (Tournament  Branch  Predictor)  

Cache   Perfect   64KI,  32KD,  1.92MB  L2,  36  MB  L3  

Memory  Alias  Analysis   Perfect   ??  

7  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

Page 8: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

Upper  Limit  of  ILP:  Ideal  Machine  

8  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

Integer  programs  

FP  programs  

Page 9: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

RealisPc  Window  Size  New  Model   Ideal  Model   Power  5  

InstrucPons  Issued  per  CC  

Infinite   Infinite   4  can  be  issued;  6  can  begin  execuPon  

InstrucPon  Window  Size  

2K,  512,  128,  32  

Infinite   200,  inc.  up  to  32  loads  or  stores  

Renaming  Registers  

Infinite   Infinite   88  Integer  +  88  FP  (In  addiPon  to  64  arch  regs)  

Branch  PredicPon  

Perfect   Perfect   2%  to  6%  mispredicPon  (Tournament  Branch  Predictor)  

Cache   Perfect   Perfect   64KI,  32KD,  1.92MB  L2,  36  MB  L3  

Memory  Alias   Perfect   Perfect   ??  

9  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

Page 10: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

RealisPc  Window  Size,  Results  

10  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

Page 11: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

RealisPc  Branch  PredicPon  

11  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

New  Model   Ideal  Model  

Power  5  

InstrucPons  Issued  per  CC  

64   Infinite   4  can  be  issued;  6  can  begin  execuPon  

InstrucPon  Window  Size  

2048   Infinite   200,  inc.  up  to  32  loads  or  stores  

Renaming  Registers  

Infinite   Infinite   88  Integer  +  88  FP  (In  addiPon  to  64  arch  regs)  

Branch  PredicPon  

8K  Tournament,  512  2-­‐bit,  profiling,  none  

Perfect   2%  to  6%  mispredicPon  (Tournament  Branch  Predictor)  

Cache   Perfect   Perfect   64KI,  32KD,  1.92MB  L2,  36  MB  L3  

Memory  Alias   Perfect   Perfect   ??  

Page 12: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

RealisPc  Branch  PredicPon,  Results  

12  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

Page 13: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

MispredicPon  Rates  

13  ECSE  425,  Fall  2011,  Lecture  24  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  

Page 14: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

RealisPc  Register  Renaming  

14  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

New  Model   Ideal  Model  

Power  5  

InstrucPons  Issued  per  CC  

64   Infinite   4  can  be  issued;  6  can  begin  execuPon  

InstrucPon  Window  Size  

2048   Infinite   200,  inc.  up  to  32  loads  or  stores  

Renaming  Registers  

256,  128,  64,  32,  none    

Infinite   88  Integer  +  88  FP  (In  addiPon  to  64  arch  regs)  

Branch  PredicPon  

8K  Tournament;  2K  jump,  RA  predictors  

Perfect   2%  to  6%  mispredicPon  (Tournament  Branch  Predictor)  

Cache   Perfect   Perfect   64KI,  32KD,  1.92MB  L2,  36  MB  L3  

Memory  Alias   Perfect   Perfect   ??  

Page 15: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

RealisPc  Register  Renaming,  Results  

15  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

 Change    2048  instr  window,  64  instr  issue,  8K  2  level  PredicPon  

Page 16: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

Realizable  Hardware  

16  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

New  Model   Ideal  Model  

Power  5  

InstrucPons  Issued  per  CC  

64  (no  restricPon  on  instr.  type)  

Infinite   4  can  be  issued;  6  can  begin  execuPon  

InstrucPon  Window  Size  

Infinite,  256,  128,  64,  32  

Infinite   200,  inc.  up  to  32  loads  or  stores  

Renaming  Registers  

64  Int  +  64  FP   Infinite   88  Integer  +  88  FP  (In  addiPon  to  64  arch  regs)  

Branch  PredicPon  

1K  Tournament  Predictor;  16-­‐entry  RA  pred.  

Perfect   2%  to  6%  mispredicPon  (Tournament  Branch  Predictor)  

Cache   Perfect   Perfect   64KI,  32KD,  1.92MB  L2,  36  MB  L3  

Memory  Alias   Perfect  HW  disambiguaPon  

Perfect   ??  

Page 17: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

Realizable  Hardware,  Results  

17  ©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  

Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24  

Page 18: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

Summary  

•  ILP  is  limited,  even  in  the  best  case  •  Two  significant  limiters  –  InstrucPon  window—limits  the  pool  of  independent  instrucPons  

– Branch  predicPon—limits  speculaPon  

•  To  conPnue  to  convert  transistors  into  performance,  new  sources  of  parallelism!  – Thread-­‐level  parallelism  

– Data-­‐level  parallelism  

©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24   18  

Page 19: L24-ILPLimits - McGill University · ECSE$425$Lecture$24:$ The$Limits$of$ILP$ H&P$Chapter$3$ ©$2011$Paerson,$Vu,$Meyer;$©$2007$Elsevier$Science$

Next  Time  

•  MulP-­‐threading  – Chapter  3.5  

©  2011  Pa@erson,  Vu,  Meyer;  ©  2007  Elsevier  Science  ECSE  425,  Fall  2011,  Lecture  24   19