CUDA k-means · interactive execution model

Runs the actual algorithm from danielberhane/cuda-kmeans on the real benchmark dataset, in your browser, and draws what the GPU does with it. Change the parameters and everything below recomputes from scratch.

Points

Coloured by cluster. The benchmark data has no clusters in it, so k-means partitions it into Voronoi cells rather than recovering structure — switch to clustered to see the difference. The vertical banding is real: dimension 1 draws from only 19,968 distinct values, and 288 of them account for 80% of the points.

Plot dimensions

Grid · one thread per point

Each cell is one thread block, shaded by how many of its points changed cluster this iteration.

Shared memory per block

One extern __shared__ allocation, sliced into six regions. Drawn to scale.

State

Iteration
–
δ changed/N
–
Points moved
–
Grid
–
Reduce kernel
–
Shared / block
–
Dataset
–
Trace computed in
–
Cluster sizes
–