You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should emulate the Blas interface for the smallmatvec and smallmatmat functions. Currently we don't have the alpha and beta coefficients. This is a bit annoying for reverse mode, where we often want to update, not overwrite, the output vector.
I figured out why I didn't add the alpha and beta parameters initially. The Julia generic matrix-vector and matrix-matrix multiplication function doesn't accept them either. See the signature here. The hierarchy is:
smallmatvec
call smallmatvec_kernel! if matrix is small enough
call A_mul_B otherwise
Call BLAS if possible, doing some some conversion trick for complex valued matrices
Call Julia generic algorithm otherwise (matrices that don't appear to be strided in a way that BLAS an accept, or element types that are not supported by BLAS)
We could create a replacement for A_mul_B that also accepts the alpha and beta parameters, but that would require re-implementing the logic inside A_mul_B that sorts out what kinds of matrices can be passed to BLAS or not.
In the interim, I added the alpha and beta parameters to the matrix-matrix multiplication kernels (because I need those for what I am currently working on), and exported them.
We should emulate the Blas interface for the
smallmatvec
andsmallmatmat
functions. Currently we don't have thealpha
andbeta
coefficients. This is a bit annoying for reverse mode, where we often want to update, not overwrite, the output vector.Source code here.
The text was updated successfully, but these errors were encountered: