Realm

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

ShapeM × N × KMedian GPU msGFLOP/s
Square512 × 512 × 5120.840320
Square1024 × 1024 × 10243.310649
Square2048 × 2048 × 204833.07520
Tall, narrow projection4096 × 128 × 10241.899565
Short, wide projection128 × 4096 × 10241.843582
Single row decode1 × 4096 × 40961.28126

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-only
cargo run --locked --release --example bench_core_matmul -- \
--name square-1024 --m 1024 --n 1024 --k 1024 --warmup 5 --samples 20