もくじIndex

イメージでわかる メモリと帯域幅

Visual Guide: Memory & Bandwidth

Visual Memory & Bandwidth

シリーズ: イメージでわかる

どれだけたくさん持てるかと、どれだけ速く運べるかの違いを、水道管や作業台のたとえでやさしく説明します。

The difference between "how much you can hold" and "how fast you can move it" — explained through water pipes and workbench analogies.

1. ふたつの「足りない」

1. Two Kinds of "Not Enough"

GPU には「容量」と「帯域幅」という2つの大事なメモリ指標があります。

GPUs have two critical memory metrics: "capacity" and "bandwidth."

🪣

容量(キャパシティ)

Capacity

バケツの大きさ。
何GB のデータを一度に置けるか。
Size of the bucket.
How many GB of data you can hold at once.
🚿

帯域幅(バンドウィズ)

Bandwidth

水道管の太さ。
1秒間にどれだけのデータを運べるか。
Diameter of the water pipe.
How much data can flow per second.
🚰 たとえ話: 🚰 Analogy: お風呂をためることを想像してください。浴槽が大きい(=容量が多い)のと、水道管が太い(=帯域幅が広い)のは別の話です。浴槽が大きくても水道管が細ければ、なかなかたまりません。 Picture filling a bathtub. A big tub (= large capacity) and a thick water pipe (= high bandwidth) are two different things. Even with a huge tub, if the pipe is thin, it takes forever to fill.

2. AI にとってなぜ大事?

2. Why Does It Matter for AI?

大規模な AI モデル(たとえば ChatGPT や DeepSeek-R1)は、何十億もの数字を持っています。推論するとき、そのすべてを GPU のメモリに載せ、猛スピードで読み書きします。

Large AI models (like ChatGPT or DeepSeek-R1) contain billions of numbers. During inference, all of them must be loaded in GPU memory and read/written at extreme speed.

容量が足りないと: そもそもモデルが載らない → 動かない
帯域幅が足りないと: 載っていても読み出しが遅い → 出力が遅い

Not enough capacity: The model doesn't fit → it won't run at all
Not enough bandwidth: The model fits but reads slowly → output is slow

💡 HBM2 と Vega: 💡 HBM2 and Vega: Vega 56 には 8 GB の HBM2 メモリが搭載されています。HBM2 は「帯域幅がとても太い」タイプのメモリで、同世代の GDDR5 より高速にデータを運べます。容量は控えめですが、帯域幅では有利です。 The Vega 56 has 8 GB of HBM2 memory. HBM2 is a type of memory with very high bandwidth — it can move data faster than contemporary GDDR5. Capacity is modest, but bandwidth is a strength.

3. 世代で見る比較

3. Comparing Across Generations

VRAM 容量
VRAM Capacity
Vega 56
8 GB
MI100
32 GB
MI300X
192 GB
メモリ帯域幅
Memory Bandwidth
Vega 56
484 GB/s
MI100
1.2 TB/s
MI300X
5.3 TB/s

Vega の帯域幅は 484 GB/s。現在の最先端 MI300X の 1/10 以下ですが、同世代の GDDR5 搭載カードと比べるとかなり太い水道管です。

Vega's bandwidth is 484 GB/s — less than 1/10 of the latest MI300X, but much wider than GDDR5 cards from the same era.

4. ROCm ではどう考える?

4. How Does ROCm Think About This?

ROCm では、メモリの問題をまず「載るか」、次に「流れるか」で考えると整理しやすくなります。

In ROCm, it helps to think about memory problems in two steps: first "does it fit?" and then "can it flow fast enough?"

まず見るのは容量です。 モデル本体、途中のデータ、作業用の一時領域が VRAM に載らなければ、ROCm は計算を始めにくくなります。バッチを小さくしたり、軽いデータ型にしたりする理由はここにあります。

Capacity comes first. If the model itself, intermediate data, and temporary workspaces do not fit in VRAM, ROCm has trouble even starting the computation. This is why people shrink batch size or use lighter data types.

次に見るのが帯域幅です。 載っていても、rocBLAS や MIOpen がデータを読む速さが足りないと、計算器が待たされます。GPU の中は速くても、材料の受け渡しが遅いと全体は遅くなります。

Bandwidth comes next. Even when things fit, if rocBLAS or MIOpen cannot read the data quickly enough, the compute units spend time waiting. The inside of the GPU may be fast, but slow delivery still slows the whole job down.

Vega(gfx900)は 8 GB という容量では厳しい場面がある一方、HBM2 の広い帯域は強みです。だから ROCm 目線では「大きなモデルは載りにくいが、載る計算は気持ちよく流せることがある」と考えます。

Vega (gfx900) can feel tight on capacity with 8 GB, but its wide HBM2 bandwidth is a real strength. So from a ROCm viewpoint, it is often "hard to fit very large models, but quite capable of streaming the ones that do fit."

💡 ROCm の2つの問い: 💡 ROCm's two questions: 載るか?流れるか? メモリの話をこの順番で見ると、ROCm で起きていることがかなり整理しやすくなります。 Does it fit?Can it flow? Looking at memory in that order makes ROCm behaviour much easier to understand.

5. まとめ

5. Summary

🔑 容量 = いくつ並べられるか。 帯域幅 = どれだけ速く運べるか。AI は両方ないと困る。HBM2 は帯域幅が太いメモリで、Vega の強みのひとつ。 🔑 Capacity = how many things can sit there. Bandwidth = how fast they move. AI needs both. HBM2 excels at bandwidth, which is one of Vega's strengths.