10000 Merge pull request #5836 from rgommers/bento-sgemv-fix · numpy/numpy@93bcedf · GitHub
[go: up one dir, main page]

Skip to content

Commit 93bcedf

Browse files
committed
Merge pull request #5836 from rgommers/bento-sgemv-fix
BLD: use fix for Accelerate SGEMV issue in Bento build. See gh-5831.
2 parents 63e8bab + 7a02544 commit 93bcedf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

numpy/core/bscript

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ waflib.Logs.verbose = 1
1515
# context.
1616
import numpy.build_utils.waf
1717

18+
from numpy.build_utils.apple_accelerate \
19+
import \
20+
get_sgemv_fix
21+
1822
from code_generators.numpy_api \
1923
import \
2024
multiarray_api, ufunc_api
@@ -27,6 +31,9 @@ from setup_common \
2731
C99_FUNCS_SINGLE, C99_COMPLEX_TYPES, C99_COMPLEX_FUNCS, \
2832
MANDATORY_FUNCS, C_ABI_VERSION, C_API_VERSION
2933

34+
def make_relpath(f):
35+
return os.path.relpath(f, os.path.abspath(os.path.dirname(__file__)))
36+
3037
ENABLE_SEPARATE_COMPILATION = (os.environ.get('NPY_SEPARATE_COMPILATION', "1") != "0")
3138
NPY_RELAXED_STRIDES_CHECKING = (os.environ.get('NPY_RELAXED_STRIDES_CHECKING', "1") != "0")
3239

@@ -483,6 +490,8 @@ def pre_build(context):
483490
sources.extend([pjoin('src', 'multiarray', 'cblasfuncs.c'),
484491
pjoin('src', 'multiarray', 'python_xerbla.c'),
485492
])
493+
if "Accelerate" in bld.env.FRAMEWORK_CBLAS:
494+
sources.extend([make_relpath(get_sgemv_fix()[0])])
486495
else:
487496
sources = extension.sources
488497

0 commit comments

Comments
 (0)
0