IBM

Memory Systems in Dataflow Architectures

IBM

Memory Systems in Dataflow Architectures

Included with Coursera PlusLearn more

Gain insight into a topic and learn the fundamentals.
Intermediate level

Recommended experience

5 hours to complete
Flexible schedule
Learn at your own pace
Gain insight into a topic and learn the fundamentals.
Intermediate level

Recommended experience

5 hours to complete
Flexible schedule
Learn at your own pace

What you'll learn

  • Explain why low-batch decode is often bandwidth-bound and estimate its arithmetic intensity.

  • Compare caches, scratchpads, and on-chip SRAM across accelerator architectures.

  • Size the KV cache and evaluate serving techniques that reduce or manage its memory cost.

Details to know

Shareable certificate

Add to your LinkedIn profile

Recently updated!

October 2026

Assessments

2 assignments

Taught in English

See how employees at top companies are mastering in-demand skills

 logos of Petrobras, TATA, Danone, Capgemini, P&G and L'Oreal

Build your subject-matter expertise

This course is part of the Dataflow Architectures for AI Specialization
When you enroll in this course, you'll also be enrolled in this Specialization.
  • Learn new concepts from industry experts
  • Gain a foundational understanding of a subject or tool
  • Develop job-relevant skills with hands-on projects
  • Earn a shareable career certificate

There are 10 modules in this course

What's included

1 video

In many inference workloads, moving data takes longer than computing on it. This module gives you five questions for analyzing the memory system of any accelerator and two numbers for deciding which resource limits a workload: the ridge point of the hardware and the arithmetic intensity of the workload. You will compute both for decode on an H100, first for the weights alone and then with the KV cache included.

What's included

1 video

Inference has two phases. Prefill processes the whole prompt at once and is usually limited by compute. Decode produces one token at a time and is usually limited by memory bandwidth. You will place both on a roofline, compare the ridge points of five accelerators, and work out what one decode step reads on Spyre.

What's included

1 video

On some accelerators the hardware decides what to keep close to the compute units. On others the compiler decides. Most machines, including GPUs, split the work between the two. This module describes that range, the three kinds of local memory, and the jobs a compiler must take on when there is no hardware cache.

What's included

1 video

The five questions from module 1 are applied to GPU, TPU, Cerebras, Groq and Spyre. You will compare their memory hierarchies, capacity and bandwidth, and identify the resource that is scarce on each machine.

What's included

1 video

Tiling decides how much data fits on chip and how often it is reused. In this module you will size matmul tiles against the scratchpad of one Spyre core and measure how tile size changes arithmetic intensity. You will also look at how data layout, memory banks, access order and alignment affect bandwidth. The module ends with FlashAttention, which applies the same tiling ideas to attention.

What's included

1 video

The KV cache stores the keys and values of every earlier token, and it grows as a request gets longer. Its size is the product of six numbers: layers, batch size, context length, KV heads, head dimension and bytes per element. You will compute it, find the context length at which it becomes larger than the model weights, and see how four techniques reduce it.

What's included

1 video

Earlier modules looked at memory decisions made before execution. When a model serves many users, the size and lifetime of each request's KV cache are known only at runtime. Part 1 covers serving engines and six techniques for managing that memory: continuous batching, PagedAttention, prefix caching, chunked prefill and disaggregation, KV tiering, and speculative decoding. Each is shown on a GPU and then on a dataflow accelerator with a compiled schedule. Part 2 looks at how Spyre handles the same problems, then compares KV management across the five accelerators.

What's included

2 videos

This lab profiles memory access during distilgpt2 generation in Google Colab using torch.profiler with memory tracking enabled. Students identify the memory-intensive operators and the peak allocation during decode, then measure effective bandwidth against an analytically known byte count to see why allocator activity is not bandwidth. They derive the KV-cache size formula, confirm it against measured peak-memory growth, compare its cost under MHA, GQA, and MQA, and size it for a scratchpad.

What's included

1 assignment1 ungraded lab

This quiz covers all seven modules of the course: ridge points and arithmetic intensity, prefill and decode on the roofline, who manages on-chip memory, memory across five accelerators, tiling and layout, KV cache sizing, and KV management at runtime. It has 22 questions, and many need a short calculation. Allow about 55 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.

What's included

1 assignment

Earn a career certificate

Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.

Instructor

Kaoutar El Maghraoui
5 Courses4 learners

Offered by

IBM

Explore more from Algorithms

Why people choose Coursera for their career

Felipe M.

Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."

Jennifer J.

Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."

Larry W.

Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."

Chaitanya A.

"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."

What brings you to Coursera today?

Frequently asked questions