diff options
author | Andrew J. Hesford <ajh@sideband.org> | 2022-01-01 10:48:33 -0500 |
---|---|---|
committer | Andrew J. Hesford <ajh@sideband.org> | 2022-01-05 09:38:27 -0500 |
commit | 50d5f1af8406165128a8567b0796ce244542f70c (patch) | |
tree | 5f97c75aff8dfc15d701524156c0789c5409ae2c /numpy | |
parent | 84fd36cc94436bb842aa33c14f7e973d6e00c8b2 (diff) | |
download | numpy-50d5f1af8406165128a8567b0796ce244542f70c.tar.gz |
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" |