WebGPU Matmul Benchmark: 4x4 Tiling Wins, 8x8 Block Backfires on Register Pressure
A WebGPU matrix multiplication optimization sweep tested progressively aggressive kernels on a 2048-cubed matrix size. Adding 16x16 workgroup tiling and a 4x4 output block per thread reduced compute time from 47.24 ms to 9.12 ms, a 5.18x speedup over the naive baseline. An attempted 8x8 block, expected to improve data reuse, instead performed worse at every tested size, likely due to register pressure and reduced workgroup occupancy. Packed f16 storage also failed to compound gains when layered onto the already-tiled kernel, as both optimizations targeted the same bandwidth bottleneck. The failed variants were deliberately kept in the benchmark record to avoid redundant re-testing in future optimization passes.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in