1818
1919bas_mflops = Float64[]
2020rec_mflops = Float64[]
21+ rec4_mflops = Float64[]
22+ rec800_mflops = Float64[]
2123ref_mflops = Float64[]
2224ns = 4 : 8 : 500
2325for n in ns
@@ -29,18 +31,34 @@ for n in ns
2931 rt = @belapsed RecursiveFactorization. lu! (B) setup= (B = copy (A))
3032 push! (rec_mflops, luflop (n)/ rt/ 1e9 )
3133
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+
3240 ref = @belapsed LinearAlgebra. generic_lufact! (B) setup= (B = copy (A))
3341 push! (ref_mflops, luflop (n)/ ref/ 1e9 )
3442end
3543
3644using 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 )
3957plt = 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+ )
4462save (joinpath (homedir (), " Pictures" , " lu_float64.png" ), plt)
4563
4664#=
0 commit comments