You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/03/21 03:17:15 UTC

[GitHub] [tvm] leeexyz commented on a change in pull request #7692: [TE] Bugfix for reduction that involves multi-outs with where cond

leeexyz commented on a change in pull request #7692:
URL: https://github.com/apache/tvm/pull/7692#discussion_r598213293



##########
File path: src/te/operation/compute_op.cc
##########
@@ -57,8 +57,10 @@ TVM_REGISTER_NODE_TYPE(ComputeOpNode);
 static void VerifyComputeOp(const ComputeOpNode* op);
 
 inline bool ReduceEqual(const tir::ReduceNode* a, const tir::ReduceNode* b) {
+  StructuralEqual expr_equal;
   return (a->combiner.same_as(b->combiner)) && (a->source.same_as(b->source)) &&
-         (a->axis.same_as(b->axis)) && (a->condition.same_as(b->condition)) &&
+         (a->axis.same_as(b->axis)) &&
+         (a->condition.same_as(b->condition) || expr_equal(a->condition, b->condition)) &&

Review comment:
       Thanks, it's more elegant.




-- 
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:
users@infra.apache.org