Practical Roofline Analysis by Example

Course Description

The Roofline model is arguably the simplest but also the most successful performance model in High Performance Computing. Using some assumptions about a code and the hardware it is running on, it allows to calculate an upper limit for the performance of a loop. This makes it an indispensable analysis device: Comparing the expected upper limit with the actual performance, hardware bottlenecks and deficiencies in the code can be identified, which points to optimization opportunities.
Although several tools exist that can help with Roofline analysis on CPUs and GPUs, the Roofline model requires a basic understanding of computer architecture, code execution, and hardware bottlenecks to be useful. This tutorial provides the necessary knowledge, backed up by case studies and hands-on exercises, to let participants use the Roofline model as a powerful, scientifically well-founded analysis tool for CPU and GPU code. We also point out the strengths and weaknesses of various performance tools and how they can be of use in different scenarios and for different groups of developers and analysts.

Agenda

9:00 – 10:30 am
Compute node architecture and bottlenecks
– CPUs and GPUs

Hands-on: calculating and measuring machine properties

Thinking in rooflines: code and machine characterization
– Machine model: code execution and data transfers
– Application model: computational intensity

Break

10:45 am
Simple examples

11:00 am
Hardware performance counters
– How to count work and data transfers
– Counter-based analysis: How to judge the quality of a loop code

11:15 am
Tools
– CPUs: LIKWID, PAPI
– Nsight Compute, ROCm Compute

11:45 am – 12:15 pm
Hands-on: measuring code properties

Lunch break

1:15 pm
Case study: Sparse MVM

1:45 pm
Hands-on: Analyzing a CG solver

2:15 – 2:45 pm
Case study: A Molecular Dynamics Proxy App

Break

3:00 pm
Hands-on: A lattice-Boltzmann code

3:30 pm
Odds and ends

Certification

A digital certificate of attendance will be awarded to all participants who attended the majority of the course.

Requirements

Attendees will need a laptop with a current browser (Firefox or Chrome work best) and an internet connection to participate in the hands-on exercises.

Upcoming Iterations and Additional Courses

You can find dates and registration links for this and other upcoming NHR@FAU courses at https://go-nhr.de/trainings .