Do we still care about single thread performance? ACACES - - PowerPoint PPT Presentation

do we still care about single thread performance
SMART_READER_LITE
LIVE PREVIEW

Do we still care about single thread performance? ACACES - - PowerPoint PPT Presentation

Do we still care about single thread performance? ACACES 2008 Dean Tullsen Speedup 1.0 .1 .9 ACACES 2008 Dean Tullsen Speedup 1.0 .1 .9 1/.55 = 1.82 .1 .45 ACACES 2008 Dean


slide-1
SLIDE 1

Dean ¡Tullsen ACACES ¡2008

 Do ¡we ¡still ¡care ¡about ¡single ¡thread ¡

performance?

slide-2
SLIDE 2

Dean ¡Tullsen ACACES ¡2008

.9 .1 Speedup

1.0

slide-3
SLIDE 3

Dean ¡Tullsen ACACES ¡2008

.9 .1 .1 .45 Speedup

1.0 1/.55 ¡= ¡1.82

slide-4
SLIDE 4

Dean ¡Tullsen ACACES ¡2008

.9 .1 .1 .1 .45 .225 Speedup

1.0 1/.55 ¡= ¡1.82 1/.325 ¡= ¡3.07

slide-5
SLIDE 5

Dean ¡Tullsen ACACES ¡2008

.9 .1 .1 .1 .1 .45 .225 Speedup

1.0 1/.55 ¡= ¡1.82 1/.325 ¡= ¡3.07 < ¡10

slide-6
SLIDE 6

Dean ¡Tullsen ACACES ¡2008

slide-7
SLIDE 7

Dean ¡Tullsen ACACES ¡2008

 Parallelism ¡– ¡Use ¡multiple ¡contexts ¡to ¡achieve ¡better ¡

performance ¡than ¡possible ¡on ¡a ¡single ¡context.

slide-8
SLIDE 8

Dean ¡Tullsen ACACES ¡2008

 Parallelism ¡– ¡Use ¡multiple ¡contexts ¡to ¡achieve ¡better ¡

performance ¡than ¡possible ¡on ¡a ¡single ¡context.

 Traditional ¡Parallelism ¡– ¡We ¡use ¡extra ¡threads/processors ¡

to ¡offload ¡computation. ¡ ¡Threads ¡divide ¡up ¡the ¡execution ¡ stream.

slide-9
SLIDE 9

Dean ¡Tullsen ACACES ¡2008

 Parallelism ¡– ¡Use ¡multiple ¡contexts ¡to ¡achieve ¡better ¡

performance ¡than ¡possible ¡on ¡a ¡single ¡context.

 Traditional ¡Parallelism ¡– ¡We ¡use ¡extra ¡threads/processors ¡

to ¡offload ¡computation. ¡ ¡Threads ¡divide ¡up ¡the ¡execution ¡ stream.

 Non-­‑traditional ¡parallelism ¡– ¡Extra ¡threads ¡are ¡used ¡to ¡

speed ¡up ¡computation ¡without ¡necessarily ¡off-­‑loading ¡any ¡

  • f ¡the ¡original ¡computation
  • Primary ¡advantage ¡ ¡nearly ¡any ¡code, ¡no ¡matter ¡how ¡inherently ¡

serial, ¡can ¡benefit ¡from ¡parallelization.

  • Another ¡advantage ¡– ¡threads ¡can ¡be ¡added ¡or ¡subtracted ¡without ¡

significant ¡disruption.

slide-10
SLIDE 10

Dean ¡Tullsen ACACES ¡2008

slide-11
SLIDE 11

Dean ¡Tullsen ACACES ¡2008

slide-12
SLIDE 12

Dean ¡Tullsen ACACES ¡2008

Thread ¡1 ¡ ¡ ¡ ¡Thread ¡2 ¡ ¡ ¡Thread ¡3 ¡ ¡ ¡Thread ¡4

slide-13
SLIDE 13

Dean ¡Tullsen ACACES ¡2008

slide-14
SLIDE 14

Dean ¡Tullsen ACACES ¡2008

slide-15
SLIDE 15

Dean ¡Tullsen ACACES ¡2008

Thread ¡1 ¡ ¡ ¡ ¡Thread ¡2 ¡ ¡ ¡Thread ¡3 ¡ ¡ ¡Thread ¡4

slide-16
SLIDE 16

Dean ¡Tullsen ACACES ¡2008

Thread ¡1 ¡ ¡ ¡ ¡Thread ¡2 ¡ ¡ ¡Thread ¡3 ¡ ¡ ¡Thread ¡4

 Speculative ¡

precomputation, ¡dynamic ¡ speculative ¡ precomputation, ¡many ¡

  • thers.
slide-17
SLIDE 17

Dean ¡Tullsen ACACES ¡2008

Thread ¡1 ¡ ¡ ¡ ¡Thread ¡2 ¡ ¡ ¡Thread ¡3 ¡ ¡ ¡Thread ¡4

 Speculative ¡

