Harmony: Collec.on and Analysis of Parallel Block Vectors - - PowerPoint PPT Presentation

harmony collec on and analysis of parallel block vectors
SMART_READER_LITE
LIVE PREVIEW

Harmony: Collec.on and Analysis of Parallel Block Vectors - - PowerPoint PPT Presentation

Harmony: Collec.on and Analysis of Parallel Block Vectors Melanie Kambadur Kui Tang, Martha Kim Columbia University 1 Parallelism Time 2


slide-1
SLIDE 1

Harmony: ¡Collec.on ¡and ¡Analysis ¡

  • f ¡Parallel ¡Block ¡Vectors ¡

Melanie ¡Kambadur ¡ Kui ¡Tang, ¡Martha ¡Kim ¡ Columbia ¡University ¡ ¡

1 ¡

slide-2
SLIDE 2

2 ¡

Parallelism ¡ Time ¡

slide-3
SLIDE 3

3 ¡

Parallelism ¡ Time ¡ Code ¡currently ¡execu.ng ¡

slide-4
SLIDE 4

Parallel ¡Block ¡Vector ¡Profiles ¡(PBVs) ¡

  • Maps ¡between ¡dynamic ¡parallelism ¡

and ¡program ¡code ¡

  • Harmony: ¡low ¡overhead ¡collec.on ¡of ¡

PBVs ¡ ¡

4 ¡

slide-5
SLIDE 5

In ¡a ¡mul.threaded ¡program ¡ execu.on… ¡

Program ¡execu.on ¡.me ¡

T1 ¡ T2 ¡ T3 ¡ T4 ¡

Start ¡ End ¡

5 ¡

slide-6
SLIDE 6

…there ¡are ¡parallel ¡and ¡serial ¡phases ¡

T1 ¡ T2 ¡ T3 ¡ T4 ¡ Serial ¡ Serial ¡ Parallel ¡

6 ¡

slide-7
SLIDE 7

To ¡see ¡how ¡parallel, ¡ ¡ count ¡threads ¡at ¡each ¡change: ¡ ¡

T1 ¡ T2 ¡ T3 ¡ T4 ¡ =1 ¡ =1 ¡ =4 ¡ =3 ¡ Thread ¡ ¡ Count ¡

7 ¡

slide-8
SLIDE 8

Sta.c ¡analysis ¡can ¡track ¡thread ¡ crea.on ¡and ¡destruc.on ¡calls ¡ Tools ¡like ¡Vtune, ¡Gprof ¡+ ¡Quartz ¡give ¡ the ¡dynamic ¡length ¡of ¡each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count ¡threads? ¡

Running ¡– ¡Threads ¡ granted ¡access ¡to ¡a ¡core ¡ by ¡the ¡O/S ¡ EffecBve ¡– ¡Threads ¡not ¡ wai.ng ¡for ¡a ¡blocking ¡ call ¡e.g. ¡pthread_wait ¡ Nominal ¡– ¡All ¡created ¡ threads ¡

13 ¡

slide-14
SLIDE 14

How ¡exactly ¡should ¡we ¡count ¡threads? ¡

Running ¡– ¡Threads ¡ granted ¡access ¡to ¡a ¡core ¡ by ¡the ¡O/S ¡ EffecBve ¡– ¡Threads ¡not ¡ wai.ng ¡for ¡a ¡blocking ¡ call ¡e.g. ¡pthread_wait ¡ Nominal ¡– ¡All ¡created ¡ threads ¡

14 ¡

See ¡how ¡programmer ¡ intent ¡matches ¡ dynamic ¡run ¡

  • Diff. ¡with ¡nominal ¡to ¡

see ¡blocking ¡call ¡ slowdown ¡ More ¡specific ¡count ¡if ¡ there ¡are ¡more ¡ threads ¡than ¡cores ¡

slide-15
SLIDE 15

Harmony: ¡A ¡tool ¡for ¡PBV ¡Collec.on ¡

  • Downloadable ¡tool: ¡ ¡

¡ ¡ ¡ ¡arcade.cs.columbia.edu/harmony ¡

  • LLVM ¡Pass ¡− ¡easy ¡for ¡people ¡to ¡use, ¡just ¡run ¡

compile ¡program ¡then ¡run ¡normally ¡

  • Precise, ¡not ¡sampled ¡− ¡otherwise ¡might ¡not ¡

see ¡outliers ¡

  • OpBmized ¡for ¡low ¡overheads ¡− ¡don’t ¡want ¡to ¡

perturb ¡parallel ¡programs! ¡

15 ¡

slide-16
SLIDE 16

Collec.ng ¡PBV ¡Profiles ¡

