lecture 12 : limits of ilp and pentium processors

32
1 Lecture 12: Limits of ILP and Pentium Processors ILP limits, Study strategy, Results, P-III and Pentium 4 processors Adapted from UCB CS252 S01

Upload: kynan

Post on 13-Jan-2016

46 views

Category:

Documents


0 download

DESCRIPTION

Lecture 12 : Limits of ILP and Pentium Processors. ILP limits, Study strategy, Results, P-III and Pentium 4 processors. Adapted from UCB CS252 S01. Limits to ILP. Conflicting studies of amount Benchmarks (vectorized Fortran FP vs. integer C programs) Hardware sophistication - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Lecture 12 : Limits of ILP and Pentium Processors

1

Lecture 12: Limits of ILP and Pentium Processors

ILP limits, Study strategy, Results, P-III and Pentium 4 processors

Adapted from UCB CS252 S01

Page 2: Lecture 12 : Limits of ILP and Pentium Processors

2

Limits to ILPConflicting studies of amount

Benchmarks (vectorized Fortran FP vs. integer C programs) Hardware sophistication Compiler sophistication

How much ILP is available using existing mechanisms with increasing HW budgets?Do we need to invent new HW/SW mechanisms to keep on processor performance curve?

Intel MMX, SSE (Streaming SIMD Extensions): 64 bit ints Intel SSE2: 128 bit, including 2 64-bit FP per clock Motorola AltaVec: 128 bit ints and FPs Supersparc Multimedia ops, etc.

Page 3: Lecture 12 : Limits of ILP and Pentium Processors

3

Limits to ILPInitial HW Model here; MIPS compilers. Assumptions for ideal/perfect machine to start:

1. Register renaming – infinite virtual registers => all register WAW & WAR hazards are avoided2. Branch prediction – perfect; no mispredictions 3. Jump prediction – all jumps perfectly predicted 2 & 3 => machine with perfect speculation & an unbounded buffer of instructions available4. Memory-address alias analysis – addresses are known & a load can be moved before a store provided addresses not equal

Also: unlimited number of instructions issued/clock cycle; perfect caches;1 cycle latency for all instructions (FP *,/);

Page 4: Lecture 12 : Limits of ILP and Pentium Processors

4

Study StrategyFirst, observe ILP on the ideal machine

using simulation

Then, observe how ideal ILP decreases when

Add branch impact Add register impact Add memory address alias impact

More restrictions in practice Functional unit latency: floating point Memory latency: cache hit more than one

cycle, cache miss penalty

Page 5: Lecture 12 : Limits of ILP and Pentium Processors

5

Upper Limit to ILP: Ideal Machine(Figure 3.35, page 242)

Programs

Instr

ucti

on

Issu

es p

er

cycle

0

20

40

60

80

100

120

140

160

gcc espresso li fpppp doducd tomcatv

54.862.6

17.9

75.2

118.7

150.1

Integer: 18 - 60

FP: 75 - 150

IPC

Page 6: Lecture 12 : Limits of ILP and Pentium Processors

6

35.2

40.5

16.4

60.9

57.959.9

8.6

12.210.3

48.1

15.1

5.76.9 6.4

46.3

13.2

45.4

6.4 6.3 6.5

45.4

14

45.2

2 1.8 2.3

28.5

4.1

18.6

45.5

0

10

20

30

40

50

60

gcc espresso li fpppp doducd tomcatv

Program

Instr

uct

ion issues p

er

cycl

e

Perfect Selective predictor Standard 2-bit Static None

More Realistic HW: Branch Impact

Change from Infinite window to examine to 2000 and maximum issue of 64 instructions per clock cycle

ProfileBHT (512)TournamentPerfect No prediction

FP: 15 - 45

Integer: 6 - 12

IPC

Page 7: Lecture 12 : Limits of ILP and Pentium Processors

7

11

15

12

29

54

10

15

12

49

16

10

1312

35

15

44

910

11

20

11

28

5 56 5 5

74 4

54

5 5

59

45

0

10

20

30

40

50

60

70

gcc espresso li fpppp doducd tomcatv

Program

Inst

ruct

ion iss

ues

per

cyc

le

Infinite 256 128 64 32 None

More Realistic HW: Renaming Register Impact

Change 2000 instr window, 64 instr issue, 8K 2 level Prediction

64 None256Infinite 32128

Integer: 5 - 15

FP: 11 - 45

IPC

Page 8: Lecture 12 : Limits of ILP and Pentium Processors

8

Program

Instr

ucti

on

issu

es p

er

cy

cle

0

5

10

15

20

25

30

35

40

45

50

gcc espresso li fpppp doducd tomcatv

10

15

12

49

16

45

7 79

49

16

