-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
module: autogradRelated to torch.autograd, and the autograd engine in generalRelated to torch.autograd, and the autograd engine in generalmodule: error checkingBugs related to incorrect/lacking error checkingBugs related to incorrect/lacking error checkingtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Bug
The code snippet below throws error. I'm trying to see if I could reuse a buffer.
To Reproduce
Steps to reproduce the behavior:
b = torch.randn(3, requires_grad=True)
c = torch.zeros(3)
c[[1,2]] = b[[1,1]]
c.sum().backward() # ok
c.sum().backward() # fail
RuntimeError: ntensor >= 3 INTERNAL ASSERT FAILED at caffe2/aten/src/ATen/native/cpu/IndexKernel.cpp:51, please report a bug to PyTorch.
Metadata
Metadata
Assignees
Labels
module: autogradRelated to torch.autograd, and the autograd engine in generalRelated to torch.autograd, and the autograd engine in generalmodule: error checkingBugs related to incorrect/lacking error checkingBugs related to incorrect/lacking error checkingtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module