Skip to content

Commit abbf572

Browse files
committed
change is_integer_or_bool
1 parent c15be46 commit abbf572

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/cinn/hlir/dialect/operator/transforms/add_cast_to_elementwise_add_pass.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace cinn {
2727
namespace dialect {
2828
namespace ir {
2929

30-
auto is_int64_or_uint8_or_bool = [](const pir::Type& x) {
30+
auto is_integer_or_bool = [](const pir::Type& x) {
3131
return x.isa<pir::IndexType>() || x.isa<pir::Int64Type>() ||
3232
x.isa<pir::Int32Type>() || x.isa<pir::Int16Type>() ||
3333
x.isa<pir::Int8Type>() || x.isa<pir::UInt8Type>() ||
@@ -44,7 +44,7 @@ pir::Type GetOutputDtype(const pir::Type& x, const pir::Type& y) {
4444
return pir::Complex64Type::get(context);
4545
}
4646

47-
if (is_int64_or_uint8_or_bool(x) || is_int64_or_uint8_or_bool(y)) {
47+
if (is_integer_or_bool(x) || is_integer_or_bool(y)) {
4848
PADDLE_THROW(::common::errors::InvalidType(
4949
"Type promotion only support calculations between floating-point "
5050
"numbers and between complex and real numbers. But got different "

0 commit comments

Comments
 (0)