precomputation, ¡dynamic ¡ speculative ¡ precomputation, ¡many ¡

  • thers.

 Most ¡commonly ¡– ¡

prefetching, ¡possibly ¡ branch ¡pre-­‑calculation.

slide-18
SLIDE 18

Dean ¡Tullsen ACACES ¡2008

 Chappell, ¡Stark, ¡Kim, ¡Reinhardt, ¡Patt, ¡

“Simultaneous ¡Subordinate ¡Micro-­‑threading” ¡ 1999

  • Use ¡microcoded ¡threads ¡to ¡manipulate ¡the ¡

microarchitecture ¡to ¡improve ¡the ¡performance ¡of ¡ the ¡main ¡thread.

 Zilles ¡2001, ¡Collins ¡2001, ¡Luk ¡2001

  • Use ¡a ¡regular ¡SMT ¡thread, ¡with ¡code ¡distilled ¡from ¡

the ¡main ¡thread, ¡to ¡support ¡the ¡main ¡thread.

slide-19
SLIDE 19

Dean ¡Tullsen ACACES ¡2008

 Speculative ¡Precomputation ¡[Collins, ¡et ¡al ¡

2001 ¡– ¡Intel/UCSD]

 Dynamic ¡Speculative ¡Precomputation  Event-­‑Driven ¡Simultaneous ¡Optimization

  • Value ¡Specialization
  • Inline ¡Prefetching
  • Thread ¡Prefetching
slide-20
SLIDE 20

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

1.000 8.910 16.821 24.731 32.642 art equake gzip mcf health mst

4.46 27.90 2.47 1.04 2.76 1.41 5.79 32.64 4.79 1.14 6.28 3.30 Speedup

Perfect Memory Perfect Delinquent Loads (10)

slide-21
SLIDE 21

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

1.000 8.910 16.821 24.731 32.642 art equake gzip mcf health mst

4.46 27.90 2.47 1.04 2.76 1.41 5.79 32.64 4.79 1.14 6.28 3.30 Speedup

Perfect Memory Perfect Delinquent Loads (10)

slide-22
SLIDE 22

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

slide-23
SLIDE 23

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 In ¡SP, ¡a ¡p-­‑slice ¡is ¡a ¡thread ¡derived ¡from ¡a ¡trace ¡of ¡

execution ¡between ¡a ¡trigger ¡instruction ¡and ¡the ¡ delinquent ¡load.

slide-24
SLIDE 24

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 In ¡SP, ¡a ¡p-­‑slice ¡is ¡a ¡thread ¡derived ¡from ¡a ¡trace ¡of ¡

execution ¡between ¡a ¡trigger ¡instruction ¡and ¡the ¡ delinquent ¡load.

 All ¡instructions ¡upon ¡which ¡the ¡load’s ¡address ¡is ¡not ¡

dependent ¡are ¡removed ¡(often ¡90-­‑95%).

slide-25
SLIDE 25

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 In ¡SP, ¡a ¡p-­‑slice ¡is ¡a ¡thread ¡derived ¡from ¡a ¡trace ¡of ¡

execution ¡between ¡a ¡trigger ¡instruction ¡and ¡the ¡ delinquent ¡load.

 All ¡instructions ¡upon ¡which ¡the ¡load’s ¡address ¡is ¡not ¡

dependent ¡are ¡removed ¡(often ¡90-­‑95%).

 Live-­‑in ¡register ¡values ¡(typically ¡2-­‑6) ¡must ¡be ¡

explicitly ¡copied ¡from ¡main ¡thread ¡to ¡helper ¡thread.

slide-26
SLIDE 26

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

Delinquent ¡load

slide-27
SLIDE 27

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

Delinquent ¡load Trigger ¡instruction

slide-28
SLIDE 28

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

Delinquent ¡load Trigger ¡instruction Spawn ¡thread

slide-29
SLIDE 29

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

Delinquent ¡load Trigger ¡instruction Prefetch Spawn ¡thread

slide-30
SLIDE 30

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

Delinquent ¡load Trigger ¡instruction Prefetch Spawn ¡thread Memory ¡latency

slide-31
SLIDE 31

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

slide-32
SLIDE 32

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 Because ¡SP ¡uses ¡actual ¡program ¡code, ¡can ¡precompute ¡

addresses ¡that ¡fit ¡no ¡predictable ¡pattern.

slide-33
SLIDE 33

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 Because ¡SP ¡uses ¡actual ¡program ¡code, ¡can ¡precompute ¡

addresses ¡that ¡fit ¡no ¡predictable ¡pattern.

 Because ¡SP ¡runs ¡in ¡a ¡separate ¡thread, ¡it ¡can ¡interfere ¡

with ¡the ¡main ¡thread ¡much ¡less ¡than ¡software ¡

  • prefetching. ¡When ¡it ¡isn’t ¡working, ¡it ¡can ¡be ¡killed.
