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



##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -1757,6 +1759,20 @@ def _impl(inputs, input_types):
     return _impl
 
 
+def _stack(prelude):
+    def _impl(inputs, input_types):
+        if isinstance(inputs[0], list):
+            # a static python list of tensors
+            dim = inputs[1]
+            return _op.stack(inputs[0], dim)
+        else:
+            # List ADT case
+            # TODO: is there a better way to check if an input is a List ADT?

Review comment:
       It seems if I do `infer_type` here, I get 
   ```
   List[Tensor[(8, 8), float32]]
   ```
   
   Also, if I do `prelude.mod.get_global_type_var("List")`, I get
   ```
   List
   ```
   
   so I'm looking for a way to test type equality for types defined in prelude, 
any idea? cc @kevinthesun 




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