AI ENGVisual Encyclopedia

SCENE 09 · BREAK IT, SEE IT

Break it, see it

A broken kernel writes to the wrong places — the visualization is your debugger.

__global__ void add(float* a, float* b, float* c, int n) {
    int i = blockIdx.x * blockDim.x + threadIdx.x + 1;
    if (i < n) c[i] = a[i] + b[i];
}
OUTPUT C[] · 16 ELEMENTS!OOB

Press RUN — the visualization is your debugger.