JuliaLinearAlgebra / BLISBLAS.jl

BLIS-pendant of MKL.jl
MIT License
11 stars 4 forks source link

Julia 1.7: Issue with/after `BLAS.get_num_threads()` #14

Open carstenbauer opened 1 month ago

carstenbauer commented 1 month ago

Julia 1.7.2

julia> using LinearAlgebra

julia> using BLISBLAS

julia> BLISBLAS.get_num_threads()
1

julia> BLAS.get_num_threads()
16790712

julia> BLISBLAS.get_num_threads()
-1359210104

Note that using only BLISBLAS.*_num_threads works just fine:

julia> BLISBLAS.set_num_threads(5)

julia> BLISBLAS.get_num_threads()
5

Julia 1.8.5 & Julia 1.10.3

julia> BLISBLAS.get_num_threads()
1

julia> BLAS.get_num_threads()
64

julia> BLISBLAS.get_num_threads()
1
jd-foster commented 1 month ago

For the Julia 1.7.2 case, the fixes for get/set_num_threads() were added recently, see: https://github.com/JuliaLinearAlgebra/BLIS.jl/issues/3#issuecomment-1772131793 but I think the compat bump might mean that it's still using an earlier blis_jll version 0.9? Or there is something happen with LBT in Julia 1.7? Possibly since BLISBLAS adds to OpenBLAS in LBT by default:

julia> BLAS.lbt_get_config()
LinearAlgebra.BLAS.LBTConfig
Libraries:
├ [ILP64] libopenblas64_.dll
└ [ILP64] libblis.dll

there is some "interference effect"?