Skip to content

Measured benchmark: RTX 3060 Laptop, 2026-08-17

This is the only benchmark page in the repository that reports repository-measured numbers. All other performance figures in teaching documents are placeholders unless they link here.

Environment

ItemValue
GPUNVIDIA GeForce RTX 3060 Laptop GPU, 6 GB, sm_86
Driver / nvidia-smi591.44
CUDA toolkit12.0.140 (nvcc)
HostUbuntu 24.04, GCC 13.3
BuildRelease, --use_fast_math, -lineinfo, -arch=sm_86
WSL noteLD_PRELOAD=/usr/lib/wsl/lib/libcuda.so.1 was required on this WSL2 host

01-sgemm-tutorial ladder

Command:

bash
cd 01-sgemm-tutorial
make benchmark
./build/sgemm_benchmark -a

Warmup: 5 runs. Timed runs: 20 per kernel, averaged with CUDA events.

Kernel512^3 GFLOPS1024^3 GFLOPS2048^3 GFLOPS4096^3 GFLOPS
cuBLAS4242558163905695
Naive597583674666
Tiled 32x32665925933910
Bank Conflict Free505657667655
Double Buffer496678683667
Tensor Core WMMA1626109327684099

Key finding on this GPU: the simple tiled kernel is faster than both bank-conflict-free and double-buffer variants at 1024^3. Micro-optimizations must be profiled on the target hardware; they do not always improve.

WMMA correctness uses an FP16-input quantization-aware tolerance (atol = 0.0015 * sqrt(K)), because fixed small tolerances fail at K=2048+ even though the kernel is working as designed.

02-tensorcraft-core GEMM variants

Command:

bash
cmake --preset default
cmake --build --preset default --target gemm_benchmark
./build/default/bin/gemm_benchmark --benchmark_min_time=0.1s --benchmark_repetitions=3

Median wall time, 3 repetitions:

ShapeNaive GFLOPSTiled GFLOPSDouble Buffer GFLOPS
256^3257329319
512^3634767861
1024^3641913952
2048^36889681057

For this teaching library, Double Buffer starts to help at larger sizes, but all custom kernels remain far below cuBLAS. The benchmark target exists to teach measurement, not to claim cuBLAS parity.

Known limitation

ncu profiling was attempted on this WSL2 host and failed with ERR_NVGPUCTRPERM (GPU performance counters not exposed). A reproducible runbook is provided in Performance Tuning; real traces must be captured on a machine where counters are enabled.

Released under the MIT License.