Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

IBM

Performance Modeling and Optimization

IBM via Coursera

Overview

Google, IBM & Meta Certificates – 40% Off a Year
One Coursera Plus subscription covers most Professional Certificates on Coursera. 40% off a full year through Dec 2.
Unlock All Certificates
This course shows how to predict how fast an LLM inference step should run on given hardware, check that prediction against measurements, and use the difference to find practical optimizations. You will start by bounding the time of an operation from its FLOPs and bytes, then use the roofline model and ridge point to distinguish compute-limited from memory-limited execution. You will learn to count traffic at different memory levels and reason about how compiler placement decisions change off-chip movement on scratchpad-based architectures. The course then moves from analytical models to measurement. You will use PyTorch Profiler to read execution traces and separate time dominated by compute, memory movement, synchronization, and software overhead. A worked example takes a slow decode loop from diagnosis to fix. You will also study benchmarking methodology for compiled code, compiler cost models, shape bucketing, warmup precompilation, and batched decode. In the lab, you will measure achieved compute and bandwidth on a GPU, place prefill and decode on a roofline, run a batch sweep, report time to first token and time per output token, and predict how a scratchpad target would change off-chip traffic. A 20-question graded quiz at the end covers every module of the course.

Syllabus

  • Lab 6: Roofline Analysis for LLM Inference
    • This lab builds a roofline for the GPU Google Colab hands out and uses it to explain why LLM decode is slow. Students hand-derive arithmetic intensity for a prefill GEMM, a batch-1 decode GEMM and a decode attention product, finding a ~1260x spread from the batch dimension alone, then measure achieved compute and bandwidth to locate the empirical ridge point, which lands near half the datasheet value. Profiling GPT-2 places real kernels on that roofline and classifies each as compute- or memory-bound.
  • Performance Modeling and Optimization Graded Quiz
    • This quiz covers all five modules of the course: roofline analysis, memory hierarchy and data placement, overhead and profiling, benchmarking and compiler cost models, and serving performance on a compiled-schedule accelerator. It has 20 questions, including step-time bounds, useful FLOPs and bucket padding calculations. Allow about 50 minutes and keep a calculator nearby. You need 80% to pass, and you can take the quiz up to 3 times. Your highest score counts.

Taught by

Kaoutar El Maghraoui

Reviews

Start your review of Performance Modeling and Optimization

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.