File tree Expand file tree Collapse file tree 4 files changed +29
-12
lines changed Expand file tree Collapse file tree 4 files changed +29
-12
lines changed Original file line number Diff line number Diff line change 3030 - os : macOS-latest
3131 arch : aarch64
3232 version : ' 1'
33-
33+
3434 steps :
3535 - uses : actions/checkout@v5
3636 - uses : julia-actions/setup-julia@v2
Original file line number Diff line number Diff line change @@ -4,11 +4,17 @@ authors = ["Carsten Bauer <mail@carstenbauer.eu> and contributors"]
44version = " 0.2.0"
55
66[deps ]
7+ LAPACK32_jll = " 17f450c3-bd24-55df-bb84-8c51b4b939e3"
8+ LAPACK_jll = " 51474c39-65e3-53ba-86ba-03b1b862ec14"
79LinearAlgebra = " 37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
10+ blis32_jll = " e47b3055-b30e-52b1-9cd4-aea7f6c39f40"
811blis_jll = " 6136c539-28a5-5bf0-87cc-b183200dce32"
912
1013[compat ]
14+ blis32_jll = " 2"
1115blis_jll = " 2"
16+ LAPACK32_jll = " 3.12"
17+ LAPACK_jll = " 3.12"
1218julia = " 1.12"
1319
1420[extras ]
Original file line number Diff line number Diff line change 11module BLISBLAS
22
3- using blis_jll
3+ using blis32_jll, LAPACK32_jll
4+ using blis_jll, LAPACK_jll
45using LinearAlgebra
56
67function get_num_threads ()
78 ret = @ccall blis. bli_thread_get_num_threads ():: Cint
89 ret == - 1 && throw (ErrorException (" return value was -1" ))
10+ ret = @ccall blis32. bli_thread_get_num_threads ():: Cint
11+ ret == - 1 && throw (ErrorException (" return value was -1" ))
912 return ret
1013end
1114
1215function set_num_threads (nthreads)
1316 ret = @ccall blis. bli_thread_set_num_threads (nthreads:: Cint ):: Cvoid
1417 ret == - 1 && throw (ErrorException (" return value was -1" ))
18+ ret = @ccall blis32. bli_thread_set_num_threads (nthreads:: Cint ):: Cvoid
19+ ret == - 1 && throw (ErrorException (" return value was -1" ))
1520 return nothing
1621end
1722
1823function __init__ ()
19- if blis_jll. is_available ()
20- BLAS. lbt_forward (blis, clear= true )
24+ blis_available = blis32_jll. is_available () && blis_jll. is_available ()
25+ if blis_available
26+ BLAS. lbt_forward (blis32, clear= true )
27+ BLAS. lbt_forward (liblapack32)
28+ BLAS. lbt_forward (blis)
29+ BLAS. lbt_forward (liblapack)
2130 else
22- @warn (" blis_jll artifact doesn't seem to be available for your platform!" )
31+ @warn (" The artifacts blis_jll and blis32_jll are not available for your platform!" )
2332 end
2433end
2534
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ using Libdl
55
66function blas ()
77 libs = BLAS. get_config (). loaded_libs
8- lib = lowercase (basename (last (libs) . libname))
9- if contains (lib, " openblas" )
8+ libs = map (lib -> lowercase (basename (lib . libname)), libs )
9+ if mapreduce (lib -> contains (lib, " openblas" ), | , libs )
1010 return :openblas
11- elseif contains (lib, " blis" )
11+ elseif mapreduce (lib -> contains (lib, " blis" ), | , libs )
1212 return :blis
1313 else
1414 return :unknown
3333 end
3434
3535 @testset " BLAS" begin
36- # run all BLAS tests of the LinearAlgebra stdlib (i.e. LinearAlgebra/test/blas.jl)
37- # linalg_stdlib_test_path = joinpath(dirname(pathof(LinearAlgebra)), "..", "test")
38- # include(joinpath(linalg_stdlib_test_path, "blas.jl"))
39- include (" ./blas.jl" )
36+ # run all BLAS and LAPACK tests of the LinearAlgebra stdlib:
37+ # - LinearAlgebra/test/blas.jl
38+ # - LinearAlgebra/test/lapack.jl
39+ linalg_stdlib_test_path = joinpath (dirname (pathof (LinearAlgebra)), " .." , " test" )
40+ joinpath (linalg_stdlib_test_path, " blas.jl" ) |> include
41+ joinpath (linalg_stdlib_test_path, " lapack.jl" ) |> include
4042 end
4143end
You can’t perform that action at this time.
0 commit comments