もくじIndex

イメージでわかる GPU のしくみ

Visual Guide to How GPUs Work

Visual Guide to How GPUs Work

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

CPU と GPU のちがい、並列処理、VRAM の役割を、身近なたとえでやさしく説明するページです。AI の研究に入るまえの最初の足場になります。

A gentle introduction to CPUs vs GPUs, parallel processing, and the role of VRAM through everyday analogies. The first stepping stone before diving into AI research.

1. CPU と GPU — ちがいは何?

1. CPU vs GPU — What's the Difference?

パソコンの中には、大きく分けて2種類の計算するパーツがあります。

Inside your computer, there are two main types of chips that do calculations.

🧑‍🔧

CPU(少数精鋭の職人)

CPU (A Few Skilled Craftspeople)

コアは 4〜16 個くらい。1つ1つの仕事がとても得意。「次はあれ、その次はこれ」と順番に、確実にこなす。複雑な仕事の司令塔。

Around 4–16 cores. Each handles one task extremely well, processing jobs in sequence. The command center for complex tasks.

👷‍♂️👷‍♀️👷👷‍♂️

GPU(大人数の作業チーム)

GPU (A Massive Work Crew)

コアは 数百〜数千個。一人ひとりの力は小さいけれど、全員で同じ単純作業を一気に片づける。並列処理の達人。

Hundreds to thousands of cores. Each is simpler, but together they finish the same simple task all at once. Masters of parallel processing.

🍳 たとえ話: 🍳 Analogy: CPU は「ベテランシェフ1人で何品もつくるレストラン」。GPU は「100人のスタッフがホットケーキを一度に100枚焼く工場」。ホットケーキを1000枚焼きたいなら、どちらが速いかは明らかですね。 A CPU is like "one expert chef cooking many dishes in sequence." A GPU is like "100 workers flipping 100 pancakes at the same time." If you need 1,000 pancakes, which is faster?

2. 並列処理ってなに?

2. What Is Parallel Processing?

「同じ作業を、たくさんの手で同時にやる」こと。それが並列処理です。

"Doing the same task with many hands at the same time." That's parallel processing.

教室で 30人の生徒が、全員同じ計算ドリルを解くところを想像してください。先生が「はい、はじめ!」と言ったら、30人が一斉にスタートします。これが並列処理のイメージです。

Imagine 30 students in a classroom all solving the same math drill. When the teacher says "Go!", all 30 start at once. That's the image of parallel processing.

CPU は「先生が1人ずつ解かせて丁寧に見る」やりかた。ひとりひとりは速いけれど、30人分を終えるには時間がかかります。
GPU は「全員に同じ問題を配って一斉にやらせる」やりかた。ひとりひとりは少し遅いけれど、30問が一気に終わります。

A CPU is like a teacher who works through each student one at a time — precise but slow overall. A GPU hands the same problem to everyone and says "Go!" — each student is a little slower, but all 30 finish at once.

💡 ポイント: 💡 Key point: AI の計算は「同じ種類の計算を膨大な回数くりかえす」ことが多いので、GPU の得意パターンにぴったりなのです。 AI computations often repeat the same type of operation a huge number of times, which is exactly the pattern GPUs are built for.

3. VRAM って何のためにあるの?

3. What Is VRAM For?

GPU の「すぐ手の届く作業机」です。

It's the GPU's "desk within arm's reach."

パソコンのメインメモリ(RAM)は CPU の近くにある大きな棚のようなものです。でも GPU は遠くにいるので、そこからいちいちデータを取りに行くのは遅い。

Your PC's main memory (RAM) is like a large shelf near the CPU. But the GPU sits far away, and fetching data from that shelf is slow.

そこで GPU には専用のメモリ= VRAM(ビデオメモリ) がくっついています。GPU のすぐ隣にある自分専用の作業机です。必要なデータをここに先に置いておけば、GPU は超速でアクセスできます。

That's why GPUs have their own dedicated memory — VRAM (Video RAM). It's the GPU's personal desk, right next to it. Load data there first, and the GPU can access it at blazing speed.

