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



##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -337,6 +337,55 @@ def _impl(inputs, input_types):
         return _op.transform.repeat(data, repeats=repeats, axis=axis)
     return _impl
 
+
+def _parse_input_data(inp):
+    import torch
+    if isinstance(inp, _expr.Var):
+        data = inp
+    elif isinstance(inp, _expr.Call):
+        data = inp
+    elif isinstance(inp, torch.Tensor):

Review comment:
       ok this is because of this line
   
https://github.com/apache/incubator-tvm/blob/22db299b33f05570db2a5a406bdb37b57198a822/python/tvm/relay/frontend/pytorch.py#L1832
   
   Can you apply `_wrap_const` on it? See how badly it breaks the rest of test 
cases. Returning a raw torch tensor is not a good idea anyway.




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