blas-microbenchmark1.11.0-dev

Options

From the manual of the benchmarks, man blas-microbenchmark

Untimed calls before measuring each point. Default: 1.
Timed samples taken at each point, at least. Default: 10.
Calls repeated for s seconds before the first point of each thread count, on top of -x: the CPU leaves its idle clock, and the library wakes its threads. 0 turns it off. Default: 0.2.
Samples taken past -i until they add up to s seconds. Default: 0.
Then samples taken until their interquartile range is at most percent of their median, judged on 10 samples at least, or -i. Default: 0, off.
Sampling stops once the samples add up to s seconds, whatever -e asks (a -T past it is refused); at most 100000 samples are taken, or -i if that is more. Default: 10.
Calls averaged per sample; 0 chooses automatically, per point (see HOW A NUMBER IS MEASURED). --batch 1 times every call on its own. The triangular multiplies and solves (trmv, trsv, tpsv, tbsv, trmm and trsm, in every precision) are always timed that way: their operand is restored before every call, and a larger -b is ignored with a warning. Default: 0.
Vector sizes, for level 1 routines. Default: 10000000, past most last-level caches, so that the bandwidth is the memory's.
First matrix dimension, for level 2 and 3 routines. Default: 5000 at level 2, a matrix past most last-level caches, and 2000 at level 3, under a second a dgemm call on one core. None is a power of two (see -p).
Second matrix dimension. Without it, matrices are square: the second dimension follows the first at every point. With it, every combination of the two is measured.
GEMM's K, apart from M. Without it, K is M at every point, and the output is as without it ever was. With it, every combination with the other sizes is measured, and every output has a third dimension, K, after the second, the first being M alone: the shapes of HPL's updates, a large M and N with a small K, or tall and skinny products. Other routines ignore it, with a warning.
Number of BLAS threads. Default: 1. See THREADS.
Run each count of -t as that many instances of one thread instead, each a process pinned to a core of its own, all measured at once; the rates are their sum. Without -t, one instance on each core this process may run on. Default: off. See THREADS, under Star mode.
Also report, per point, the mean of the samples, their standard deviation (over the samples as measured, divided by n rather than n-1) and the slowest sample, as columns in that order after the rates; in the table, the batch size too, which the CSV and JSON always have. The median and the spread come after them, so that a table or a CSV read by column position keeps the columns it had before 1.8.0.
Before timing each point, check that the library computes the right result there; stop with exit status 2 if it does not. See CHECKING RESULTS. Default: on.
Do not check the results.
How the matrices are stored and passed to CBLAS: row (row-major, as C stores arrays) or col (column-major, as Fortran and LAPACK do). A library may handle the two differently: CBLAS row-major calls are often turned into column-major ones on the transposed problem, so a Fortran program can see other numbers than the default does. The problem is the same either way (the same sizes, triangle and transpose); only its storage changes. Ignored, with a warning, by the vector routines. Default: row.
Which matrix the routine is given: N as it is, T transposed, C conjugate-transposed (complex routines only: for a real one it is T). GEMM takes two letters, A's then B's (NT, TN, ...); GEMV and GBMV, the triangular routines (trmv, trsv, tpsv, tbsv, trmm, trsm) and the rank-k updates (syrk, syr2k: N or T; herk, her2k: N or C) one. The routines without a matrix to transpose refuse it. Default: N (NN for GEMM), what every routine always measured.
The triangle of a triangular, symmetric or Hermitian matrix the routine reads or writes (trmv, trsv, tpsv, tbsv, trmm, trsm, symv, spmv, hemv, syr, her, syr2, her2, symm, hemm, syrk, herk, syr2k, her2k): U or L. Refused by the routines without one. Default: U.
Which side the matrix multiplies (symm, hemm, trmm, trsm): L or R. On the right, A is N by N where it is M by M on the left, and the operation count follows: M*N*(N+1) for trsm on the right, N*M*(M+1) on the left. Refused by the routines without one. Default: L.
A triangular matrix's diagonal (trmv, trsv, tpsv, tbsv, trmm, trsm): N as stored, or U a unit diagonal, not read. Refused by the routines without one. Default: N.
GEMM only: how many matrices one call computes, from 1 to 1000000, each with its own A, B and C, of the sizes -m, -M and -K give. The operation count and the footprint are the batch's: the time is of the whole batch, and GFLOP/s the batch's rate. Default: 1.
GEMM only: how the batch is passed to the library. loop calls the routine once per matrix, which every library can do, and is the baseline; group makes one cblas_?gemm_batch call of one group; strided one cblas_?gemm_batch_strided call, the matrices one after the other in memory. MKL, NVPL and OpenBLAS (from 0.3.28, strided from 0.3.31) have both; BLIS and AOCL-BLAS group only; Netlib neither. A mode the library does not have exits 77 without measuring anything. So does a batch of matrices whose M x N x K is at most 100^3 with OpenBLAS 0.3.28 to 0.3.34 built with DYNAMIC_ARCH, as distributions build it, which crashes on one: the group call from 0.3.28 (OpenMathLib/OpenBLAS#5980), the strided one from 0.3.31 (#6086), both fixed in 0.3.35. A run with one such point is refused whole; one whose points are all larger, or loop, is measured. OpenBLAS's strided call refuses column-major matrices from 0.3.31 to 0.3.34, and its complex one computes wrong from two matrices on (OpenMathLib/OpenBLAS#6214, fixed in 0.3.35): --verify stops on both, exit 2. Default: loop.
One value of each per run, as --layout: run once per variant to compare them. Every output records the ones the routine takes, defaults included, and bmb_report(1) keeps the variants apart.
Where the operands of each timed call are: hot reuses them from call to call, so that those that fit are in the caches, as in a code calling the routine in a loop on the same data; cold rotates over copies of them, enough that the others reach past twice the last-level cache, so that each call finds its own out of the caches, as in a code that touches much other data in between. See HOW A NUMBER IS MEASURED. Default: hot.
Align every operand to bytes (a power of two from 8 to 2097152, a huge page), so that no library is measured on operands it finds misaligned. Default: 64, a cache line.
Add n elements (up to 65536) to every matrix's leading dimension: the distance in memory between two of its rows, or its columns with -L col. A size that is a power of two, such as 4096, puts every row on the same cache sets, which slows some libraries at exactly that size; a few elements of padding steps off it. Ignored, with a warning, by the vector routines, and by sspmv, dspmv, stpsv and dtpsv, whose matrix is packed: one triangle, N(N+1)/2 elements, row after row, or column after column with -L col, with no leading dimension. Default: 0.
Tag the results, for what no automatic field records: a BIOS setting, a NUMA binding, SMT off. 1 to 200 characters, no control characters. Default: none, and no label is written.
Record the peak FLOP rate of one core, in the routine's precision, in GFLOP/s: bmb_report(1) then shows level 3 results as a fraction of it, times the thread count (a thread a core), and draws the roofline of levels 1 and 2. The frequency times the operations a cycle gives it: two FMA units of 8 doubles each do 32. A plain decimal above 0 and up to 1000000, never estimated: the vector width, the FMA units and the frequency under load are not something the machine reports reliably. Default: none, and no peak is written.
Record the machine's memory bandwidth, in GB/s, the roofline's memory roof: STREAM's triad, or the vendor's figure. As --peak-gflops. Default: none.
Also save the results to file.
csv or json for -o. Default: guessed from the extension of the -o file, otherwise csv.
Show a summary of the options.
Show the version, the BLAS library, the width of the integers it takes (32-bit, or 64-bit in an ILP64 build), and the machine, without running anything.

The four size options each take a sweep:

max that one size 4096
min:max doubling 256:4096 → 256 512 1024 2048 4096
min:max:step linear 1000:4000:1000 → 1000 2000 3000 4000
v1,v2,... exactly those 64,1000,4096

max is always measured, even when the step would overshoot it: 100:1000:300 gives 100, 400, 700 and 1000. A sweep has at most 256 points. A size whose memory would not fit in size_t is refused before anything is allocated.