Skip to content
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

Add complex autograd support for torch.Tensor.index_put_ #53645

Closed
Tracked by #33152
anjali411 opened this issue Mar 9, 2021 · 4 comments
Closed
Tracked by #33152

Add complex autograd support for torch.Tensor.index_put_ #53645

anjali411 opened this issue Mar 9, 2021 · 4 comments
Labels
complex_autograd module: complex Related to complex number support in PyTorch module: testing Issues related to the torch.testing module (not tests) triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@anjali411
Copy link
Contributor

anjali411 commented Mar 9, 2021

It also looks like autograd for torch.Tensor.index_put_ is not even being tested for floating point tensors correctly.

>>> mask = torch.zeros(size=(10, ), dtype=torch.bool)
>>> y = torch.ones(size=(10, 10), dtype=torch.cdouble, requires_grad=True)
>>> y.clone().index_put_((mask, ), y[mask])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: index does not support automatic differentiation for outputs with complex dtype.

cc @ezyang @anjali411 @dylanbespalko @mruberry @aocsa

@anjali411 anjali411 added triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module module: complex Related to complex number support in PyTorch complex_autograd module: testing Issues related to the torch.testing module (not tests) labels Mar 9, 2021
@sunilkpai
Copy link

This is particularly an important issue for me. I'd like to help address it if possible sooner rather than later, but I've never contributed to PyTorch. What's the best place for me to learn to contribute on this?

@anjali411
Copy link
Contributor Author

Hi @sunilkpai! Glad you are interested in contributing to PyTorch. As a first step, check out our contribution guide. For this task, you could take a look at other similar PRs adding complex autograd support. For e.g., #53240

@kurtamohler
Copy link
Collaborator

This issues seems to be a duplicate of #53605, right?

@anjali411
Copy link
Contributor Author

@kurtamohler yeah! let's close this issue then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complex_autograd module: complex Related to complex number support in PyTorch module: testing Issues related to the torch.testing module (not tests) triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

3 participants