45 4 4

6 53

53 3 4 4

45

Perfect Global/stack Perfect Inspection None

More Realistic HW: Memory Address Alias Impact

Change 2000 instr window, 64 instr issue, 8K 2 level Prediction, 256 renaming registers

NoneGlobal/Stack perf;heap conflicts

Perfect Inspec.Assem.

FP: 4 - 45(Fortran,no heap)

Integer: 4 - 9

IPC

Page 9: Lecture 12 : Limits of ILP and Pentium Processors

9

Program

Instr

ucti

on

issu

es p

er

cy

cle

0

5

10

15

20

25

30

35

40

45

50

gcc espresso li fpppp doducd tomcatv

10

15

12

49

16

45

7 79

49

16

45 4 4

6 53

53 3 4 4

45

Perfect Global/stack Perfect Inspection None

More Realistic HW: Memory Address Alias Impact

Change 2000 instr window, 64 instr issue, 8K 2 level Prediction, 256 renaming registers

NoneGlobal/Stack perf;heap conflicts

Perfect Inspec.Assem.

FP: 4 - 45(Fortran,no heap)

Integer: 4 - 9

IPC

Page 10: Lecture 12 : Limits of ILP and Pentium Processors

10

How to Exceed ILP Limits of this study?

WAR and WAW hazards through memory: eliminated WAW and WAR hazards through register renaming, but not in memory usageUnnecessary dependences (compiler not unrolling loops so iteration variable dependence)Overcoming the data flow limit: value prediction, predicting values and speculating on prediction

Address value prediction and speculation predicts addresses and speculates by reordering loads and stores; could provide better aliasing analysis, only need predict if addresses =

Page 11: Lecture 12 : Limits of ILP and Pentium Processors

11

Workstation Microprocessors 3/2001

Source: Microprocessor Report, www.MPRonline.com

Max issue: 4 instructions (many CPUs)Max rename registers: 128 (Pentium 4) Max BHT: 4K x 9 (Alpha 21264B), 16Kx2 (Ultra III)Max Window Size (OOO): 126 intructions (Pent. 4)Max Pipeline: 22/24 stages (Pentium 4)

Page 12: Lecture 12 : Limits of ILP and Pentium Processors

12

SPEC 2000 Performance 3/2001 Source: Microprocessor Report, www.MPRonline.com

1.6X

3.8X

1.2X

1.7X

1.5X

Page 13: Lecture 12 : Limits of ILP and Pentium Processors

13

Conclusion1985-2000: 1000X performance Moore’s Law transistors/chip => Moore’s Law for

Performance/MPUHennessy: industry been following a roadmap of ideas known in 1985 to exploit Instruction Level Parallelism and (real) Moore’s Law to get 1.55X/year Caches, Pipelining, Superscalar, Branch Prediction,

Out-of-order execution, …ILP limits: To make performance progress in future need to have explicit parallelism from programmer vs. implicit parallelism of ILP exploited by compiler, HW? Otherwise drop to old rate of 1.3X per year? Less than 1.3X because of processor-memory

performance gap?Impact on you: if you care about performance, better think about explicitly parallel algorithms vs. rely on ILP?

Page 14: Lecture 12 : Limits of ILP and Pentium Processors

14

Dynamic Scheduling in P6 (Pentium Pro, II, III)

Q: How pipeline 1 to 17 byte 80x86 instructions?

P6 doesn’t pipeline 80x86 instructions

P6 decode unit translates the Intel instructions into 72-bit micro-operations (~ MIPS)

Sends micro-operations to reorder buffer & reservation stations

Many instructions translate to 1 to 4 micro-operations Complex 80x86 instructions are executed by a

conventional microprogram (8K x 72 bits) that issues long sequences of micro-operations

14 clocks in total pipeline (~ 3 state machines)

Page 15: Lecture 12 : Limits of ILP and Pentium Processors

15

Dynamic Scheduling in P6Parameter 80x86 microops

Max. instructions issued/clock 3 6Max. instr. complete exec./clock 5Max. instr. commited/clock 3Window (Instrs in reorder buffer) 40Number of reservations stations20Number of rename registers 40No. integer functional units (FUs)2No. floating point FUs 1No. SIMD Fl. Pt. FUs 1No. memory Fus 1 load + 1 store

Page 16: Lecture 12 : Limits of ILP and Pentium Processors

16

P6 Pipeline14 clocks in total (~3 state machines)8 stages are used for in-order instruction fetch, decode, and issue

Takes 1 clock cycle to determine length of 80x86 instructions + 2 more to create the micro-operations (uops)

3 stages are used for out-of-order execution in one of 5 separate functional units3 stages are used for instruction commit

InstrFetch16B/clk

