Matrix compute benchmarks
Measure FP32 matrix multiplication with the Rust OA SDK.
Measurement protocol
The benchmark captures oa::matrix::matmul, which computes A × Bᵀ. It checks the output before timing replay. The runner reports device time from Vulkan timestamps and synchronized wall time separately. The measured replays keep the output on the GPU.
Surface Laptop 5 results
| Shape | M × N × K | Median GPU ms | GFLOP/s |
|---|---|---|---|
| Square | 512 × 512 × 512 | 0.840 | 320 |
| Square | 1024 × 1024 × 1024 | 3.310 | 649 |
| Square | 2048 × 2048 × 2048 | 33.07 | 520 |
| Tall, narrow projection | 4096 × 128 × 1024 | 1.899 | 565 |
| Short, wide projection | 128 × 4096 × 1024 | 1.843 | 582 |
| Single row decode | 1 × 4096 × 4096 | 1.281 | 26 |
Exploratory Rust development build measured November 23, 2026 on Intel Iris Xe ADL GT2, Mesa 26.3.1 and Vulkan 1.4.363. Each shape used five warmup submissions and 20 timed submissions in one process. The laptop ran on battery with variable clocks.
Run with the OA SDK
Run these commands from the OA SDK checkout. The tutorial verifies multiple shapes against a CPU reference. The benchmark times the supplied shape and accepts --device to select a Vulkan device by index.
Rust terminal
cargo run --locked --release --example tu_core_basics -- --correctness-onlycargo run --locked --release --example bench_core_matmul -- \--name square-1024 --m 1024 --n 1024 --k 1024 --warmup 5 --samples 20