You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/04/30 20:57:21 UTC

[GitHub] [incubator-tvm] kevinthesun commented on a change in pull request #5467: [Relay]Improve Shape Func handling for Tuple inputs

kevinthesun commented on a change in pull request #5467:
URL: https://github.com/apache/incubator-tvm/pull/5467#discussion_r418284406



##########
File path: src/relay/op/memory/memory.cc
##########
@@ -360,12 +360,26 @@ bool ShapeFuncRel(const Array<Type>& types, int num_inputs, const Attrs& attrs,
   auto tuple = TupleType(func_type->arg_types);
   auto in_types = FlattenTupleType(tuple);
   auto out_types = FlattenTupleType(func_type->ret_type);
+  int num_types = 0;

Review comment:
       The problem here is that we need to restore is_input to make it correspond to the flattened input types. However, is_input is created in memory alloc pass, it is in flatten pattern where a tuple input just get one single number instead of tuple of number. As a result we cannot use similar way of ```FlattenTupleType```. This also makes it more complicated for handling nested tuple as input.




----------------------------------------------------------------
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:
users@infra.apache.org