summaryrefslogtreecommitdiff
path: root/numpy/matrixlib/tests/test_defmatrix.py
diff options
context:
space:
mode:
authorSturla Molden <sturla@molden.no>2014-10-27 07:45:57 +0100
committerCharles Harris <charlesr.harris@gmail.com>2015-05-03 12:58:26 -0600
commitcf3077696dd76d88e77173546a0d969eda3a7aa0 (patch)
tree4880f6a00c5a3b16ad3bbb575b8338d8a47a442f /numpy/matrixlib/tests/test_defmatrix.py
parent3782f7e0bfd9ac230b672a1295df580a40e9e109 (diff)
downloadnumpy-cf3077696dd76d88e77173546a0d969eda3a7aa0.tar.gz
BUG: Workaround segfault in Apple Accelerate framework SGEMV
SGEMV in Accelerate framework will segfault on MacOS X version 10.9 (aka Mavericks) if arrays are not aligned to 32 byte boundaries and the CPU supports AVX instructions. This can produce segfaults in np.dot. This patch overshadows the symbols cblas_sgemv, sgemv_ and sgemv exported by Accelerate to produce the correct behavior. The MacOS X version and CPU specs are checked on module import. If Mavericks and AVX are detected the call to SGEMV is emulated with a call to SGEMM if the arrays are not 32 byte aligned. If the exported symbols cannot be overshadowed on module import, a fatal error is produced and the process aborts. All the fixes are in a self-contained C file and do not alter the multiarray C code. The patch is not applied unless NumPy is configured to link with Apple's Accelerate framework.
Diffstat (limited to 'numpy/matrixlib/tests/test_defmatrix.py')
0 files changed, 0 insertions, 0 deletions