New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added linalg.eigh, linalg.eigvalsh #45526
Conversation
💊 CI failures summary and remediationsAs of commit bd41343 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 110 times. |
Added wrapper for CPU syevd.
b2a3d4b
to
6654f4c
Compare
Upadted tests
Updated apply_syevd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. My issues were addressed.
@IvanYashchuk Is this ready for review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @IvanYashchuk!
This looks really good. I made a lot of document suggestions but they should be easy to fix so we can merge this soon.
@mruberry, thank you for the feedback! I've fixed documentation issues. I've added a small change to the source code #45526 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, looks great, @IvanYashchuk!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Internal build errors are due to the user of toupper:
I'm not entirely sure why this happens on some builds. Would you try importing its header and verifying we're calling it with unsigned chars following https://en.cppreference.com/w/cpp/string/byte/toupper? |
the argument should first be converted to unsigned char
Hey @mruberry, let's see if tests pass now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Resolved the accumulated merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Autograd tests got broken with the last branch update. I'll fix that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This PR adds
torch.linalg.eigh
, andtorch.linalg.eigvalsh
for NumPy compatibility.The current
torch.symeig
uses (on CPU) a different LAPACK routine than NumPy (syev
vssyevd
). Even though it shouldn't matter in practice,torch.linalg.eigh
usessyevd
(as NumPy does).Ref #42666