explosion / cython-blis

💥 Fast matrix-multiplication as a self-contained Python library – no system dependencies!
Other
219 stars 37 forks source link

Add cdef nogil sgemm and saxpy functions #70

Closed danieldk closed 2 years ago

danieldk commented 2 years ago

The motivation for adding these functions is to be able to use them from cdef nogil code from different BLAS implementations interchangeably. The signature mirrors CBLAS as closely as possible, with the following simplifications to sgemm:

We also use 32-bit integer sizes and increments as the lowest-common denominator of different BLAS versions.

shadeMe commented 2 years ago

LGTM.

Just one question: Would it make sense to also include variants of the two functions that take double precision arguments, for the sake of completeness? The original gemm and axpy functions support both.

danieldk commented 2 years ago

Just one question: Would it make sense to also include variants of the two functions that take double precision arguments, for the sake of completeness? The original gemm and axpy functions support both.

We currently don't use them in spaCy, but I think it makes sense to add these for completeness. So I'll add them.

danieldk commented 2 years ago

We currently don't use them in spaCy, but I think it makes sense to add these for completeness. So I'll add them.

Added.