[SciPy-Dev] Use vecLibFort instead of Accelerate?

Pauli Virtanen pav at iki.fi
Sat Oct 11 16:02:06 EDT 2014


11.10.2014, 22:26, Matthew Brett kirjoitti:
[clip]
> OK - thanks - I am starting to understand.
> 
> To state clearly for my own benefit:
> 
> * sgemv is the Fortran API call;
> * cblas_sgemv is the C API call, used by numpy.dot
> 
> vecLibFort would fix any calls from scipy Fortran code to buggy
> Accelerate sgemv, but would not affect the numpy.dot calls.

Correct. The workaround itself is fairly simple
https://github.com/mcg1969/vecLibFort/blob/master/static.h#L104

The Fortran ABI issues vecLibFort corrects are non-issues for Scipy and
Numpy.

The main advantage in using vecLibFort rather than adding the
workarounds ourselves is that the problem is then someone else's and we
don't need to duplicate work in tracking Accelerate bugs.

> Do we (scipy) call sgemv at any point?   If not, how likely is it we
> will save a user from hitting the sgemv Accelerate bug by including
> the vecLibFort fix?

There are calls to sgemv in superlu and arpack. These may potentially
hit the Accelerate bug.

-- 
Pauli Virtanen




More information about the SciPy-Dev mailing list