This example computes matrix-matrix multiplication (sgemm) using WebGPU, future web standard.
Supported browsers (as of January 2024): Chrome (Windows, MacOS)
WebGPU of this browser:
Created by @milhidaka Github
Computes
[1,2 3,4] × [5,6 7,8]
Compares computation result of WebGPU and pure JavaScript implementation.
Note: when m % 32 === 0 && n % 64 === 0 && k % 4 === 0, efficient kernel is used.
M,N,K tuples: