You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "mshr-h (via GitHub)" <gi...@apache.org> on 2025/04/21 08:52:02 UTC

Re: [PR] [Relax][PyTorch] Add copy_ op support in fxGraph [tvm]

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



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org