Closed prlw1 closed 1 month ago
Hi! Last week was a short week, so I didn't have a chance to take a look. I'll try to do that as soon as I can. Thanks!
PR #275 looks like it fixes this -- thanks! : - )
Given the state of affairs rasolca@ discovered, there is just one doubt left: is the fact that dsyrk takes two scalars, but symmetric_matrix_rank_k_update takes one scalar (no beta) intentional (because one can easily premultiply C), or an oversight?
@prlw1 It's probably an oversight, based on _DSYR
not having a beta
parameter. Thanks for pointing this out! It's pretty easy to add that overload to {symmetric,hermitian}_matrix_rank_[2]k_update
without breaking backwards compatibility (as one could always constrain that scalar template parameter for beta not to be mdspan
).
@prlw1 I've filed https://github.com/ORNL/cpp-proposals-pub/issues/468 to track the {symmetric,hermitian}_matrix_rank_[2]k_update
issue. I actually think this needs to be fixed before C++26, as I explain at that link. Please feel free to comment there if you wish; thanks!
As mentioned at the end of #261, I tried the example posted by @yigiter in https://github.com/kokkos/stdBLAS/issues/261#issuecomment-1873645288_ which lead me to wonder what
symmetric_matrix_rank_k_update
is computing.Given its name, I assume that
symmetric_matrix_rank_k_update
maps to the BLAS functiondsyrk
(but with a single scalar constant alpha, rather than BLAS's alpha and beta) described as:I reused @yigiter's example as follows:
which generates the output:
I expect the answer
as per the blas function (upper triangle).
Given some matrix
A
,A A^T
is going to be symmetric, so the symmetric constraint needs to be on the additive matrixC
in order to avoid a triangle of computations, The comment in https://github.com/kokkos/stdBLAS/blob/06e90a58b67c5adefff0f06904c8f8bc3371815b/include/experimental/__p1673_bits/blas3_matrix_rank_k_update.hpp#L152 seems to suggest thatA
is the matrix which needs to be symmetric?I am puzzled as to what
symmetric_matrix_rank_k_update
is meant to be computing?