Public API
BLASBenchmarksCPU.benchmark_result_df
BLASBenchmarksCPU.benchmark_result_threaded
BLASBenchmarksCPU.benchmark_result_type
BLASBenchmarksCPU.logspace
BLASBenchmarksCPU.runbench
Gadfly.plot
BLASBenchmarksCPU.benchmark_result_df
— Functionbenchmark_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 maximumGFLOPS
, 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.
BLASBenchmarksCPU.benchmark_result_threaded
— Methodbenchmark_result_threaded(benchmark_result::BenchmarkResult)
BLASBenchmarksCPU.benchmark_result_type
— Methodbenchmark_result_type(benchmark_result::BenchmarkResult)
BLASBenchmarksCPU.logspace
— Methodlogspace(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
BLASBenchmarksCPU.runbench
— Methodrunbench(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
oreltype(sizes) === NTuple{3,Int}
. If the former, the matrices are square, with each dimension equal to the value. Ifi::NTuple{3,Int}
, it benchmarksC = A * B
whereA
isi[1]
byi[2]
,B
isi[2]
byi[3]
andC
isi[1]
byi[3]
. - threaded: Should it benchmark multithreaded implementations?
- A_transform: a function to apply to
A
. Defaults toidentity
, but can beadjoint
. - B_transofrm: a function to apply to
B
. Defaults toidentity
, but can beadjoint
. - 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.
Gadfly.plot
— Methodplot(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 maximumGFLOPS
, 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.