rebel-hykim commented on code in PR #15502:
URL: https://github.com/apache/tvm/pull/15502#discussion_r1356488901


##########
python/tvm/relay/frontend/pytorch.py:
##########
@@ -3747,6 +3747,93 @@ def weight_norm(self, inputs, input_types):
         )
         return weight_g * (weight_v / norm_v)
 
+    def inplace_copy(self, inputs, input_types):
+        source = inputs[0]
+        values = inputs[1]
+        accumulate = inputs[2]
+        if not accumulate:
+            mode = "update"
+        else:
+            mode = "add"
+
+        # Track slice and select calls
+        slice_and_select_calls = []
+        while True:
+            if isinstance(source, _expr.Call) and source.op.name in [
+                "strided_slice",

Review Comment:
   그냥 궁금해서 그러는데, strided_slice, take만 handle하면 되나요?



##########
python/tvm/relay/frontend/pytorch.py:
##########
@@ -4470,6 +4558,26 @@ def _run_jit_passes(graph, enable_lower_all_tuples=True):
         torch._C._jit_pass_lower_all_tuples(graph)
 
 
+def _redirect_inplace_output(graph):
+    for node in graph.nodes():
+        if node.kind() == "aten::copy_":
+            node_inputs = list(node.inputs())
+            src_node = node_inputs[0].node()
+            slice_and_select_nodes = []

Review Comment:
   안쓰이는 것 같은데 지워도 될까요?



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