kokkos / stdBLAS

Reference Implementation for stdBLAS
Other
127 stars 22 forks source link

[ready] kokkos impl: `{symmetrix,hermitian}_matrix_rank_2k_update` #200

Closed mzuzek closed 2 years ago

mzuzek commented 2 years ago

This PR introduces Kokkos implementation and unit test for symmetric_matrix_rank_2k_update() and hermitian_matrix_rank_2k_update().

mzuzek commented 2 years ago

@mhoemmen @fnrizzi

Does symmetric_matrix_rank_2k_update() allow A.extent(1) != C.extent(0) or B.extent(0) != C.extent(0) ?

mhoemmen commented 2 years ago

@MikolajZuzek You're absolutely right -- I totally forgot to include that in the Preconditions (for dynamic extents) and Mandates (for static extents). I'll file an issue. DSYR2K documents that A and B need to have the same number of columns K. I would certainly welcome fixes to the reference implementation.

mzuzek commented 2 years ago

Thanks @mhoemmen for the clarification!

If C is NxN and A,B are NxK then incorrect Precondition B.extent(1) equals C.extent(0) should be replaced with B.extent(0) equals C.extent(0) and new one A.extent(1) equals B.extent(1) should be added, right ?

PS. Seems like the hermitian variant suffers from the same issue, so I took the liberty to update #201 title.

mhoemmen commented 2 years ago

@MikolajZuzek Please contact me offline if you would like to be credited in the proposal for finding this issue, and if so, whether you would like to supply an affiliation and/or e-mail address. Thanks!