BB6 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB6 ¡ BB1 ¡ BB2 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB7 ¡ BB6 ¡ BB8 ¡ BB3 ¡ BB4 ¡ BB5 ¡ BB9 ¡

Main ¡Idea: ¡ Low ¡overhead ¡ collec.on ¡via ¡ sta.cally ¡inserted ¡ instrumenta.on ¡ points ¡to ¡collect ¡ ¡ data ¡dynamically ¡ upon ¡execu.on. ¡

16 ¡

slide-17
SLIDE 17

Collec.ng ¡PBV ¡Profiles ¡

BB6 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB6 ¡ BB1 ¡ BB2 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB7 ¡ BB6 ¡ BB8 ¡ BB3 ¡ BB4 ¡ BB5 ¡ BB9 ¡

At ¡program ¡start ¡ and ¡end: ¡create ¡ data ¡structures ¡

17 ¡

slide-18
SLIDE 18

BB6 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB6 ¡ BB1 ¡ BB2 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB7 ¡ BB6 ¡ BB8 ¡ BB3 ¡ BB4 ¡ BB5 ¡ BB9 ¡

At ¡program ¡start ¡ and ¡end ¡ ¡ At ¡thread ¡create ¡ and ¡exit: ¡ ¡ adjust ¡global ¡ thread ¡counts ¡

18 ¡

Collec.ng ¡PBV ¡Profiles ¡

slide-19
SLIDE 19

BB6 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB6 ¡ BB1 ¡ BB2 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB7 ¡ BB6 ¡ BB8 ¡ BB3 ¡ BB4 ¡ BB5 ¡ BB9 ¡

At ¡program ¡start ¡ and ¡end ¡ ¡ At ¡thread ¡create ¡ and ¡exit ¡ ¡ ¡ At ¡blocking ¡calls: ¡ adjust ¡global ¡ thread ¡counts ¡

19 ¡

Collec.ng ¡PBV ¡Profiles ¡

slide-20
SLIDE 20

BB6 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB6 ¡ BB1 ¡ BB2 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB7 ¡ BB6 ¡ BB8 ¡ BB3 ¡ BB4 ¡ BB5 ¡ BB9 ¡

At ¡program ¡start ¡ and ¡end ¡ ¡ At ¡thread ¡create ¡ and ¡exit ¡ Per ¡basic ¡block: ¡ Increment ¡counter ¡

20 ¡

Collec.ng ¡PBV ¡Profiles ¡

slide-21
SLIDE 21

Strategies ¡for ¡Keeping ¡Overheads ¡Low ¡

21 ¡

Strategy ¡ Effect ¡

Sta.c ¡instrumenta.on ¡ Overhead ¡in ¡compile, ¡not ¡ run.me ¡ Push ¡instrumenta.on ¡

  • utside ¡of ¡basic ¡blocks ¡
  • Min. ¡overhead ¡(single ¡

incr.) ¡per ¡block ¡ Thread ¡specific ¡ structures ¡& ¡counters ¡ No ¡excessive ¡locking ¡ Organize ¡data ¡for ¡cache ¡ locality ¡ L1-­‑I ¡and ¡L1-­‑D ¡miss ¡rates ¡ increased ¡<=0.06, ¡0.2% ¡

slide-22
SLIDE 22

0 % 10 % 20 % 30 % 40 % 50 % blackscholes bodytrack dedup facesim fluidanimate streamcluster swaptions x264 blackscholes bodytrack dedup facesim fluidanimate streamcluster swaptions x264 Overhead Keep Thread Count Increment Histogram Profiling (Effective Threads) Profiling (Nominal Threads)

Harmony ¡Overheads ¡on ¡Parsec ¡

  • Avg. ¡overhead ¡= ¡21% ¡
  • Avg. ¡overhead ¡= ¡16% ¡

Max ¡overhead ¡= ¡44% ¡

22 ¡

slide-23
SLIDE 23

BB6 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB6 ¡ BB1 ¡ BB2 ¡ BB7 ¡ BB8 ¡ BB9 ¡ BB7 ¡ BB6 ¡ BB8 ¡ BB3 ¡ BB4 ¡ BB5 ¡ BB9 ¡

23 ¡

Harmony ¡Overheads ¡on ¡Parsec ¡

  • Avg. ¡overhead ¡= ¡16.2% ¡

2.5% ¡ 0.8% ¡ 13.0% ¡

slide-24
SLIDE 24

PBV ¡Profiles ¡of ¡Parsec ¡Applica.ons ¡

5 Nominal TC (3054 BBLs) 1 100 10000 1e+06 1e+08 1e+10 1e+12 5 Nominal TC (3054 BBLs)

