Skip to content

Fill eigenvector with zeros if not required#10645

Closed
ailzhang wants to merge 4 commits intopytorch:masterfrom
ailzhang:fix_symeig
Closed

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

Conversation

@ailzhang
Copy link
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
Contributor

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

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.

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

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

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
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
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
Contributor Author

@pytorchbot retest this please

1 similar comment
@ailzhang
Copy link
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
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