masahi commented on a change in pull request #8669:
URL: https://github.com/apache/tvm/pull/8669#discussion_r686439327



##########
File path: python/tvm/topi/x86/dense_alter_op.py
##########
@@ -39,6 +40,17 @@ def _alter_dense_layout(attrs, inputs, tinfos, out_type):
         relay.op.get("nn.dense"), attrs, tinfos, out_type, target
     )
     workload = autotvm.task.get_workload(outs)
+
+    data_type = 
relay.transform.InferType()(IRModule.from_expr(inputs[0]))["main"].body.checked_type

Review comment:
       @yzhliu  What does it mean for the layout to be correctly inferred?  For 
example, I dumped `new_in_layouts` in `DenseInferCorrectLayout` but there is no 
useful information.
   
   In the test case I added, layout information is gone after avg pooling at 
https://github.com/apache/tvm/blob/95a32995c9c50b3dfc63eca0ff0d5bcd92b01816/tests/python/relay/test_pass_alter_op_layout.py#L1361.
 Layout information is not propagated to `dense` and so the only way to tell if 
layout transform is happening is via its input shape (2d or 3d). 
   
   I'm going to look at how `layout_transform` is inserted for conv2d alter 
layout. 




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