masahi commented on a change in pull request #6740:
URL: https://github.com/apache/incubator-tvm/pull/6740#discussion_r510690158



##########
File path: tests/python/frontend/pytorch/test_forward.py
##########
@@ -3147,18 +3147,28 @@ def __init__(self, dim=0):
         def forward(self, data, index, src):
             return torch.scatter(data, dim=self.dim, index=index, src=src)
 
+    class ScatterAdd(Module):
+        def __init__(self, dim=0):
+            super().__init__()
+            self.dim = dim
+
+        def forward(self, data, index, src):
+            return torch.scatter_add(data, dim=self.dim, index=index, src=src)
+

Review comment:
       I was not aware of traced function, indeed it made tests much cleaner.
   We can enforce or encourage this style for new code.




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


Reply via email to