-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test that we can use Apple Accelerate by default on Mac #124
Conversation
15d3340
to
c843f00
Compare
The last time I checked, LAPACK was incomplete in Accelerate. |
@JSOBot runtests |
Codecov ReportBase: 78.27% // Head: 81.59% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #124 +/- ##
==========================================
+ Coverage 78.27% 81.59% +3.32%
==========================================
Files 5 5
Lines 359 364 +5
==========================================
+ Hits 281 297 +16
+ Misses 78 67 -11
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
On another note, I don't see the MC21 tests in the output anymore... 🤔 |
Is it possible to test the following code on your computer Dominique? # Current version of HSL
using HSL, MatrixMarket, SuiteSparseMatrixCollection
using LinearAlgebra, Printf, BenchmarkTools
ssmc = ssmc_db(verbose=false)
matrix = ssmc_matrices(ssmc, "Boeing", "pwtk")
path = fetch_ssmc(matrix, format="MM")
n = matrix.nrows[1]
A = MatrixMarket.mmread(joinpath(path[1], "$(matrix.name[1]).mtx"))
b = ones(n)
# Solve Ax = b.
LDL = @btime Ma57($A)
@btime ma57_factorize!($LDL)
@btime ma57_solve($LDL, $b)
blas = "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/libBLAS.dylib"
lapack = "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/libLAPACK.dylib"
LinearAlgebra.BLAS.lbt_forward(blas, clear=true, verbose=true)
LinearAlgebra.BLAS.lbt_forward(lapack, clear=false, verbose=true)
# Solve Ax = b.
LDL = @btime Ma57($A)
@btime ma57_factorize!($LDL)
@btime ma57_solve($LDL, $b) |
I changed |
Testing HSL tests passed: https://gist.github.com/f1c96b39f37c7cc4d81f99f1343b9d46 |
julia> @btime ma57_factorize($LDL)
ERROR: MethodError: no method matching ma57_factorize(::Ma57{Float64})
Closest candidates are:
ma57_factorize(::SparseArrays.SparseMatrixCSC{T, Ti}; kwargs...) where {T<:Union{Float32, Float64}, Ti<:Integer} at ~/.julia/packages/HSL/X5ozr/src/hsl_ma57.jl:472 |
It's |
julia> LDL = @btime Ma57($A)
499.216 ms (40 allocations: 345.10 MiB)
julia> @btime ma57_factorize!($LDL)
2.054 s (0 allocations: 0 bytes)
julia> @btime ma57_solve($LDL, $b)
40.659 ms (4 allocations: 3.33 MiB) After the BLAS change julia> LDL = @btime Ma57($A)
503.579 ms (40 allocations: 345.10 MiB)
julia> @btime ma57_factorize!($LDL)
1.976 s (0 allocations: 0 bytes)
julia> @btime ma57_solve($LDL, $b)
45.326 ms (4 allocations: 3.33 MiB) |
@JSOBot runtests |
OpenBLAS is already efficient 🤔 , we could keep OpenBLAS32 by default and just add in the documentation how to load MKL or Apple Accelerate (#98). |
Yes, that sounds good. |
@JSOBot runtests |
The error with JSOBot is
It's stuck on Julia 1.6. |
|
Could you test locally with 1.6? |
I just tested and it works fine. |
what do we do with this? |
We close it and I will add documentation about LBT (#98) |
It's documented nowhere but I found this in the tests of LBT:
https://github.com/JuliaLinearAlgebra/libblastrampoline/blob/main/test/runtests.jl#L150-L165
We have CI with a M1 so we can test it.