merrymercy commented on a change in pull request #7156:
URL: https://github.com/apache/tvm/pull/7156#discussion_r548440939



##########
File path: src/auto_scheduler/compute_dag.cc
##########
@@ -1023,7 +1032,10 @@ ComputeDAG ComputeDAG::RewriteLayout(Array<Step>* 
transform_steps,
             }
             original_compute_op = op;
             CHECK(!new_compute_op.defined());
-            new_compute_op = te::ComputeOp(pop->name, pop->tag, pop->attrs, 
pop->axis, new_body);
+            auto new_attrs = pop->attrs;
+            new_attrs.Set("ori_placeholder_layout", 
tvm::String(origin_layout));
+            new_attrs.Set("new_placeholder_layout", tvm::String(new_layout));
+            new_compute_op = te::ComputeOp(pop->name, pop->tag, new_attrs, 
pop->axis, new_body);

Review comment:
       No. `Conv2DAttrs` is used to pass layout information across multiple 
relay passes.
   The object created here cannot live across multiple relay passes.




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