Public API

BLASBenchmarksCPU.benchmark_result_dfFunction
benchmark_result_df(benchmark_result::BenchmarkResult, `measure` = :minimum)

measure refers to the BenchmarkTools summary on times. Valid options are: :minimum, :medain, :mean, :maximum, and :hmean.

  • :minimum would yield the maximum GFLOPS, and would be the usual estimate used in Julia.
  • :hmean, the harmonic mean of the times, is usful if you want an average GFLOPS, instead of a GFLOPS computed with the average times.
source
BLASBenchmarksCPU.logspaceMethod

logspace(start, stop, length)

Defines a monotonically increasing range, log spaced when possible. Useful for defining a range of sizes for benchmarks.

julia> collect(logspace(1,100,3))
3-element Vector{Int64}:
   1
  10
 100

julia> collect(logspace(1,10,3))
3-element Vector{Int64}:
  1
  3
 10

julia> collect(logspace(1,5,3))
3-element Vector{Int64}:
 1
 2
 5

julia> collect(logspace(1,3,3))
3-element Vector{Int64}:
 1
 2
 3
source
BLASBenchmarksCPU.runbenchMethod
runbench(T = Float64;
         libs = default_libs(T),
         sizes = logspace(2, 4000, 200),
         threaded::Bool = Threads.nthreads() > 1,
         A_transform = identity,
         B_transform = identity,
         sleep_time = 0.0)
  • T: The element type of the matrices.
  • libs: Libraries to benchmark.
  • sizes: Sizes of matrices to benchmark. Must be an iterable with either eltype(sizes) === Int or eltype(sizes) === NTuple{3,Int}. If the former, the matrices are square, with each dimension equal to the value. If i::NTuple{3,Int}, it benchmarks C = A * B where A is i[1] by i[2], B is i[2] by i[3] and C is i[1] by i[3].
  • threaded: Should it benchmark multithreaded implementations?
  • A_transform: a function to apply to A. Defaults to identity, but can be adjoint.
  • B_transofrm: a function to apply to B. Defaults to identity, but can be adjoint.
  • sleep_time: The use of this keyword argument is discouraged. If set, it will call sleep in between benchmarks, the idea being to help keep the CPU cool. This is an unreliable means of trying to get more reliable benchmarks. Instead, it's reccommended you disable your systems turbo. Disabling it – and reenabling when you're done benchmarking – should be possible without requiring a reboot.
source
Gadfly.plotMethod
plot(br::BenchmarkResult;
     desc = "",
     logscale = false,
     width = 1200,
     height = 600,
     measure = :minimum,
     plot_directory = default_plot_directory(),
     plot_filename = default_plot_filename(br; desc = desc, logscale = logscale),
     file_extensions = ["svg", "png"],
     displayplot = true)

measure refers to the BenchmarkTools summary on times. Valid options are: :minimum, :medain, :mean, :maximum, and :hmean.

  • :minimum would yield the maximum GFLOPS, and would be the usual estimate used in Julia.
  • :hmean, the harmonic mean of the times, is usful if you want an average GFLOPS, instead of a GFLOPS computed with the average times.
source