cbalint13 commented on code in PR #17627:
URL: https://github.com/apache/tvm/pull/17627#discussion_r1946579651
##########
include/tvm/topi/detail/broadcast.h:
##########
@@ -92,10 +91,12 @@ inline BroadcastHelper BroadcastShape(const
tvm::Array<tvm::PrimExpr>& shape1,
bh.vars1.push_front(bh.all_vars[0]);
bh.vars2.push_front(bh.all_vars[0]);
} else {
- ICHECK(false) << "Incompatible broadcast dims: " << shape1[s1_size - i]
<< " and "
- << shape2[s2_size - i]
- << " in: " << tvm::Array<tvm::PrimExpr>(shape1.begin(),
shape1.end()) << " and "
- << tvm::Array<tvm::PrimExpr>(shape2.begin(), shape2.end());
+ LOG(WARNING) << "Incompatible broadcast dims: " << shape1[s1_size - i]
<< " and "
+ << shape2[s2_size - i] << ". Automatically cutting the
larger dimension.";
Review Comment:
You relax here the constraint, leaving explicit warning on this, maybe
enough for brodcasting case.
Not an english native here, maybe s/cutting/trimming/ would sound better ? I
leave it up to your consideration.
--
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]