Examples
From the manual of the benchmarks, man blas-microbenchmark
Sweep ddot from 1K to 16M elements, with the statistics, saved as CSV:
bmb_ddot -v 1024:16777216 -s -o ddot.csv
The same with the vectors out of the caches at every size, for the memory's bandwidth rather than a cache's:
bmb_ddot -v 1024:16777216 -k cold -o ddot-cold.json
Every point is checked before it is timed. For a library already checked, skip that:
bmb_dgemm -m 512:4096 -t 1:8 -C -o dgemm.json
The sizes that matter to you, and nothing else:
bmb_dgemm -m 1024,2048,4096
Square matrices, then every shape (the grid bmb_report(1) draws as a heatmap):
bmb_dgemm -m 512:2048 # 512², 1024², 2048² bmb_dgemm -m 512:2048 -M 512:2048 # all 9 combinations
GEMM with K apart from M, as HPL's updates are: large M and N, K from 64 to 512:
bmb_dgemm -m 8192 -M 8192 -K 64:512 -o hpl.json
Many small GEMMs: a loop of calls, against the library's batched call:
bmb_dgemm -m 16:128 --batch-count 10000 -o loop.json bmb_dgemm -m 16:128 --batch-count 10000 --batch-mode group -o group.json
(With OpenBLAS 0.3.28 to 0.3.34 built with DYNAMIC_ARCH, the second exits 77: see --batch-mode.)
Thread scaling, threads pinned — OMP_* for the OpenMP-threaded libraries, taskset for a pthread-built OpenBLAS:
OMP_PROC_BIND=close OMP_PLACES=cores bmb_dgemm -t 1:8 -o dgemm.json taskset -c 0-7 bmb_dgemm -t 1:8 -o dgemm.json
On a machine with several NUMA nodes, spread the pages over all of them, or measure one node at a time — usually what you want to compare:
numactl --interleave=all bmb_dgemm -t 1:32 numactl --cpunodebind=0 --membind=0 bmb_dgemm -t 1:16
Two conditions on the same machine, told apart in the report by their labels (turbo is recorded, but a series is not split by it):
bmb_dgemm -m 1024:8192 -l "turbo on" -o turbo-on.json bmb_dgemm -m 1024:8192 -l "turbo off" -o turbo-off.json bmb_report turbo-*.json > report.html
In a ReFrame test suite: every benchmark of this install, each one verified, its rates reported as performance variables, and their results made into a report:
R=/usr/local/share/blas-microbenchmark/reframe reframe -c $R/blas_microbenchmark.py -n 'bmb_run' -r bmb_report output/*/*/*/*/result.json > report.html