summaryrefslogtreecommitdiff
path: root/numpy/build_utils/apple_accelerate.py
Commit message (Collapse)AuthorAgeFilesLines
* BLD: Move numpy.build_utils -> numpy._build_utils, add to MANIFEST.inAlex Willmer2015-08-051-21/+0
| | | | | This fixes the distutils built from an sdist (e.g. under tox), without including _build_utils in binary distributions or the installed numpy.
* BUG: Workaround segfault in Apple Accelerate framework SGEMVSturla Molden2015-05-031-0/+21
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.