Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fill eigenvector with zeros if not required#10645

Closed
ailzhang wants to merge 4 commits into
pytorch:masterfrom
ailzhang:fix_symeig
Closed

Fill eigenvector with zeros if not required#10645
ailzhang wants to merge 4 commits into
pytorch:masterfrom
ailzhang:fix_symeig

Conversation

@ailzhang
Copy link
Copy Markdown
Contributor

Fix #10345, which only happens in CUDA case.

  • Instead of returning some random buffer, we fill it with zeros.

  • update torch.symeig doc.

@vishwakftw
Copy link
Copy Markdown
Contributor

I think it would be nice to have a test for this.

Copy link
Copy Markdown
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.

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

Copy link
Copy Markdown
Contributor

@li-roy li-roy left a comment

Choose a reason for hiding this comment

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

Should we consider adding python wrapper and just returning a single Tensor in the eigenvectors=False case? Other than that, lgtm.

Comment thread test/test_torch.py Outdated
resv2 = torch.randn(3, 3)
cov = cov.cuda()
rese2 = torch.zeros(3).cuda()
resv2 = torch.randn(3, 3).cuda()

This comment was marked as off-topic.

Copy link
Copy Markdown
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.

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

Copy link
Copy Markdown
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.

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

@ailzhang
Copy link
Copy Markdown
Contributor Author

@pytorchbot retest this please

1 similar comment
@ailzhang
Copy link
Copy Markdown
Contributor Author

@pytorchbot retest this please

zdevito pushed a commit to zdevito/ATen that referenced this pull request Aug 29, 2018
Summary:
Fix #10345, which only happens in CUDA case.

* Instead of returning some random buffer, we fill it with zeros.

* update torch.symeig doc.
Pull Request resolved: pytorch/pytorch#10645

Reviewed By: soumith

Differential Revision: D9395762

Pulled By: ailzhang

fbshipit-source-id: 0f3ed9bb6a919a9c1a4b8eb45188f65a68bfa9ba
PenghuiCheng pushed a commit to PenghuiCheng/pytorch that referenced this pull request Sep 11, 2018
Summary:
Fix pytorch#10345, which only happens in CUDA case.

* Instead of returning some random buffer, we fill it with zeros.

* update torch.symeig doc.
Pull Request resolved: pytorch#10645

Reviewed By: soumith

Differential Revision: D9395762

Pulled By: ailzhang

fbshipit-source-id: 0f3ed9bb6a919a9c1a4b8eb45188f65a68bfa9ba
@ezyang ezyang added the merged label Jun 26, 2019
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Fix pytorch#10345, which only happens in CUDA case.

* Instead of returning some random buffer, we fill it with zeros.

* update torch.symeig doc.
Pull Request resolved: pytorch#10645

Reviewed By: soumith

Differential Revision: D9395762

Pulled By: ailzhang

fbshipit-source-id: 0f3ed9bb6a919a9c1a4b8eb45188f65a68bfa9ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potential Bug in torch.symeig()

5 participants