Singular Value Decomposition (SVD) for Bidiagonal Matrices#
DSVD (BiDiagonal Singular Value Decomposition) computes the singular values from the SVD of batched bidiagonal matrices using the QR algorithm.
where
Ais a(M x M)bidiagonal matrix, either upper or lower,\(\Sigma\) is a
(M x M)diagonal matrix, the diagonal elements of which are the singular values ofA, in descending order (the singular values are always real and non-negative),Uis a(M x M)unitary matrix containing the left singular vectors ofA, andVis a(M x M)unitary matrix containing the right singular vectors ofA.
Note
cuSolverDx’s bdsvd functions only support upper bidiagonal matrices. For lower bidiagonal matrices, the function can be used according to the property \(A^H = V * \Sigma * U^H\).
Warning
cuSolverDx’s bdsvd functions only support computing the singular values in the current release. Support for the right/left singular vectors will be added in a future release.
cuSolverDx bdsvd device functions are as follows (see Execution Methods):
// Compute singular values only
__device__ void execute(data_type* d, data_type* e, status_type* info);
The bidiagonal matrix A is stored as two 1D arrays d and e, where d contains the diagonal elements, of size M per batch, and e contains the off-diagonal elements, of size M-1 per batch. On exit, the function overwrites d with the singular values in descending order and destroys e.
The function returns status info for each batch:
info = 0: The function completed successfully.info = i > 0: If the algorithm failed to converge in a total of30 * Miterations. Specifically,ielements ofehave not converged to zeros.
Note
cuSolverDx’s bdsvd functions only support real data type of matrix A, its singular values, and right/left singular vectors.
Note
Unlike LAPACK’s bdsqr, cuSolverDx’s bdsvd functions only guarantees the computed singular values are accurate to \(O(u||A||_2)\) where \(u\) is the unit-roundoff error for the precision.