Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT...

22
Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014

Transcript of Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT...

Page 1: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Trip report:GPU Programming @ UERJ

Felice Pantaleo

SFT Group Meeting03/11/2014

Page 2: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Eplanet visit

Host institute: Universidade do Estado do Rio de Janeiro (UERJ)Duration: Two-weeks long visit from Oct 6th to 17thTopic: GPU Programming

[email protected] 2

Page 3: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

First week

• Dedicated to installation of two nodes with two NVIDIA GTX 650

• CUDA 6.5 installed• IT specialists learning about

configuration and capabilities• Introductory questionnaire sent to

students in order to get to know them and tailor the lectures

[email protected] 3

Page 4: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Questionnaire

[email protected] 4

Yes

No

0 1 2 3 4 5 6 7

Have you ever attended a Paral-lel Programming course?

Page 5: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Questionnaire

[email protected] 5

Yes

No

0 1 2 3 4 5 6 7 8

Have you ever attended a GPU programming course be-fore?

Page 6: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Questionnaire

[email protected] 6

Master

Good

Average

Poor

None

0 1 2 3 4 5

What is your C/C++ knowledge?

Page 7: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Questionnaire

[email protected] 7

Computing Eng.

Computer Science

Mathematics

Physics

0 1 2 3 4 5 6 7

What is your field of work/study?

Page 8: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Parallel Programming intro

Introduction on Parallel Programming: motivations, architectures and algorithms.• Reasons Computing Systems are

becoming more and more parallel and heterogeneous were explained.

[email protected] 8

Page 9: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Introduction to GPU Programming using CUDA

• Introduce through examples, based on the CUDA programming language, the three abstractions that make the foundations of GPU programming:

- Thread hierarchy- Synchronization- Memory hierarchy/Shared Memory

[email protected] 9

Page 10: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Load Balancing and Partitioning

• The aim was to make the students understand the relationship between a domain problem and the computational models available.

• Techniques to reduce the Streaming Multiprocessors idle time by making use of dynamic scheduling and dynamic partitioning were shown.

[email protected] 10

Page 11: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Hands-on

• Duration: 10 hours• GPU Memory management: allocation,

data transfer between host and device, synchronization

• Kernel launch: offload of a parallel section to the GPU

• Partitioning of a problem to the GPU threads

• Profiling of a CUDA [email protected] 11

Page 12: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Hands-on

• Making use of the GPU shared memory• Making use of Asynchronous operations• Reducing contention by privatization• Scatter to gather• Filling histograms on GPUsThe interest was so high that many of the students kept working on the exercises from home!

[email protected] 12

Page 13: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Feedback

• The students were asked to give some feedback using an anonymous questionnaire (see backup)

• Very positive feedback

[email protected] 13

Page 14: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Conclusion

• All goals that were set before the visit were achieved

• Language was sometimes a problem– Italian helped ;-)

• Interest in preparing a degree thesis on the topic of parallel computing for high energy physics experiment in the context of the host group

• Didactic material available:https://twiki.cern.ch/twiki/bin/view/Sandbox/EplanetPantaleoUERJ2014

[email protected] 14

Page 15: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Didactic Material

• I am starting the initiative of collecting GPU Training material with some people from the HPC community (Cambridge, CINECA, BSC)– Could be done in the context of the

Concurrency Forum– Common github resource for trainers– Expertise acquisition from HPC

community (GPUs for linear algebra, OpenACC)

[email protected] 15

Page 16: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Backup

[email protected] 16

Page 17: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Anonymous Feedback

[email protected] 17

Totally Positive

Positive

Negative

Totally Negative

0 1 2 3 4 5

Is your background sufficient to enable you to comprehend the course topics?

Page 18: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Anonymous Feedback

[email protected] 18

Totally Positive

Positive

Negative

Totally Negative

0 1 2 3 4 5 6

Does the instructor encourage and motivate students?

Page 19: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Anonymous Feedback

[email protected] 19

Totally Positive

Positive

Negative

Totally Negative

0 1 2 3 4

Does the instructor explain the course topics clearly?

Page 20: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Anonymous Feedback

[email protected] 20

Totally Positive

Positive

Negative

Totally Negative

0 1 2 3 4 5 6 7

Is the instructor available for any clarification and additional explanation?

Page 21: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Anonymous Feedback

[email protected] 21

Improve the quality of the didactic materials

Provide extensive background

Less lectures, more exercises

More lectures, less exercises

0 1 2 3

Suggestions for improvement:

Page 22: Trip report: GPU Programming @ UERJ Felice Pantaleo SFT Group Meeting 03/11/2014 Felice Pantaleo SFT Group Meeting 03/11/2014.

Anonymous Feedback

[email protected] 22

Totally Positive

Positive

Negative

Totally Negative

0 1 2 3 4 5

What is your overall appreciation for the course?