Skip to content

Commit ebf23a5

Browse files
Fix isIntegralType error msg (#1789)
1 parent 0c82ecf commit ebf23a5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

torch/csrc/jit/codegen/cuda/type.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ DataType indexModeToDtype(KernelIndexMode index_mode) {
2121

2222
bool isFloatingPointType(DataType dtype) {
2323
switch (dtype) {
24-
case DataType::Bool:
25-
return false;
2624
case DataType::Double:
2725
case DataType::Float:
2826
case DataType::Half:
2927
case DataType::BFloat16:
3028
return true;
29+
case DataType::Bool:
3130
case DataType::Index:
3231
case DataType::Int:
3332
case DataType::Int32:
@@ -78,10 +77,9 @@ bool isIntegralType(DataType dtype) {
7877
case DataType::Int32:
7978
return true;
8079
case DataType::Null:
81-
TORCH_CHECK(
82-
false, "Null type is not a valid argument to isFloatingPoint");
80+
TORCH_CHECK(false, "Null type is not a valid argument to isIntegralType");
8381
default:
84-
TORCH_CHECK(false, "Type not supported in isFloatingPoint");
82+
TORCH_CHECK(false, "Type not supported in isIntegralType");
8583
}
8684
}
8785

0 commit comments

Comments
 (0)