This is an automated email from the ASF dual-hosted git repository.
tlopex pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 874de945ac Fixing datatype error for gpt-2 (#18328)
874de945ac is described below
commit 874de945aca2e7d29a0bbe54f08852d92c5f60b5
Author: Thais Camacho <[email protected]>
AuthorDate: Sun Sep 21 01:16:05 2025 -0300
Fixing datatype error for gpt-2 (#18328)
---
src/relax/op/op_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/relax/op/op_common.h b/src/relax/op/op_common.h
index adec5d3af6..0d4d594222 100644
--- a/src/relax/op/op_common.h
+++ b/src/relax/op/op_common.h
@@ -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. "