StaBc ¡BBLs ¡ # ¡of ¡Dynamic ¡Execu.ons ¡

Nominal TC (3547 BBLs) Nominal TC (3547 BBLs) 1 2 3 4 5 Nominal TC fluidanimate (374 BBLs) 1 2 3 4 5 Nominal TC fluidanimate (374 BBLs) 1 2 3 4 5 Nominal TC streamcluster (286 BBLs) 1 2 3 4 5 Nominal TC streamcluster (286 BBLs) 1 2 3 4 5 Nominal TC swaptions (147 BBLs) 1 2 3 4 5 Nominal TC swaptions (147 BBLs) 1 2 3 4 5 Nominal TC x264 (3054 BBLs) 1 2 3 4 5 Nominal TC x264 (3054 BBLs)

Nominal ¡Thread ¡Count ¡

TC= ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡ BB1 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ BB2 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ BB3 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ BB4 ¡ 0 ¡ 0 ¡ 0 ¡ 1 ¡ BB5 ¡ 1 ¡ 0 ¡ 0 ¡ 0 ¡ BB6 ¡ 0 ¡ 0 ¡ 0 ¡ 3 ¡ BB7 ¡ 0 ¡ 0 ¡ 0 ¡ 3 ¡ BB8 ¡ 0 ¡ 0 ¡ 0 ¡ 3 ¡ BB9 ¡ 0 ¡ 0 ¡ 1 ¡ 2 ¡

24 ¡

slide-25
SLIDE 25

PBV ¡Profiles ¡of ¡Parsec ¡Applica.ons ¡

5 Nominal TC (3054 BBLs) 1 100 10000 1e+06 1e+08 1e+10 1e+12 5 Nominal TC (3054 BBLs)

Sta.c ¡BBLs ¡ # ¡of ¡Dynamic ¡Execu.ons ¡

Nominal TC (3547 BBLs) Nominal TC (3547 BBLs) 1 2 3 4 5 Nominal TC fluidanimate (374 BBLs) 1 2 3 4 5 Nominal TC fluidanimate (374 BBLs) 1 2 3 4 5 Nominal TC streamcluster (286 BBLs) 1 2 3 4 5 Nominal TC streamcluster (286 BBLs) 1 2 3 4 5 Nominal TC swaptions (147 BBLs) 1 2 3 4 5 Nominal TC swaptions (147 BBLs) 1 2 3 4 5 Nominal TC x264 (3054 BBLs) 1 2 3 4 5 Nominal TC x264 (3054 BBLs)

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 0 ¡ 0 ¡ BB6 ¡ 0 ¡ 0 ¡ 0 ¡ 3 ¡ BB7 ¡ 0 ¡ 0 ¡ 0 ¡ 3 ¡ BB8 ¡ 0 ¡ 0 ¡ 0 ¡ 3 ¡ BB9 ¡ 0 ¡ 0 ¡ 1 ¡ 2 ¡

26 ¡

slide-27
SLIDE 27

PBV ¡Profiles ¡of ¡Parsec ¡Applica.ons ¡

5 Nominal TC (3054 BBLs) 1 100 10000 1e+06 1e+08 1e+10 1e+12 5 Nominal TC (3054 BBLs)

Sta.c ¡BBLs ¡ # ¡of ¡Dynamic ¡Execu.ons ¡

Nominal TC (3547 BBLs) Nominal TC (3547 BBLs) 1 2 3 4 5 Nominal TC fluidanimate (374 BBLs) 1 2 3 4 5 Nominal TC fluidanimate (374 BBLs) 1 2 3 4 5 Nominal TC streamcluster (286 BBLs) 1 2 3 4 5 Nominal TC streamcluster (286 BBLs) 1 2 3 4 5 Nominal TC swaptions (147 BBLs) 1 2 3 4 5 Nominal TC swaptions (147 BBLs) 1 2 3 4 5 Nominal TC x264 (3054 BBLs) 1 2 3 4 5 Nominal TC x264 (3054 BBLs)

Nominal ¡Thread ¡Count ¡

27 ¡

slide-28
SLIDE 28
  • 1. Can ¡Amdahl’s ¡Law ¡for ¡es.ma.ng ¡

scalability ¡be ¡mapped ¡to ¡source ¡code? ¡

Using ¡PBVs ¡to ¡Uncover ¡ ¡ Program ¡Features ¡

28 ¡

What ¡code ¡ ¡ runs ¡in ¡these ¡ fracBons? ¡

Speedupparallel f ,n

( ) =

1 1− f

( ) + f

n

slide-29
SLIDE 29

