Skip to content

LinearAlgebra.BLAS.vendor() has been deprecated #956

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

Open
samuela opened this issue Jan 11, 2022 · 4 comments
Open

LinearAlgebra.BLAS.vendor() has been deprecated #956

samuela opened this issue Jan 11, 2022 · 4 comments

Comments

@samuela
Copy link

samuela commented Jan 11, 2022

It looks like the vendor() function is deprecated in the following line of code:

if LinearAlgebra.BLAS.vendor() === :mkl &&

julia> import PyCall; PyCall.pyimport("jax").numpy.array([1.0])
┌ Warning: `vendor()` is deprecated, use `BLAS.get_config()` and inspect the output instead
│   caller = npyinitialize() at numpy.jl:67
└ @ PyCall ~/.julia/dev/PyCall/src/numpy.jl:67
...

I'm on python 3.9.9, numpy 1.21.4, Julia 1.7.1, and [438e738f] PyCall v1.93.0. This is running on NixOS 21.11.

julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Here's my shell.nix to reproduce the whole thing:

let
  # Last updated: 1/10/22. From status.nixos.org.
  pkgs = import (fetchTarball ("https://github.com/NixOS/nixpkgs/archive/8928525bd8b8cdc1235a92a89b72cbbe5bd8a00d.tar.gz")) { };
in
pkgs.mkShell {
  buildInputs = with pkgs; [
    # See https://github.com/NixOS/nixpkgs/issues/66716. Necessary for julia to
    # be able to download packages.
    cacert

    julia_17-bin

    python3
    python3Packages.jax
    python3Packages.jaxlib
  ];

  # See https://github.com/JuliaPy/PyCall.jl/issues/952#issuecomment-1005694327
  PYTHON = "${pkgs.python3}/bin/python";
}
@samuela
Copy link
Author

samuela commented Jan 11, 2022

The comment here suggests that vendor() has been removed since multiple vendors can be loaded simultaneously. Furthermore the vendor() function only ever returns :openblas or :openblas64, so I think the whole if block here

PyCall.jl/src/numpy.jl

Lines 67 to 76 in 9a084eb

if LinearAlgebra.BLAS.vendor() === :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[])
if any(s -> occursin("mkl", lowercase(s)), blaslibs)
@warn "both Julia and NumPy are linked with MKL, which may cause conflicts and crashes (#433)."
end
end
end
can be removed.

@lawless-m
Copy link

Same issue for me

julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-10400T CPU @ 2.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

@338rajesh
Copy link

Warning: `vendor()` is deprecated, use `BLAS.get_config()` and inspect the output instead
│   caller = npyinitialize() at numpy.jl:67
└ @ PyCall C:\Users\admin\.julia\packages\PyCall\L0fLP\src\numpy.jl:67

I am getting a similar warning message while using PyCall v1.93.0 on Julia 1.7.

Despite of this warning, I am able to get the job done without any trouble.

@bicycle1885
Copy link

bicycle1885 commented Jan 24, 2022

PR is here: #950.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants