diff options
author | Matti Picus <matti.picus@gmail.com> | 2022-01-05 17:45:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-05 17:45:12 +0200 |
commit | c69ca2e5f95f0bce97422b821a6542f06c44d02d (patch) | |
tree | 85cb413e936c9bc56ef05062bcf23dddabdd4635 /numpy | |
parent | 6a4e4a2ee2dbf6555b3ece09b3a4d84443c1b8cb (diff) | |
parent | 50d5f1af8406165128a8567b0796ce244542f70c (diff) | |
download | numpy-c69ca2e5f95f0bce97422b821a6542f06c44d02d.tar.gz |
Merge pull request #20695 from ahesford/x-the-avx
BLD: Add NPY_DISABLE_SVML env var to opt out of SVML
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/setup.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index 0f2f3c210..a67a4cab6 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -24,6 +24,11 @@ NPY_RELAXED_STRIDES_CHECKING = (os.environ.get('NPY_RELAXED_STRIDES_CHECKING', " NPY_RELAXED_STRIDES_DEBUG = (os.environ.get('NPY_RELAXED_STRIDES_DEBUG', "0") != "0") NPY_RELAXED_STRIDES_DEBUG = NPY_RELAXED_STRIDES_DEBUG and NPY_RELAXED_STRIDES_CHECKING +# Set NPY_DISABLE_SVML=1 in the environment to disable the vendored SVML +# library. This option only has significance on a Linux x86_64 host and is most +# useful to avoid improperly requiring SVML when cross compiling. +NPY_DISABLE_SVML = (os.environ.get('NPY_DISABLE_SVML', "0") == "1") + # XXX: ugly, we use a class to avoid calling twice some expensive functions in # config.h/numpyconfig.h. I don't see a better way because distutils force # config.h generation inside an Extension class, and as such sharing @@ -68,6 +73,8 @@ def can_link_svml(): """SVML library is supported only on x86_64 architecture and currently only on linux """ + if NPY_DISABLE_SVML: + return False machine = platform.machine() system = platform.system() return "x86_64" in machine and system == "Linux" |