t-vi commented on pull request #7231:
URL: https://github.com/apache/tvm/pull/7231#issuecomment-759786425
FWIW, I don't think the test is really effective in ensuring that it's good.
```python
@torch.jit.script
def fn(x):
_ = x.unsqueeze_(2)
y = x *2
return y
m,p = tvm.relay.frontend.from_pytorch(fn, [('input', [5, 5])])
m2 = tvm.relay.transform.InferType()(m)
print(m2['main'].body.checked_type)
print(fn(torch.randn(5,5)).shape)
```
gives
```
Tensor[(5, 5), float32]
torch.Size([5, 5, 1])
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]