14
Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough? Nate Clark 4/6/08

Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

Embed Size (px)

DESCRIPTION

Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?. Nate Clark 4/6/08. The Biggest Problem in HMC: Software. Parallel programming is hard Heterogeneous programming is hard Forward compatibility Legacy applications. I am a frustrated programmer. - PowerPoint PPT Presentation

Citation preview

Page 1: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

Nate Clark

4/6/08

Page 2: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

2

The Biggest Problem in HMC: Software

• Parallel programming is hard

• Heterogeneous programming is hard

• Forward compatibility

• Legacy applications

I am afrustrated

programmer

Page 3: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

3

Parallel Software Development

• New Languages– Legacy code– Difficult to write– Poor adoption rate

• Libraries– Legacy code– Functionality defined a priori– Hinders optimization

Page 4: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

4

Compiler Parallelization

• “Decades of automatic parallelization work has been a failure…” – James Larus– Better analysis– Better hardware support

[Nystrom 04]

Page 5: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

5

Compiler Parallelization ResultsBenchmark Threads at Peak Speedup LOCs Changed

164.gzip 32+ 29.91 26

175.vpr 15 3.59 1

176.gcc 16 5.06 17

181.mcf 32+ 2.84 0

186.crafty 32+ 25.18 9

197.parser 32+ 24.50 2

253.perlbmk 5 1.21 0

254.gap 10 1.94 1

255.vortex 32+ 4.92 0

256.bzip2 12 6.72 0

300.twolf 8 2.06 1

GEOMEAN 17 5.54

ARITHMEAN 20 9.81

[Bridges 07]

Page 6: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

6

Static Compiler Problems

• Limited scope– Dynamic linking, dynamic code generation

• Recompilation too costly

• Static solution, doesn’t adapt to– New HW– System behavior

Page 7: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

7

What About Dynamic Compilation?

• No visibility problems

• No recompilation

• Adaptive

• Problems– No semantic information– Speed

Page 8: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

8

Automatic Parallelization Enablers

• Constraint analysis

• Pointer alias analysis

• Commutativity analysis

• Can we do this dynamically?

[Ryoo 07]

Page 9: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

9

Dynamic Constraint Analysis

• Java – lots of related work– Array bounds checks

• Software Engineering– Inferring invariants – safe code modification

Page 10: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

10

Dynamic Alias Analysis

• Java again – lots of related work

• x86 code, too– 73% dependences removed [Guo 06]

Page 11: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

11

Dynamic Commutativity Analysis

• None yet…– Static version [Diniz 96]

• Other open problems– Runtime / performance tradeoffs– Debugging

• People have done this! [Rauchwerger95]

Page 12: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

12

Not a Panacea

• “We MUST reject this paper.”– Reviewer #5

• Good for “embarrassingly parallel” apps?– Still very useful

• Developer works with compiler – Familiar development environment

Page 13: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

13

Summary

• Automatic parallelization is often effective– New analyses, HW support

• Dynamic compilation solves many problems– Visibility, legacy code, adaptive

• Useful even when it can’t parallelize– Easy path for sequential legacy code

Page 14: Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?

14

Thank you!

http://www.cc.gatech.edu/~ntclark