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.
パソコンの中には、大きく分けて2種類の計算するパーツがあります。
Inside your computer, there are two main types of chips that do calculations.
コアは 4〜16 個くらい。1つ1つの仕事がとても得意。「次はあれ、その次はこれ」と順番に、確実にこなす。複雑な仕事の司令塔。
Around 4–16 cores. Each handles one task extremely well, processing jobs in sequence. The command center for complex tasks.
コアは 数百〜数千個。一人ひとりの力は小さいけれど、全員で同じ単純作業を一気に片づける。並列処理の達人。
Hundreds to thousands of cores. Each is simpler, but together they finish the same simple task all at once. Masters of 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.
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.
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.
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.
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.