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



##########
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:
       Hi @masahi sorry for late reply. Would you mind debug a little bit see 
if inputs[0]'s layout is correctly inferred? My suspect is inputs[0] becomes 
unknown layout during the alterlayout, and that's why `InferCorrectLayout` 
doesn't work.
   
   I implemented `AlterOpLayout` in NNVM at the first place and @merrymercy 
migrated it to Relay. `InferCorrectLayout` should work with this pass or at 
least it was my initial intention if I remember correctly.




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