mshr-h commented on code in PR #17858:
URL: https://github.com/apache/tvm/pull/17858#discussion_r2052148928


##########
python/tvm/relax/frontend/torch/fx_translator.py:
##########
@@ -476,6 +476,11 @@ def _inplace_fill(self, node: fx.Node) -> relax.Var:
         self.env[node.args[0]] = filled
         return filled
 
+    def _inplace_copy(self, node: fx.Node) -> relax.Var:
+        dst = self.env[node.args[1]]

Review Comment:
   According to the official doc, the first arg is src. The logic seems correct 
but the naming of the intermediate variable is misleading.
   https://pytorch.org/docs/stable/generated/torch.Tensor.copy_.html



##########
python/tvm/relax/frontend/torch/fx_translator.py:
##########
@@ -476,6 +476,11 @@ def _inplace_fill(self, node: fx.Node) -> relax.Var:
         self.env[node.args[0]] = filled
         return filled
 
+    def _inplace_copy(self, node: fx.Node) -> relax.Var:
+        dst = self.env[node.args[1]]

Review Comment:
   According to the official doc, the first arg is src. The logic seems correct 
but the naming of the intermediate variable is misleading.
   https://pytorch.org/docs/stable/generated/torch.Tensor.copy_.html



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