Skip to content

Commit

Permalink
Avoid deprecated BLAS.vendor() in MKL conflict check (#950)
Browse files Browse the repository at this point in the history
Patch as suggested by Carsten Bauer in #922.

GitHub: Fixes #922.

Co-authored-by: Mosè Giordano <[email protected]>
  • Loading branch information
dnadlinger and giordano authored Mar 3, 2022
1 parent f0e02f3 commit 85a11cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/numpy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ function npyinitialize()
numpy = pyimport("numpy")

# emit a warning if both Julia and NumPy are linked with MKL (#433)
if LinearAlgebra.BLAS.vendor() === :mkl &&
LinearAlgebra.BLAS.BlasInt === Int64 && hasproperty(numpy, "__config__")
julia_mkl = @static if VERSION < v"1.7"
LinearAlgebra.BLAS.vendor() === :mkl
else
any(contains("mkl"), getfield.(LinearAlgebra.BLAS.get_config().loaded_libs, :libname))
end
if julia_mkl && LinearAlgebra.BLAS.BlasInt === Int64 && hasproperty(numpy, "__config__")
config = numpy."__config__"
if hasproperty(config, "blas_opt_info")
blaslibs = get(config."blas_opt_info", Vector{String}, "libraries", String[])
Expand Down

0 comments on commit 85a11cd

Please sign in to comment.