InstrDecode3 Instr

/clk

Renaming3 uops

/clk

Execu-tionunits(5)

Gradu-ation

3 uops/clk

16B 6 uopsReserv.Station

ReorderBuffer

Page 17: Lecture 12 : Limits of ILP and Pentium Processors

17

P6 Block Diagram

Page 18: Lecture 12 : Limits of ILP and Pentium Processors

18

Pentium III Die PhotoEBL/BBL - Bus logic, Front, BackMOB - Memory Order BufferPacked FPU - MMX Fl. Pt. (SSE)IEU - Integer Execution UnitFAU - Fl. Pt. Arithmetic UnitMIU - Memory Interface UnitDCU - Data Cache UnitPMH - Page Miss HandlerDTLB - Data TLBBAC - Branch Address CalculatorRAT - Register Alias TableSIMD - Packed Fl. Pt.RS - Reservation StationBTB - Branch Target BufferIFU - Instruction Fetch Unit (+I$)ID - Instruction DecodeROB - Reorder BufferMS - Micro-instruction Sequencer

1st Pentium III, Katmai: 9.5 M transistors, 12.3 * 10.4 mm in 0.25-mi. with 5 layers of aluminum

Page 19: Lecture 12 : Limits of ILP and Pentium Processors

19

P6 Performance: Stalls at decode stageI$ misses or lack of RS/Reorder buf. entry

0 0.5 1 1.5 2 2.5 3

wave5

fpppp

apsi

turb3d

applu

mgrid

hydro2d

su2cor

swim

tomcatv

vortex

perl

ijpeg

li

compress

gcc

m88ksim

go

0.5 to 2.5 Stall cycles per instruction: 0.98 avg. (0.36 integer)

Instruction stream Resource capacity stalls

Page 20: Lecture 12 : Limits of ILP and Pentium Processors

20

P6 Performance: uops/x86 instr200 MHz, 8KI$/8KD$/256KL2$, 66 MHz bus

1 1.1 1.2 1.3 1.4 1.5 1.6 1.7

wave5

fpppp

apsi

turb3d

applu

mgrid

hydro2d

su2cor

swim

tomcatv

vortex

perl

ijpeg

li

compress

gcc

m88ksim

go

1.2 to 1.6 uops per IA-32 instruction: 1.36 avg. (1.37 integer)

Page 21: Lecture 12 : Limits of ILP and Pentium Processors

21

P6 Performance: Branch Mispredict Rate

0% 5% 10% 15% 20% 25% 30% 35% 40% 45%

wave5

fpppp

apsi

turb3d

applu

mgrid

hydro2d

su2cor

swim

tomcatv

vortex

perl

ijpeg

li

compress

gcc

m88ksim

go

10% to 40% Miss/Mispredict ratio: 20% avg. (29% integer)

BTB miss frequency

Mispredict frequency

Page 22: Lecture 12 : Limits of ILP and Pentium Processors

22

P6 Performance: Speculation rate(% instructions issued that do not commit)

0% 10% 20% 30% 40% 50% 60%

wave5

fpppp

apsi

turb3d

applu

mgrid

hydro2d

su2cor

swim

tomcatv

vortex

perl

ijpeg

li

compress

gcc

m88ksim

go

1% to 60% instructions do not commit: 20% avg (30% integer)

Page 23: Lecture 12 : Limits of ILP and Pentium Processors

23

P6 Performance: Cache Misses/1k instr

0 20 40 60 80 100 120 140 160

wave5

fpppp

apsi

turb3d

applu

mgrid

hydro2d

su2cor

swim

tomcatv

vortex

perl

ijpeg

li

compress

gcc

m88ksim

go

10 to 160 Misses per Thousand Instructions: 49 avg (30 integer)

L1 Instruction

L1 Data

L2

Page 24: Lecture 12 : Limits of ILP and Pentium Processors

24

P6 Performance: uops commit/clock

Average0: 55%1: 13%2: 8%3: 23%

Integer0: 40%1: 21%2: 12%3: 27%

0% 20% 40% 60% 80% 100%

wave5

fpppp

apsi

turb3d

applu

mgrid

hydro2d

su2cor

swim

tomcatv

vortex

perl

ijpeg

li

compress

gcc

m88ksim

go

0 uops commit

1 uop commits

2 uops commit

3 uops commit

Page 25: Lecture 12 : Limits of ILP and Pentium Processors

25

P6 Dynamic Benefit? Sum of parts CPI vs. Actual CPI

Ratio of sum of

parts vs. actual CPI:1.38X avg.

(1.29X integer)

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6

wave5

fpppp

apsi

turb3d

applu

mgrid

hydro2d

su2cor

swim

tomcatv

vortex

perl

ijpeg