slide-34
SLIDE 34

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 Because ¡SP ¡uses ¡actual ¡program ¡code, ¡can ¡precompute ¡

addresses ¡that ¡fit ¡no ¡predictable ¡pattern.

 Because ¡SP ¡runs ¡in ¡a ¡separate ¡thread, ¡it ¡can ¡interfere ¡

with ¡the ¡main ¡thread ¡much ¡less ¡than ¡software ¡

  • prefetching. ¡When ¡it ¡isn’t ¡working, ¡it ¡can ¡be ¡killed.

 Because ¡it ¡is ¡decoupled ¡from ¡the ¡main ¡thread, ¡the ¡

prefetcher ¡is ¡not ¡constrained ¡by ¡the ¡control ¡flow ¡of ¡the ¡ main ¡thread.

slide-35
SLIDE 35

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 Because ¡SP ¡uses ¡actual ¡program ¡code, ¡can ¡precompute ¡

addresses ¡that ¡fit ¡no ¡predictable ¡pattern.

 Because ¡SP ¡runs ¡in ¡a ¡separate ¡thread, ¡it ¡can ¡interfere ¡

with ¡the ¡main ¡thread ¡much ¡less ¡than ¡software ¡

  • prefetching. ¡When ¡it ¡isn’t ¡working, ¡it ¡can ¡be ¡killed.

 Because ¡it ¡is ¡decoupled ¡from ¡the ¡main ¡thread, ¡the ¡

prefetcher ¡is ¡not ¡constrained ¡by ¡the ¡control ¡flow ¡of ¡the ¡ main ¡thread.

slide-36
SLIDE 36

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 Because ¡SP ¡uses ¡actual ¡program ¡code, ¡can ¡precompute ¡

addresses ¡that ¡fit ¡no ¡predictable ¡pattern.

 Because ¡SP ¡runs ¡in ¡a ¡separate ¡thread, ¡it ¡can ¡interfere ¡

with ¡the ¡main ¡thread ¡much ¡less ¡than ¡software ¡

  • prefetching. ¡When ¡it ¡isn’t ¡working, ¡it ¡can ¡be ¡killed.

 Because ¡it ¡is ¡decoupled ¡from ¡the ¡main ¡thread, ¡the ¡

prefetcher ¡is ¡not ¡constrained ¡by ¡the ¡control ¡flow ¡of ¡the ¡ main ¡thread.

 All ¡the ¡applications ¡in ¡this ¡study ¡already ¡had ¡very ¡

aggressive ¡software ¡prefetching ¡applied, ¡when ¡possible.

slide-37
SLIDE 37

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

slide-38
SLIDE 38

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 On-­‑chip ¡memory ¡for ¡transfer ¡of ¡live-­‑in ¡values.

slide-39
SLIDE 39

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 On-­‑chip ¡memory ¡for ¡transfer ¡of ¡live-­‑in ¡values.  Chaining ¡triggers ¡– ¡for ¡delinquent ¡loads ¡in ¡loops, ¡a ¡

speculative ¡thread ¡can ¡trigger ¡the ¡next ¡p-­‑slice ¡(think ¡

  • f ¡this ¡as ¡a ¡looping ¡prefetcher ¡which ¡targets ¡a ¡load ¡

within ¡a ¡loop)

  • Minimizes ¡live-­‑in ¡copy ¡overhead.
  • Enables ¡SP ¡threads ¡to ¡get ¡arbitrarily ¡far ¡ahead.
  • Necessitates ¡a ¡mechanism ¡to ¡stop ¡the ¡chaining ¡prefetcher.
slide-40
SLIDE 40

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

 Chaining ¡triggers ¡executed ¡without ¡impacting ¡

main ¡thread

 Target ¡delinquent ¡loads ¡arbitrarily ¡far ¡ahead ¡of ¡

non-­‑speculative ¡thread

  • Speculative ¡threads ¡make ¡progress ¡independent ¡of ¡

main ¡thread

 Use ¡basic ¡triggers ¡to ¡initiate ¡precomputation, ¡but ¡

use ¡chaining ¡triggers ¡to ¡sustain ¡it

slide-41
SLIDE 41

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

0.80 1.85 2.90 3.95 5.00 a r t e q u a k e g z i p m c f h e a l t h m s t A v e r a g e Speedup over Baseline

2 Thread Contexts 4 Thread Contexts 8 Thread Contexts

slide-42
SLIDE 42

Dean ¡Tullsen ACACES ¡2008

Dean ¡Tullsen Processor ¡Architecture ¡and ¡Compilation ¡Lab

0.80 1.85 2.90 3.95 5.00 a r t e q u a k e g z i p m c f h e a l t h m s t A v e r a g e Speedup over Baseline

2 Thread Contexts 4 Thread Contexts 8 Thread Contexts