summaryrefslogtreecommitdiff
path: root/numpy/core/setup.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2019-12-07 14:17:20 +0200
committerPauli Virtanen <pav@iki.fi>2019-12-14 14:14:37 +0200
commita92039db1edf9d85059ddadc10134f434ae82ce7 (patch)
treefbc070996c04be5ac3bae9b88b923d19b4637f2b /numpy/core/setup.py
parent2fc10a279edfd132ec27eeac9e72f5a02a8bae5e (diff)
downloadnumpy-a92039db1edf9d85059ddadc10134f434ae82ce7.tar.gz
ENH: distutils: add support for ILP64 OpenBLAS (generic symbol suffix)
Generalize the ILP64 BLAS/LAPACK symbol name handling to deal with arbitrary prefix/suffix. The build-time behavior is changed so that HAVE_BLAS_ILP64 and BLAS_SYMBOL_SUFFIX/PREFIX defines are added to compile options as appropriate. Mainly to make autodetection of BLAS/LAPACK easier for downstream numpy.distutils users, add get_info aliases 'blas_ilp64_opt', 'blas_ilp64_plain_opt', and 'blas64__opt' for any/no/""&"64_" prefix&suffix, and the same for lapack. (Due to the way system_info works, each also gets a separate class.) In addition to openblas64_ which has a fixed suffix, add the (by default suffixless) openblas_ilp64, which correspond to the most likely cases to be present.
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r--numpy/core/setup.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index 5bbb1c622..974ec4628 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -91,9 +91,6 @@ def is_npy_no_smp():
# block.
return 'NPY_NOSMP' in os.environ
-def is_npy_use_blas64_():
- return (os.environ.get('NPY_USE_BLAS64_', "0") != "0")
-
def win32_checks(deflist):
from numpy.distutils.misc_util import get_build_architecture
a = get_build_architecture()
@@ -756,12 +753,12 @@ def configuration(parent_package='',top_path=None):
join('src', 'common', 'numpyos.c'),
]
- if is_npy_use_blas64_():
- blas_info = get_info('blas64__opt', 2)
- have_blas = blas_info and ('HAVE_CBLAS64_', None) in blas_info.get('define_macros', [])
+ if os.environ.get('NPY_USE_BLAS_ILP64', "0") != "0":
+ blas_info = get_info('blas_ilp64_opt', 2)
else:
blas_info = get_info('blas_opt', 0)
- have_blas = blas_info and ('HAVE_CBLAS', None) in blas_info.get('define_macros', [])
+
+ have_blas = blas_info and ('HAVE_CBLAS', None) in blas_info.get('define_macros', [])
if have_blas:
extra_info = blas_info