Skip to content

Conversation

@malfet
Copy link
Contributor

@malfet malfet commented Oct 3, 2020

Adds support for magmaSvd for complex numbers

Fixes use-after-free error in apply_symeig

malfet added 3 commits October 2, 2020 18:16
Array allocated by ALLOCATE_ARRAY  will be freed when it goes out of scope
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Collaborator

@IvanYashchuk IvanYashchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know how 17/9 ration is computed? As in the documentation is simply says if mx >> mn

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know.

@malfet malfet deleted the malfet/add-torch.svd-complex-cuda branch October 3, 2020 19:10
@facebook-github-bot
Copy link
Contributor

@malfet merged this pull request in 3a27fc9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants