why should i rewrite my software when dynamic compilation can be good enough?
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 PresentationTRANSCRIPT
Why Should I Rewrite My Software When Dynamic Compilation Can Be Good Enough?
Nate Clark
4/6/08
2
The Biggest Problem in HMC: Software
• Parallel programming is hard
• Heterogeneous programming is hard
• Forward compatibility
• Legacy applications
I am afrustrated
programmer
3
Parallel Software Development
• New Languages– Legacy code– Difficult to write– Poor adoption rate
• Libraries– Legacy code– Functionality defined a priori– Hinders optimization
4
Compiler Parallelization
• “Decades of automatic parallelization work has been a failure…” – James Larus– Better analysis– Better hardware support
[Nystrom 04]
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]
6
Static Compiler Problems
• Limited scope– Dynamic linking, dynamic code generation
• Recompilation too costly
• Static solution, doesn’t adapt to– New HW– System behavior
7
What About Dynamic Compilation?
• No visibility problems
• No recompilation
• Adaptive
• Problems– No semantic information– Speed
8
Automatic Parallelization Enablers
• Constraint analysis
• Pointer alias analysis
• Commutativity analysis
• Can we do this dynamically?
[Ryoo 07]
9
Dynamic Constraint Analysis
• Java – lots of related work– Array bounds checks
• Software Engineering– Inferring invariants – safe code modification
10
Dynamic Alias Analysis
• Java again – lots of related work
• x86 code, too– 73% dependences removed [Guo 06]
11
Dynamic Commutativity Analysis
• None yet…– Static version [Diniz 96]
• Other open problems– Runtime / performance tradeoffs– Debugging
• People have done this! [Rauchwerger95]
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
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
14
Thank you!
http://www.cc.gatech.edu/~ntclark