sweetcocoa commented on code in PR #16199:
URL: https://github.com/apache/tvm/pull/16199#discussion_r1418483318


##########
tests/python/frontend/pytorch/test_forward.py:
##########
@@ -720,9 +720,27 @@ def forward(self, *args):
             c = (args[0][:, :, 2] + 5) * 13
             return torch.cat([t.unsqueeze(2) for t in [a, b, c]], 2)
 
+    class Concatenate3(Module):
+        # pylint: disable=missing-class-docstring
+        def __init__(self):
+            super().__init__()
+
+            class _Concatenate(Module):
+                def forward(self, *args):
+                    a = (args[0][:, :, 0] + 2) * 7
+                    b = (args[0][:, :, 1] + 3) * 11
+                    c = (args[0][:, :, 2] + 5) * 13
+                    return torch.concat([t.unsqueeze(2) for t in [a, b, c]], 2)
+
+            self.mod = _Concatenate()
+
+        def forward(self, *args):
+            return self.mod(*args)
+

Review Comment:
   @echuraev 
   The `torch.concat` is preserved as `aten::concat` only when it is in a 
nested module like this code. (In the most cases, It is converted to 
`aten::cat` instead of `aten::concat`.) I've tried to find a reason for this, 
but haven't found one.



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