trevor-m edited a comment on issue #5018: Look for TupleType instead of 
TupleNode in LayoutRewriter
URL: https://github.com/apache/incubator-tvm/pull/5018#issuecomment-597257018
 
 
   > IMHO, I don't think we need to test this functionality in the partitioning 
pass as it is a unit test of layout itself. Instead, You can directly make the 
"partitioned" graph and run Alterlayout pass and assert whatever IR it should 
emit.
   
   Hi Zhi, I don't think it is possible to create the partitioned graph without 
actually using partitoning. I recreated the subgraph below:
   ```
   input_type = relay.TensorType((1, 5, 6, 6), "float32")
   x = relay.var("x", relay.TupleType([input_type, input_type]))
   out = relay.concatenate(x, axis=1)
   func = relay.Function([x], out)
   ```
   However, the `relay.concatenate` python API does not accept a Var node as 
the input:
   ```
     File "test_pass_alter_op_layout.py", line 1053, in test_concatenate
       out = relay.concatenate(x, axis=1)
   
     File "/data/neo-ai-tvm/python/tvm/relay/op/tensor.py", line 888, in 
concatenate
       data = list(data)
   
   TypeError: 'Var' object is not iterable
   ```
   
   Edit: I was able to bypass this by calling `tvm.relay.op._make.concatenate`. 
Updating PR...

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


With regards,
Apache Git Services

Reply via email to