Skip to content

Commit 85a11cd

Browse files
dnadlingergiordano
andauthored
Avoid deprecated BLAS.vendor() in MKL conflict check (#950)
Patch as suggested by Carsten Bauer in #922. GitHub: Fixes #922. Co-authored-by: Mosè Giordano <[email protected]>
1 parent f0e02f3 commit 85a11cd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/numpy.jl

+6-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,12 @@ function npyinitialize()
6464
numpy = pyimport("numpy")
6565

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

0 commit comments

Comments
 (0)