li

compress

gcc

m88ksim

go

0.8 to 3.8 Clock cycles per instruction: 1.68 avg (1.16 integer)

uopsInstruction cache stallsResource capacity stallsBranch mispredict penaltyData Cache Stalls

Actual CPI

Page 26: Lecture 12 : Limits of ILP and Pentium Processors

26

AMD AlthonSimilar to P6 microarchitecture (Pentium III), but more resourcesTransistors: PIII 24M v. Althon 37MDie Size: 106 mm2 v. 117 mm2

Power: 30W v. 76WCache: 16K/16K/256K v. 64K/64K/256KWindow size: 40 vs. 72 uopsRename registers: 40 v. 36 int +36 Fl. Pt.BTB: 512 x 2 v. 4096 x 2Pipeline: 10-12 stages v. 9-11 stagesClock rate: 1.0 GHz v. 1.2 GHzMemory bandwidth: 1.06 GB/s v. 2.12 GB/s

Page 27: Lecture 12 : Limits of ILP and Pentium Processors

27

Pentium 4Still translate from 80x86 to micro-opsP4 has better branch predictor, more FUsInstruction Cache holds micro-operations vs. 80x86 instructions

no decode stages of 80x86 on cache hit called “trace cache” (TC)

Faster memory bus: 400 MHz v. 133 MHzCaches

Pentium III: L1I 16KB, L1D 16KB, L2 256 KB Pentium 4: L1I 12K uops, L1D 8 KB, L2 256 KB Block size: PIII 32B v. P4 128B; 128 v. 256

bits/clockClock rates:

Pentium III 1 GHz v. Pentium IV 1.5 GHz

Page 28: Lecture 12 : Limits of ILP and Pentium Processors

28

Pentium 4 featuresMultimedia instructions 128 bits wide vs. 64 bits wide => 144 new instructions

When used by programs? Faster Floating Point: execute 2 64-bit FP Per clock Memory FU: 1 128-bit load, 1 128-store /clock to

MMX regsUsing RAMBUS DRAM

Bandwidth faster, latency same as SDRAM Cost 2X-3X vs. SDRAM

ALUs operate at 2X clock rate for many opsPipeline doesn’t stall at this clock rate: uops replayRename registers: 40 vs. 128; Window: 40 v. 126BTB: 512 vs. 4096 entries (Intel: 1/3 improvement)

Page 29: Lecture 12 : Limits of ILP and Pentium Processors

29

Basic Pentium 4 Pipeline

1-2 trace cache next instruction pointer

3-4 fetch uops from Trace Cache

5 drive upos to alloc6 alloc resources (ROB,

reg, …)7-8 rename logic reg to

128 physical reg9 put renamed uops into

queue

10-12 write uops into scheduler

13-14 move up to 6 uops to FU

15-16 read registers17 FU execution18 computer flags e.g.

for branch instructions

19 check branch output with branch prediction

20 drive branch check result to frontend

TC Nxt IP DriveTC Fetch Alloc Rename QueueSchd

Schd Schd Disp Disp Reg Reg Ex FlagsBr ChkDrive

Page 30: Lecture 12 : Limits of ILP and Pentium Processors

30

Block Diagram of Pentium 4 Microarchitecture

BTB = Branch Target Buffer (branch predictor)I-TLB = Instruction TLB, Trace Cache = Instruction cacheRF = Register File; AGU = Address Generation Unit"Double pumped ALU" means ALU clock rate 2X => 2X ALU F.U.s

From “Pentium 4 (Partially) Previewed,” Microprocessor Report, 8/28/00

Page 31: Lecture 12 : Limits of ILP and Pentium Processors

31

Pentium 4 Die Photo42M Xtors

PIII: 26M217 mm2

PIII: 106 mm2

L1 Execution Cache

Buffer 12,000 Micro-Ops

8KB data cache256KB L2$

Page 32: Lecture 12 : Limits of ILP and Pentium Processors

32

Benchmarks: Pentium 4 v. PIII v. Althon

SPECbase2000 Int, [email protected] GHz: 524, PIII@1GHz: 454, AMD [email protected]:? FP, [email protected] GHz: 549, PIII@1GHz: 329, AMD

[email protected]:304

WorldBench 2000 benchmark (business) PC World magazine, Nov. 20, 2000 (bigger is better)

P4 : 164, PIII : 167, AMD Althon: 180

Quake 3 Arena: P4 172, Althon 151SYSmark 2000 composite: P4 209, Althon 221Office productivity: P4 197, Althon 209S.F. Chronicle 11/20/00: "… the challenge for AMD now will be to argue that frequency is not the most important thing-- precisely the position Intel has argued while its Pentium III lagged behind the Athlon in clock speed."