Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/relax/op/op_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ inline DataType InferBinaryArithOpOutDtype(const Call& call, const BlockBuilder&

if (lhs_dtype.is_void() || rhs_dtype.is_void()) {
return DataType::Void();
} else if (lhs_dtype != rhs_dtype) {
} else if (lhs_dtype != rhs_dtype && !lhs_dtype.is_bool() && !rhs_dtype.is_bool()) {
ctx->ReportFatal(Diagnostic::Error(call)
<< "TypeError: "
<< "Binary operators must have the same datatype for both operands. "
Expand Down