lab: introduction to loop transformations tomofumi yuki ejcp 2015 june 22, nancy
TRANSCRIPT
Lab: Introduction to Loop Transformations
Tomofumi Yuki
EJCP 2015June 22, Nancy
EJCP 2015, June 22, Nancy
2
Experimental Validation
Essential to many scientific domain 1. Build a hypothesis 2. See if numbers support it
In optimizing compiler research prove optimality, or do empirical validation
Getting X% speedup by itself is USELESS provide why
EJCP 2015, June 22, Nancy
3
Computer Scientific Method
Slides from David Patterson Talk: How to Have a Bad Career In
Research/Academia www.cs.berkeley.edu/~pattrsn/talks/
nontech.html Many nice tips for Ph.D. students and
beyond
EJCP 2015, June 22, Nancy
4
Bad Career Move #4: Use the Computer Scientific Method Obsolete Scientific Method
hypothesis sequences of experiments prove/disprove hypothesis reproducible
Computer Scientific Method hunch! an experiment with lots of parameters forget if it doesn’t support hunch
EJCP 2015, June 22, Nancy
5
Plan for the Afternoon
Mixture of lecture + lab 1. Performance Measurement
2. Loop Transformations by Hand
3. How to Punch the Audience
EJCP 2015, June 22, Nancy
6
Example 1: Parallel Performance Setup
parallelized a function of a program measured exec. time of the function up to 8 cores
EJCP 2015, June 22, Nancy
7
Example 1: Parallel Performance What can you say?
1 core 2 cores
4 cores
8 cores
020406080
100120
function A
function A
exe
cuti
on
tim
e (
s)
EJCP 2015, June 22, Nancy
8
Example 1: Parallel Performance Is it better?
1 core 2 cores
4 cores
8 cores
0
2
4
6
8
10
function A
function A
speed
up
EJCP 2015, June 22, Nancy
9
Example 1: Parallel Performance How about this?
1 core 2 cores
4 cores
8 cores
1
10
function A
function A
speed
up
EJCP 2015, June 22, Nancy
10
Key Principle in Plotting Data Make it a straight line
preferably 45 degree angle
Reason: much easier to make claims claiming a curve is quadratic
showing it becomes a straight line after sqrt
EJCP 2015, June 22, Nancy
11
Example 1: Parallel Performance What can still be missing?
1 core 2 cores
4 cores
8 cores
1
10
function A
function A
speed
up
EJCP 2015, June 22, Nancy
12
Example 1: Parallel Performance What can be wrong? How relevant is Function A?
1 core 2 cores
4 cores
8 cores
0
200
400
600
800
1000
1200
function Aresttotal
exe
cuti
on
tim
e (
s)
EJCP 2015, June 22, Nancy
13
Example 1: Parallel Performance What can be wrong? How good is the sequential code?
1 core 2 cores
4 cores
8 cores
0
20
40
60
80
100
120
paralleloptimized seq.
exe
cuti
on
tim
e (
s)
EJCP 2015, June 22, Nancy
14
Don’t Forget the Big Picture
Always show overall performance + detailed results as necessary
Common examples exec. time only for fragments energy consumed by the CPU dynamic energy only
EJCP 2015, June 22, Nancy
15
Intro to Loop Transformations Tiling: a very very simplistic case
Follow the instruction at http
://perso.ens-lyon.fr/tomofumi.yuki/ejcp2015/
Resume at 16h00 for last few slides
EJCP 2015, June 22, Nancy
16
EJCP 2015, June 22, Nancy
17
The Punch Line Method
How to Punch your audience how to attract your audience
Make your talk more effective learned from Michelle Strout
Colorado State University applicable to any talk
exce
llent
aver
age
good
poor
Norm
al Ta
lk
Punch
Lin
e T
alk
EJCP 2015, June 22, Nancy
18
The Punch Line
The key cool idea in your paper the key insight
It is not the key contribution! X% better than Y do well on all benchmarks
Examples: ... because of HW prefetching ... further improve locality after reaching
compute-bound
EJCP 2015, June 22, Nancy
19
Typical Conference Audience Many things to do
check emails browse websites finish their own slides
Attention Level (made up numbers)
~3 minutes 90% ~5 minutes 60% 5+ minutes 30% conclusion 70%
punch here!
push these numbers up!
EJCP 2015, June 22, Nancy
20
Typical (Boring) Talk
1. Introduction 2. Motivation 3. Background 4. Approach 5. Results 6. Discussion 7. Conclusion
EJCP 2015, June 22, Nancy
21
Punch Line Talk
Two Talks in One 5 minute talk
introduction/motivation key idea
X-5 minute talk add some background elaborate on approach ...
the punch
shortest path to the punch
EJCP 2015, June 22, Nancy
22
Pitfalls of Beamer
Beamer != bad slides but it is a easy path to one
Checklist for good slides no full sentences LARGE font size few equations many figures !paper structure
beamer is not the best tool to encourage these
EJCP 2015, June 22, Nancy
23
That’s It!
General guides http://matt.might.net/articles/ http://www.cs.ucla.edu/~palsberg/
azuma.html How to do bib right
http://web.ece.ucdavis.edu/~jowens/biberrors.html
Feedback [email protected] or from my website (anonymous)