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
hasSideEffects INTERNAL ASSERT FAILED when using .split method with JIT #24243
Comments
@smessmer any progress on this? It repros for me |
The repro no longer errors, and there is another issue similar issue that is outstanding so I'm closing this. |
I get this error ,RuntimeError: kind_.is_prim() INTERNAL ASSERT FAILED at /pytorch/torch/csrc/jit/ir.cpp:904, please report a bug to PyTorch. Only prim ops are allowed to not have a registered operator but aten::_convolution doesn't have one either. We don't know if this op has side effects. (hasSideEffects at /pytorch/torch/csrc/jit/ir.cpp:904) |
@WGY907, it looks like this problem goes away with newer PyTorch versions. I ran the above code with 1.5.1 and had no problems. |
@eellison This bug is not fixed! If you call import torch
import numpy as np
@torch.jit.script
def get_loss(a, idxs):
idxs = idxs.split(split_size=1, dim=1)
b = a.index(idxs)
return b.sum()
c = torch.zeros(3, 4, 5)
c.requires_grad = True
idxs = torch.tensor(np.array([[0, 1, 2],
[0, 0, 4],
[0, 2, 4],
[2, 3, 0]], dtype=np.long))
loss = get_loss(c, idxs)
loss = get_loss(c, idxs)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-9-f6dfaf23fa61> in <module>
----> 1 loss = get_loss(c, idxs)
RuntimeError: kind_.is_prim() INTERNAL ASSERT FAILED at "/pytorch/torch/csrc/jit/ir/ir.cpp":1098, please report a bug to PyTorch. Only prim ops are allowed to not have a registered operator but aten::cat doesn't have one either. We don't know if this op has side effects. Reproduced in PyTroch 1.8 |
Is there any updates on this issue ? |
Any updates on this issue? |
When using the code snippet bellow, I get this error:
RuntimeError: kind_.is_prim() INTERNAL ASSERT FAILED at /pytorch/torch/csrc/jit/ir.cpp:904, please report a bug to PyTorch. Only prim ops are allowed to not have a registered operator but aten::cat doesn't have one either. We don't know if this op has side effects. (hasSideEffects at /pytorch/torch/csrc/jit/ir.cpp:904)
If
idxs.split(split_size=1, dim=1)
replaced withlist(idxs.split(split_size=1, dim=1))
the error disappears.PyTorch version is 1.2.0
cc @ezyang @gchanan @suo
The text was updated successfully, but these errors were encountered: