# Shared Memory

- **Canonical URL:** https://getaimath.com/dictionary/shared-memory/
- **Topics:** [Hardware & AI Computing](https://getaimath.com/dictionary/category/hardware-and-ai-computing/)
- **Last updated:** 2026-11-25

## What is Shared Memory?

**In one sentence:** Shared memory can mean memory that several processors use together, or a small, very fast memory area inside a GPU that a group of cores shares.

Inside GPUs, shared memory acts like a tiny super-fast workspace for nearby cores. Tricks like FlashAttention use it to avoid slow trips to main memory. On laptops, "shared GPU memory" means the graphics chip is borrowing system RAM.

![AI Hardware (GPUs & VRAM): The Fast Chef & The Kitchen Door — Simple cartoon showing a Super-Fast Chef (GPU) who needs ingredients from a nearby Countertop Fridge (VRAM) via a wide double-door (Memory Bandwidth), instead of walking down a slow hallway to the Basement Pantry (System RAM).](https://getaimath.com/diagrams/hardware-and-ai-computing.png)
*Napkin Diagram (Hardware & AI Computing): A fast GPU chip is like a fast chef—if the memory doorway is too narrow, the chef just stands around waiting for ingredients.*

## What is an example of Shared Memory?

FlashAttention keeps small blocks of attention math in GPU shared memory to work faster.

## Why does Shared Memory matter?

Using shared memory well is a big part of making AI software fast.

## Related Concepts

- [Unified Memory](https://getaimath.com/dictionary/unified-memory/): Unified memory is a design where the CPU and GPU share one big pool of memory instead of having separate memory.
- [Memory Bandwidth](https://getaimath.com/dictionary/memory-bandwidth/): Memory bandwidth is how fast data can move between a chip's memory and its processors, usually measured in gigabytes per second.
- [RAM](https://getaimath.com/dictionary/ram/): RAM is a computer's main working memory, where programs and data are kept while in use.
- [Memory Capacity](https://getaimath.com/dictionary/memory-capacity/): Memory capacity is how much data a memory can hold, measured in gigabytes.
- [VRAM](https://getaimath.com/dictionary/vram/): VRAM is the fast memory built onto a graphics card, where AI model weights and the KV cache are stored while running.
- [Memory Bus](https://getaimath.com/dictionary/memory-bus/): A memory bus is the data path that connects memory to the processor.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/shared-memory/)
