Test torch.svd using complex float and double numbers (take 2)#45795
Test torch.svd using complex float and double numbers (take 2)#45795malfet wants to merge 4 commits intopytorch:masterfrom
Conversation
Array allocated by ALLOCATE_ARRAY will be freed when it goes out of scope
…float and double numbers" This reverts commit 5a47a21.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
IvanYashchuk
left a comment
There was a problem hiding this comment.
Hi! I left a few suggestions regarding lrwork that come from the MAGMA documentation.
| int64_t lrwork; // These settings are valid for on LAPACK 3.6+ | ||
| if (jobz == MagmaNoVec){ | ||
| lrwork = 7 * mn; | ||
| } else if (mx > 10 * mn){ |
There was a problem hiding this comment.
mx > 10 * n was an arbitrary decision, since LAPACK seems to not document this number #27653 (comment).
But MAGMA documents this condition. The threshold for mx >> mn is currently mx >= mn*17/9.
In code, this condition is calculated with (magma_int_t) (mn * 17. / 9.), maybe we can make it mx >= mn * 2?
There was a problem hiding this comment.
Do you know how 17/9 ration is computed? As in the documentation is simply says if mx >> mn
…ch#45795) Summary: Adds support for magmaSvd for complex numbers Fixes use-after-free error in `apply_symeig` Pull Request resolved: pytorch#45795 Reviewed By: ezyang Differential Revision: D24096955 Pulled By: malfet fbshipit-source-id: 0d8d8492f89fe722bbd5aed3528f244245b496d0
Adds support for magmaSvd for complex numbers
Fixes use-after-free error in
apply_symeig