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



##########
File path: src/relay/backend/utils.cc
##########
@@ -252,12 +242,12 @@ Array<Pass> GetPassPrefix(bool is_homegeneous, bool 
is_vm) {
     *rv = false;
   });
   pass_seqs.push_back(transform::EliminateCommonSubexpr(fskip));
-  pass_seqs.push_back(transform::SimplifyExpr());
   pass_seqs.push_back(transform::CombineParallelConv2D(3));
   pass_seqs.push_back(transform::CombineParallelDense(3));
   pass_seqs.push_back(transform::CombineParallelBatchMatmul(3));
   pass_seqs.push_back(transform::FoldConstant());
   pass_seqs.push_back(transform::FoldScaleAxis());
+  pass_seqs.push_back(transform::SimplifyExpr());

Review comment:
       I realized that `SimplifyExpr` practically depends on `FoldConstant` be 
applied beforehand. So I swapped the order.

##########
File path: src/relay/backend/utils.cc
##########
@@ -252,12 +242,12 @@ Array<Pass> GetPassPrefix(bool is_homegeneous, bool 
is_vm) {
     *rv = false;
   });
   pass_seqs.push_back(transform::EliminateCommonSubexpr(fskip));
-  pass_seqs.push_back(transform::SimplifyExpr());
   pass_seqs.push_back(transform::CombineParallelConv2D(3));
   pass_seqs.push_back(transform::CombineParallelDense(3));
   pass_seqs.push_back(transform::CombineParallelBatchMatmul(3));
   pass_seqs.push_back(transform::FoldConstant());
   pass_seqs.push_back(transform::FoldScaleAxis());
+  pass_seqs.push_back(transform::SimplifyExpr());

Review comment:
       I realized that `SimplifyExpr` practically depends on `FoldConstant` be 
applied beforehand. So I swapped the order.




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