Parallel ¡Phases ¡in ¡the ¡Sample ¡Profiles ¡

5 Nominal TC (3054 BBLs) 1 100 10000 1e+06 1e+08 1e+10 1e+12 5 Nominal TC (3054 BBLs)

Sta.c ¡BBLs ¡ # ¡of ¡Dynamic ¡Execu.ons ¡

Nominal TC (3547 BBLs) Nominal TC (3547 BBLs) 1 2 3 4 5 Nominal TC fluidanimate (374 BBLs) 1 2 3 4 5 Nominal TC fluidanimate (374 BBLs) 1 2 3 4 5 Nominal TC streamcluster (286 BBLs) 1 2 3 4 5 Nominal TC streamcluster (286 BBLs) 1 2 3 4 5 Nominal TC swaptions (147 BBLs) 1 2 3 4 5 Nominal TC swaptions (147 BBLs) 1 2 3 4 5 Nominal TC x264 (3054 BBLs) 1 2 3 4 5 Nominal TC x264 (3054 BBLs)

Nominal ¡Thread ¡Count ¡

Always ¡ Parallel ¡ Always ¡ Serial ¡ Mixed ¡

29 ¡

slide-30
SLIDE 30

Using ¡PBVs ¡to ¡Uncover ¡ ¡ Program ¡Features ¡

  • 1. Can ¡Amdahl’s ¡Law ¡for ¡es.ma.ng ¡

scalability ¡be ¡mapped ¡to ¡source ¡code? ¡

  • 2. Do ¡we ¡need ¡to ¡design ¡accelerators ¡

differently ¡for ¡different ¡parallelism ¡ phases? ¡

30 ¡

slide-31
SLIDE 31

Instruc.on ¡Mixes ¡by ¡Parallelism ¡Class ¡

31 ¡

ld/st lea arith (int) arith (fp)

0.2 0.4 0.6 0.8 1 All Serial Mixed Parallel All Serial Mixed Parallel All Serial Mixed Parallel All Serial Mixed Parallel x264 streamcluster fluidanimate facesim

cmp cond CT uncond CT sync

arith (int) arith (fp) stack cmp cond CT

100% ¡ 0% ¡

Dynamic ¡ ¡Insmix ¡

Insmix ¡in ¡whole ¡program ¡with ¡different ¡ categories ¡of ¡x86 ¡instruc.ons, ¡e.g. ¡ ~10% ¡synchroniza.on ¡instrs, ¡and ¡ ¡ ~30% ¡integer ¡arithme.c ¡

slide-32
SLIDE 32

Instruc.on ¡Mixes ¡by ¡Parallelism ¡Class ¡

32 ¡

ld/st lea arith (int) arith (fp)

0.2 0.4 0.6 0.8 1 All Serial Mixed Parallel All Serial Mixed Parallel All Serial Mixed Parallel All Serial Mixed Parallel x264 streamcluster fluidanimate facesim

cmp cond CT uncond CT sync

arith (int) arith (fp) stack cmp cond CT

100% ¡ 0% ¡

Insmix ¡in ¡serial ¡program ¡with ¡different ¡ categories ¡of ¡x86 ¡instruc.ons, ¡ ¡ % ¡synch ¡instrs ¡increases ¡to ¡~20%, ¡ % ¡integer ¡arithme.c ¡decreases ¡to ¡~7% ¡

Dynamic ¡ ¡Insmix ¡

slide-33
SLIDE 33

Instruc.on ¡Mixes ¡by ¡Parallelism ¡Class ¡

33 ¡

ld/st lea arith (int) arith (fp)

0.2 0.4 0.6 0.8 1 All Serial Mixed Parallel All Serial Mixed Parallel All Serial Mixed Parallel All Serial Mixed Parallel x264 streamcluster fluidanimate facesim

cmp cond CT uncond CT sync

arith (int) arith (fp) stack cmp cond CT

100% ¡ 0% ¡

One ¡conclusion: ¡accelerators ¡ ¡ for ¡serial ¡por.ons ¡may ¡need ¡ ¡ to ¡be ¡different ¡than ¡whole ¡ program ¡accelerators. ¡

Dynamic ¡ ¡Insmix ¡

slide-34
SLIDE 34

Instruc.on ¡Mixes ¡by ¡Parallelism ¡Class ¡

34 ¡

ld/st lea arith (int) arith (fp)

0.2 0.4 0.6 0.8 1 All Serial Mixed Parallel All Serial Mixed Parallel All Serial Mixed Parallel All Serial Mixed Parallel x264 streamcluster fluidanimate facesim

cmp cond CT uncond CT sync

