Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
7234 Discussions

Singular value decomposition function DBDSQR

CO_Traut
Beginner
1,016 Views
To calculate the singular values of a general matrix, the mkl tutorial says two functions are enough, DGERBD followed by DBDSQR. But it seems like another function (DORGBR) needs to be used in the middle.

Is the tutorial (mkl_man.pdf) right?
0 Kudos
4 Replies
ArturGuzik
Valued Contributor I
1,016 Views
Quoting - CO_Traut
To calculate the singular values of a general matrix, the mkl tutorial says two functions are enough, DGERBD followed by DBDSQR. But it seems like another function (DORGBR) needs to be used in the middle.

Is the tutorial (mkl_man.pdf) right?

DGERBD/DBDSQR should be enough. You can also call GESVD and get your matrix decomposed (including list of singular values (sorted)).

A.
0 Kudos
roland-duerr
Beginner
1,017 Views
Quoting - ArturGuzik

DGERBD/DBDSQR should be enough. You can also call GESVD and get your matrix decomposed (including list of singular values (sorted)).


May I ask which one is better? Is it worth to switch from GEBRD/BDSQR to GESVD?

Especially it is interesting to me which one is faster and whether there are differences in precision.
0 Kudos
ArturGuzik
Valued Contributor I
1,017 Views
Quoting - roland-duerr
May I ask which one is better? Is it worth to switch from GEBRD/BDSQR to GESVD?
Especially it is interesting to me which one is faster and whether there are differences in precision.
Roland,

I need to confess that I have not-that-deep knowledge of the algorithm details but I believe GESVD should be fine (this should include calls to GEBRD and BDSQR). You have just a single call. In any case it's superior to LINPACK implementation (as far as I know).

The other algorithm you can use and should be much faster for large problem is ?bdsdc and uses the "divide-and-conquer" algorithm (see MKL docs).

A.


0 Kudos
Michael_C_Intel4
Employee
1,017 Views
Quoting - CO_Traut
To calculate the singular values of a general matrix, the mkl tutorial says two functions are enough, DGERBD followed by DBDSQR. But it seems like another function (DORGBR) needs to be used in the middle.

Is the tutorial (mkl_man.pdf) right?

Hi,

it depends on whether you need singular vectors along with singular values, or not. In case you need full SVD you certainly need dorgbr to restore orthogonal matrix from its elementary reflectors representation. In case you don't need vectors, there's no need to call dorgbr.

MKL manual doesn't state ina general text that dgebrd and dbdsqr is enough, it just describes the decomposition - main (necessary) parts of the algorithm - just because the full description of all the branches would be too excessive. dorgbr isn't a routine making some decomposition - it just restores an orthogonal form.At last, dorgbr is explicitly mentioned in Figure 4-1 Decision Tree: Singular Value Decomposition at the appropriate bar.

Michael,
MKL Engineer.
0 Kudos
Reply