Skip to content

Commit 986b456

Browse files
authored
Fix plots, evaluate benchmarks from outer to inner rather than first to last (#64)
1 parent 272c0b0 commit 986b456

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Gaius = "0.6.4"
3333
LoopVectorization = "0.12"
3434
Octavian = "0.2"
3535
ProgressMeter = "1.4"
36-
Tullio = "0.2"
36+
Tullio = "0.2, 0.3"
3737
VectorizationBase = "0.19, 0.20"
3838
julia = "1.5"
3939

src/plotting.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,9 @@ function _plot(
109109
colors = getcolor.(br.libraries);
110110
libraries = string.(br.libraries)
111111
xscale = logscale ? Scale.x_log10(labels=string roundint exp10) : Scale.x_continuous
112-
# xscale = logscale ? Scale.x_log10 : Scale.x_continuous
113112
plt = plot(
114113
Gadfly.Guide.manual_color_key("Libraries", libraries, colors),
115-
Guide.xlabel("Size"), Guide.ylabel("GFLOPS"), xscale
114+
Guide.xlabel("Size"), Guide.ylabel("GFLOPS"), xscale#, xmin = minsz, xmax = maxsz
116115
)
117116
for i eachindex(libraries)
118117
linestyle = isjulialib(libraries[i]) ? :solid : :dash
@@ -122,6 +121,9 @@ function _plot(
122121
)
123122
push!(plt, l)
124123
end
124+
minsz, maxsz = extrema(br.sizes)
125+
l10min = log10(minsz); l10max = log10(maxsz);
126+
push!(plt, Stat.xticks(ticks = range(l10min, l10max, length=round(Int,(1+2*(l10max-l10min))))))
125127
displayplot && display(plt)
126128
mkpath(plot_directory)
127129
_filenames = String[]

src/runbenchmark.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,13 @@ function runbench(
288288
p = Progress(length(sizes))
289289
gflop_report_type = NamedTuple{(:MedianGFLOPS, :MaxGFLOPS), Tuple{Float64, Float64}}
290290
last_perfs = Vector{Tuple{Symbol,Union{gflop_report_type,NTuple{3,Int}}}}(undef, length(libs)+1)
291-
for (j,s) enumerate(sizevec)
291+
for _j in 0:length(sizevec)-1
292+
if iseven(_j)
293+
j = (_j >> 1) + 1
294+
else
295+
j = length(sizevec) - (_j >> 1)
296+
end
297+
s = sizevec[j]
292298
M, K, N = matmul_sizes(s)
293299
A, off = alloc_mat(M, K, memory, 0, A_transform)
294300
B, off = alloc_mat(K, N, memory, off, B_transform)

0 commit comments

Comments
 (0)