arith (int) arith (fp) stack cmp cond CT

100% ¡ 0% ¡

Dynamic ¡ ¡Insmix ¡

slide-35
SLIDE 35
  • 1. Can ¡Amdahl’s ¡Law ¡for ¡es.ma.ng ¡

scalability ¡be ¡mapped ¡to ¡source ¡code? ¡

  • 2. Do ¡we ¡need ¡to ¡design ¡accelerators ¡

differently ¡for ¡different ¡parallelism ¡ phases? ¡

  • 3. What ¡can ¡we ¡learn ¡about ¡hotspots ¡using ¡

PBVs? ¡

Using ¡PBVs ¡to ¡Uncover ¡ ¡ Program ¡Features ¡

35 ¡

slide-36
SLIDE 36

Hoqest ¡blocks ¡are ¡not ¡always ¡ ¡ the ¡most ¡parallel ¡blocks ¡

1 100 10000 1e+06 1e+08 1e+10 1 2 3 4 5 # Dynamic Block Execs

  • Avg. Nominal Threads

fluidanimate

36 ¡

Serial ¡blocks ¡ are ¡hot ¡ ¡ (worth ¡ ¡

  • pBmizing) ¡ ¡
slide-37
SLIDE 37

Few ¡blocks ¡represent ¡large ¡ ¡ por.on ¡of ¡serial ¡block ¡execu.ons ¡

% Static Serial BBLs 25 50 75 100 10 20 30 40 50 60 70 80 90 100

blackscholes bodytrack dedup facesim fluidanimate blackscholes bodytrack dedup facesim fluidanimate

% ¡Dynamic ¡Block ¡Execu.on ¡

facesim fluidanimate streamcluster swaptions x264 facesim fluidanimate streamcluster swaptions x264

37 ¡

Small ¡% ¡of ¡blocks ¡ for ¡which ¡to ¡target ¡

  • pBmizaBons. ¡
slide-38
SLIDE 38

Future ¡direc.ons ¡for ¡PBVs? ¡

38 ¡

  • ¡Up ¡to ¡you! ¡(download ¡our ¡code) ¡
  • ¡A ¡few ¡ideas… ¡
slide-39
SLIDE 39

Using ¡PBVs ¡in ¡Sorware ¡Engineering ¡

39 ¡

Parallelism ¡AsserBons ¡to ¡check ¡if ¡applica.ons ¡ run ¡as ¡developers ¡expect. ¡

BB:24 ¡ 99 ¡ 0 ¡ 0 ¡ 1 ¡

IdenBfy ¡IrregulariBes ¡if ¡a ¡block ¡runs ¡serially ¡ 99% ¡of ¡the ¡.me ¡and ¡in ¡parallel ¡1% ¡of ¡the ¡.me, ¡ might ¡be ¡a ¡concurrency ¡bug. ¡ ¡

TC ¡= ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡

slide-40
SLIDE 40

Using ¡PBVs ¡in ¡Systems ¡Scheduling ¡

5 Nominal TC 5 Nominal TC 1 2 3 4 5 Nominal TC 1 2 3 4 5 Nominal TC 1 Nominal TC 1 Nominal TC

Mixed ¡

40 ¡

Examine ¡mixed ¡blocks: ¡ are ¡some ¡indica.ve ¡of ¡ poor ¡scheduling ¡choices? ¡ PredicBng ¡or ¡classifying ¡ scalability ¡at ¡granulari.es ¡ like ¡func.on ¡or ¡algorithm ¡ level ¡instead ¡of ¡whole ¡

  • program. ¡
slide-41
SLIDE 41

Using ¡PBVs ¡in ¡Compilers ¡

41 ¡

Always ¡ Parallel ¡ Mixed ¡ Always ¡ Serial ¡

Annotate ¡blocks ¡by ¡ parallelism ¡then ¡use ¡ annota.ons ¡to ¡ ¡ choose ¡op.miza.ons, ¡ beqer ¡target ¡code ¡to ¡

  • processors. ¡
slide-42
SLIDE 42

Takeaways ¡

  • Parallel ¡block ¡vector ¡profiles ¡map ¡dynamic ¡

parallelism ¡to ¡source ¡code ¡(at ¡fine ¡ granularity) ¡for ¡the ¡first ¡.me. ¡ ¡

  • New ¡features ¡iden.fiable ¡with ¡PBVs ¡could ¡

lead ¡to ¡advances ¡in ¡architectural ¡design, ¡ O/S, ¡S/W ¡engineering, ¡compilers ¡ ¡

h`p://arcade.cs.columbia.edu/harmony ¡

42 ¡

slide-43
SLIDE 43