📚 たとえ話: 📚 Analogy: テストのとき、教科書を毎回図書室まで取りに行くのと、最初に机の上に置いておくのでは、どちらが速いか考えてみてください。VRAM は「最初から机に置いておく」ことにあたります。 During an exam, is it faster to run to the library for each book, or to put all your textbooks on your desk at the start? VRAM is the "desk with everything already on it."
Vega 56 / 64 には HBM2 という特殊な超高速メモリが搭載されています。これは「ふつうの机」ではなく「超高速エスカレーターつきの作業台」。帯域(運べる速さ)がとても広いのが強みです。 Vega 56/64 uses HBM2, a special ultra-fast memory. It's not a regular desk — it's a workbench with a high-speed conveyor belt. The bandwidth (how fast data can be moved) is impressively large.

4. なぜ AI と GPU は相性がいいの?

4. Why Are GPUs Great for AI?

AI の正体は「巨大な行列のかけ算」だからです。

Because AI is essentially "massive matrix multiplication."

AI モデル(たとえば ChatGPT)は、内部で何百万・何億もの数字のかけ算と足し算を繰り返しています。そのひとつひとつは「掛けて足す」というシンプルな作業です。

AI models like ChatGPT repeat millions or billions of multiply-and-add operations internally. Each individual operation is simple: multiply, then add.

シンプルだけど、回数がものすごく多い。 これが「少数精鋭で複雑な仕事をする CPU」より、「大人数で同じ作業を一気にこなす GPU」に向いている理由です。

Simple, but the sheer count is enormous. That's why the "massive work crew" GPU beats the "few elite craftspeople" CPU for this kind of job.

🔢 規模感: 🔢 Scale: たとえば 1000×1000 の行列どうしのかけ算は、約10億回の「掛けて足す」を必要とします。GPU はこれを並列に処理するので、CPU の何十倍も速くなれるのです。 For example, multiplying two 1000×1000 matrices requires about 1 billion multiply-add operations. GPUs process these in parallel, achieving speeds tens of times faster than a CPU.

5. ROCm では GPU をどう見る?

5. How Does ROCm Look at a GPU?

ROCm では GPU は「画面を出す部品」というより、「同じ計算を大量に引き受ける計算装置」として登場します。

In ROCm, a GPU appears less as "the thing that draws graphics" and more as "a machine that takes on huge amounts of the same calculation."

ROCm のライブラリは、GPU に対して「この行列計算を何千本も同時に回して」「このデータを VRAM に置いて」と頼みます。つまり ROCm から見る GPU は、ゲームの絵を出す道具というより、AI の同じ計算をまとめて引き受ける大きな作業班です。

ROCm libraries ask the GPU to do things like "run this matrix calculation thousands of times at once" and "keep this data in VRAM." From ROCm's point of view, a GPU is less a graphics device and more a giant work crew for repeated AI-style computation.

この研究で Vega(gfx900)を見るときも、「GPU があるか」ではなく「ROCm が得意な計算を、どの精度で、どのくらいの量まで受け持てるか」を見ています。FP32/FP16 と HBM2 帯域は強みですが、最新世代の専用 AI ユニットはありません。

That is why, when we look at Vega (gfx900) in this research, we ask not just "is there a GPU?" but "how much of ROCm's preferred workload can it handle, and at what precision?" Its strengths are FP32/FP16 and HBM2 bandwidth, though it lacks the dedicated AI units of newer generations.

ROCm で大事な見方は 2 つです。同じ計算をたくさん同時にできるか、そして 必要なデータを VRAM から速く取り出せるか。このページの GPU の説明は、そのまま ROCm の性能の見方につながります。 Two questions matter in ROCm: Can it do many of the same calculations at once? And can it pull needed data from VRAM quickly? The GPU ideas on this page map directly to how ROCm thinks about performance.

6. まとめ

6. Summary

CPU — 少数の強力なコアが、複雑な仕事を順番に確実にこなす。パソコンの司令塔。

CPU — A few powerful cores handle complex tasks precisely and sequentially. The command center.

GPU — 数百〜数千の小さなコアが、同じ単純作業を一気に並列でこなす。大量の計算に強い。

GPU — Hundreds to thousands of small cores tackle the same simple operation all at once. Great for massive calculations.

VRAM — GPU 専用のメモリ。データをすぐ手の届く場所に置いておくための高速作業机。

VRAM — The GPU's dedicated memory. A fast desk that keeps data within arm's reach.

AI と GPU の相性 — AI は「同じ種類の計算を大量にくりかえす」仕事なので、並列処理が得意な GPU にぴったり。

AI + GPUs — AI workloads repeat the same type of computation massively, a perfect match for GPU parallelism.