Lab: Introduction to Loop Transformations Tomofumi Yuki EJCP 2017 - - PowerPoint PPT Presentation

lab introduction to loop transformations
SMART_READER_LITE
LIVE PREVIEW

Lab: Introduction to Loop Transformations Tomofumi Yuki EJCP 2017 - - PowerPoint PPT Presentation

Lab: Introduction to Loop Transformations Tomofumi Yuki EJCP 2017 June 29, Toulouse Experimental Validation n Essential to many scientific domain n 1. Build a hypothesis n 2. See if numbers support it n In optimizing compiler research n prove


slide-1
SLIDE 1

Lab: Introduction to Loop Transformations

Tomofumi Yuki

EJCP 2017 June 29, Toulouse

slide-2
SLIDE 2

Experimental Validation

n Essential to many scientific domain

n 1. Build a hypothesis n 2. See if numbers support it

n In optimizing compiler research

n prove optimality, or n do empirical validation

n Getting X% speedup by itself is USELESS

n provide why

EJCP 2017, June 29, Toulouse 2

slide-3
SLIDE 3

Computer Scientific Method

n Slides from David Patterson

n Talk: How to Have a Bad Career In Research/

Academia

n www.cs.berkeley.edu/~pattrsn/talks/

nontech.html

n Many nice tips for Ph.D. students and

beyond

EJCP 2017, June 29, Toulouse 3

slide-4
SLIDE 4

Bad Career Move #4: Use the Computer Scientific Method

n Obsolete Scientific Method

n hypothesis n sequences of experiments n prove/disprove hypothesis n reproducible

n Computer Scientific Method

n hunch! n an experiment with lots of parameters n forget if it doesn’t support hunch

EJCP 2017, June 29, Toulouse 4

slide-5
SLIDE 5

Mixed Lab+Lecture

n 1. Performance Measurement n 2. Loop Transformations by Hand n 3. How to Punch the Audience n 4. Lunch

EJCP 2017, June 29, Toulouse 5

slide-6
SLIDE 6

Example 1: Parallel Performance

n Setup

n parallelized a function of a program n measured exec. time of the function n up to 8 cores

EJCP 2017, June 29, Toulouse 6

slide-7
SLIDE 7

Example 1: Parallel Performance

n What can you say?

20 40 60 80 100 120 1 core 2 cores 4 cores 8 cores

function A

function A

execution time (s)

EJCP 2017, June 29, Toulouse 7

slide-8
SLIDE 8

Example 1: Parallel Performance

n Is it better?

2 4 6 8 10 1 core 2 cores 4 cores 8 cores

function A

function A

speedup

EJCP 2017, June 29, Toulouse 8

slide-9
SLIDE 9

Example 1: Parallel Performance

n How about this?

1 2 4 8 1 core 2 cores 4 cores 8 cores

function A

function A

speedup

EJCP 2017, June 29, Toulouse 9

slide-10
SLIDE 10

Key Principle in Plotting Data

n Make it a straight line

n preferably 45 degree angle

n Reason: much easier to make claims

n claiming a curve is quadratic n showing it becomes a straight line after sqrt

EJCP 2017, June 29, Toulouse 10

slide-11
SLIDE 11

Example 1: Parallel Performance

n What can still be missing?

1 2 4 8 1 core 2 cores 4 cores 8 cores

function A

function A

speedup

EJCP 2017, June 29, Toulouse 11

slide-12
SLIDE 12

Example 1: Parallel Performance

n What can be wrong? n How relevant is Function A?

200 400 600 800 1000 1200 1 core 2 cores 4 cores 8 cores function A rest total

execution time (s)

EJCP 2017, June 29, Toulouse 12

slide-13
SLIDE 13

Example 1: Parallel Performance

n What can be wrong? n How good is the sequential code?

20 40 60 80 100 120 1 core 2 cores 4 cores 8 cores parallel

  • ptimized seq.

execution time (s)

EJCP 2017, June 29, Toulouse 13

slide-14
SLIDE 14

Don’t Forget the Big Picture

n Always show overall performance

n + detailed results as necessary

n Common examples

n exec. time only for fragments n energy consumed by the CPU n dynamic energy only

EJCP 2017, June 29, Toulouse 14

slide-15
SLIDE 15

Intro to Loop Transformations

n Tiling: a very very simplistic case n Follow the instruction at

n http://people.irisa.fr/Tomofumi.Yuki/ejcp2017/

n Resume at 11h50 for last few slides

EJCP 2017, June 29, Toulouse 15

slide-16
SLIDE 16

EJCP 2017, June 29, Toulouse 16

slide-17
SLIDE 17

The Punch Line Method

n How to Punch your audience

n how to attract your audience

n Make your talk more effective

n learned from Michelle Strout

n Colorado State University

n applicable to any talk

Normal Talk Punch Line Talk

EJCP 2017, June 29, Toulouse 17

slide-18
SLIDE 18

The Punch Line

n The key cool idea in your paper

n the key insight

n It is not the key contribution!

n X% better than Y n do well on all benchmarks

n Examples:

n ... because of HW prefetching n ... further improve locality after reaching

compute-bound

EJCP 2017, June 29, Toulouse 18

slide-19
SLIDE 19

Typical Conference Audience

n Many things to do

n check emails n browse websites n finish their own slides

n Attention Level (made up numbers)

n ~3 minutes 90% n ~5 minutes 60% n 5+ minutes 30% n conclusion 70%

punch here! push these numbers up!

EJCP 2017, June 29, Toulouse 19

slide-20
SLIDE 20

Typical (Boring) Talk

n 1. Introduction n 2. Motivation n 3. Background n 4. Approach n 5. Results n 6. Discussion n 7. Conclusion

EJCP 2017, June 29, Toulouse 20

slide-21
SLIDE 21

Punch Line Talk

n Two Talks in One n 5 minute talk

n introduction/motivation n key idea

n X-5 minute talk

n add some background n elaborate on approach n ...

the punch shortest path to the punch

EJCP 2017, June 29, Toulouse 21

slide-22
SLIDE 22

Pitfalls of Beamer

n Beamer != bad slides

n but it is a easy path to one

n Checklist for good slides

n no full sentences n LARGE font size n few equations n many figures n !paper structure

beamer is not the best tool to encourage these

EJCP 2017, June 29, Toulouse 22

slide-23
SLIDE 23

That’s It!

n General guides

n http://matt.might.net/articles/ n http://www.cs.ucla.edu/~palsberg/azuma.html

n How to do bib right

n http://web.ece.ucdavis.edu/~jowens/

biberrors.html

n Feedback

n tomofumi.yuki@inria.fr

EJCP 2017, June 29, Toulouse 23