Commit 7ee5cbac by 雾雨魔理沙 Committed by Tianqi Chen

[Relay] Fix BatchMatMulRel typerelation (#3032)

return false mean retry in the future, and in the case of error, it should be report ASAP, not retry.
parent 4b487c0d
......@@ -658,7 +658,7 @@ bool BatchMatmulRel(const Array<Type>& types,
const auto* x = types[0].as<TensorTypeNode>();
const auto* y = types[1].as<TensorTypeNode>();
if (x == nullptr || y == nullptr) return false;
if (x->shape.size() != 3 || y->shape.size() != 3) return false;
CHECK(x->shape.size() == 3 && y->shape.size() == 3);
CHECK(reporter->AssertEQ(x->shape[0], y->shape[0]))
<< "BatchDot: batch dimension doesn't match, "
<< " x shape=" << x->shape
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment