You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (size_t i = 0; i < x_shape.size(); i++) {
CHECK(reporter->AssertEQ(cond_shape[i], x_shape[i]))
<< "Shape of condition " << condition->shape
<< " must be either equal to x or has dimension of 1.";
}
If cond_shape.size()=1 , and x_shape.size() = 2, then AssertEQ(cond_shape[i], x_shape[i]) will cause segment fault (array index overflow).
The text was updated successfully, but these errors were encountered:
@YPBlib can you send a PR to add additional checks to guard against this case? I think there is a case when cond_shape.size() == 1 but x_shape.size is not. which we need to have special way of handling it
I'm interested in working on this if no one else has signed up. I would appreciate if you can share more detailed thought for the implementation of additional check.
Here, https://github.com/dmlc/tvm/blob/0858c5ad42faefeefb7c24942a6bcbf075c4c4d7/src/relay/op/tensor/transform.cc#L1454
If cond_shape.size()=1 , and x_shape.size() = 2, then AssertEQ(cond_shape[i], x_shape[i]) will cause segment fault (array index overflow).
The text was updated successfully, but these errors were encountered: