18
18
19
19
bas_mflops = Float64[]
20
20
rec_mflops = Float64[]
21
+ rec4_mflops = Float64[]
22
+ rec800_mflops = Float64[]
21
23
ref_mflops = Float64[]
22
24
ns = 4 : 8 : 500
23
25
for n in ns
@@ -29,18 +31,34 @@ for n in ns
29
31
rt = @belapsed RecursiveFactorization. lu! (B) setup= (B = copy (A))
30
32
push! (rec_mflops, luflop (n)/ rt/ 1e9 )
31
33
34
+ rt4 = @belapsed RecursiveFactorization. lu! (B; threshold= 4 ) setup= (B = copy (A))
35
+ push! (rec4_mflops, luflop (n)/ rt4/ 1e9 )
36
+
37
+ rt800 = @belapsed RecursiveFactorization. lu! (B; threshold= 800 ) setup= (B = copy (A))
38
+ push! (rec800_mflops, luflop (n)/ rt800/ 1e9 )
39
+
32
40
ref = @belapsed LinearAlgebra. generic_lufact! (B) setup= (B = copy (A))
33
41
push! (ref_mflops, luflop (n)/ ref/ 1e9 )
34
42
end
35
43
36
44
using DataFrames, VegaLite
37
- df = DataFrame (Size = ns, RecursiveFactorization = rec_mflops, OpenBLAS = bas_mflops, Reference = ref_mflops)
38
- df = stack (df, [:RecursiveFactorization , :OpenBLAS , :Reference ], variable_name = :Library , value_name = :GFLOPS )
45
+ blaslib = BLAS. vendor () === :mkl ? :MKL : :OpenBLAS
46
+ df = DataFrame (Size = ns,
47
+ RecursiveFactorization = rec_mflops,
48
+ RecursiveFactorization4 = rec4_mflops,
49
+ RecursiveFactorization800 = rec800_mflops,
50
+ Reference = ref_mflops)
51
+ setproperty! (df, blaslib, bas_mflops)
52
+ df = stack (df, [:RecursiveFactorization ,
53
+ :RecursiveFactorization4 ,
54
+ :RecursiveFactorization800 ,
55
+ blaslib,
56
+ :Reference ], variable_name = :Library , value_name = :GFLOPS )
39
57
plt = df |> @vlplot (
40
- :line , color = :Library ,
41
- x = {:Size }, y = {:GFLOPS },
42
- width = 2400 , height = 600
43
- )
58
+ :line , color = { :Library , scale = {scheme = " category10 " }} ,
59
+ x = {:Size }, y = {:GFLOPS },
60
+ width = 2400 , height = 600
61
+ )
44
62
save (joinpath (homedir (), " Pictures" , " lu_float64.png" ), plt)
45
63
46
64
#=
0 commit comments