masahi commented on code in PR #15502:
URL: https://github.com/apache/tvm/pull/15502#discussion_r1357793090


##########
tests/python/frontend/pytorch/test_forward.py:
##########
@@ -5355,6 +5355,16 @@ def forward(self, *args):
         assert "%aten::_convolution_0" in graph
 
 
+def test_inplace_copy():
+    class InplaceCopy(torch.nn.Module):
+        def forward(self, x):
+            x[:5, 0] = x[:5, 0] + 1
+            return x
+
+    inputs = torch.randn(10, 10)
+    verify_model(InplaceCopy(), [inputs])

Review Comment:
   Please add more tests, using various tricky examples to make sure that the 
conversion works. 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to