[Numpy-discussion] NumPy-Discussion OpenBLAS and dotblas

Sturla Molden sturla.molden at gmail.com
Tue Aug 12 15:24:28 EDT 2014


Charles R Harris <charlesr.harris at gmail.com> wrote:

>    - Move _dotblas down into multiarray
>    1. When there is cblas, add cblas implementations of decr->f->dot.
>       2. Reimplement API matrixproduct2
>       3. Make ndarray.dot a first class method and use it for numpy.dot.
>    - Implement matmul
>    1. Add matrixmultiply (matmul?) to the numpy API
>       2. Implement __matmul__ method.
>       3. Add functions to linalg for stacked vectors.
>       4. Make sure __matmul__ works with __numpy_ufunc__
>    - Consider using blas_lite instead of cblas, but that is now independent
>    of the previous steps.

We could consider to have a linalg._linalg module that just stores BLAS and
LAPACK function pointer values as read-only integer attributes. This way we
could move _dotblas into the core without actually having linalg in the
core. linalg._linalg would just sit there and own BLAS and LAPACK, and no
other part of NumPy would need build dependencies on these libraries. When
_dotblas is imported it just imports linalg._linalg and reads whatever
function pointer value it needs. It would also make it possible to remove
BLAS and LAPACK build dependencies from SciPy, as long as we export most or
all of BLAS and LAPACK. 

Sturla




More information about the NumPy-Discussion mailing list