rocSOLVER icon indicating copy to clipboard operation
rocSOLVER copied to clipboard

Fix stein initial eigenvectors' choices

Open jmachado-amd opened this issue 1 year ago • 1 comments

This PR fixes a bug in roclapack_stein where eigenvectors would fail to converge because the initial values used in stein would be orthogonal to the real eigenvectors (to numerical precision). It improves stein's initial choice by sampling the components of the starting vector from a pseudorandom number generator. The generator is stateless, previous iterates are kept as local variables in the caller.

jmachado-amd avatar May 07 '24 19:05 jmachado-amd

I made this PR to start the conversation. If everyone agrees that the proposed solution is adequate, we might start discussing whether this can stay as is or if it would be better to move the pseudorandom number generator elsewhere (and to add it to the library tests).

Of course, the code style here is a bit different, please let me know of anything you think should be changed to better reflect rocsolver's codding style.

jmachado-amd avatar May 07 '24 19:05 jmachado-amd