Skip to content

Commit 1f957b1

Browse files
committed
Use qualified name at::Half in Dispatch.h
This makes AT_DISPATCH_ALL_TYPES_AND_HALF valid outside of the at namespace. See pytorch/extension-cpp#15
1 parent 2f5c0c3 commit 1f957b1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

aten/src/ATen/Dispatch.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
AT_PRIVATE_CASE_TYPE(at::ScalarType::Double, double, __VA_ARGS__) \
1818
AT_PRIVATE_CASE_TYPE(at::ScalarType::Float, float, __VA_ARGS__) \
1919
default: \
20-
AT_ERROR(#NAME, " not implemented for '", the_type.toString(), "'"); \
20+
AT_ERROR(#NAME, " not implemented for '", the_type.toString(), "'"); \
2121
} \
2222
}()
2323

@@ -29,7 +29,7 @@
2929
AT_PRIVATE_CASE_TYPE(at::ScalarType::Float, float, __VA_ARGS__) \
3030
AT_PRIVATE_CASE_TYPE(at::ScalarType::Half, Half, __VA_ARGS__) \
3131
default: \
32-
AT_ERROR(#NAME, " not implemented for '", the_type.toString(), "'"); \
32+
AT_ERROR(#NAME, " not implemented for '", the_type.toString(), "'"); \
3333
} \
3434
}()
3535

@@ -43,7 +43,7 @@
4343
AT_PRIVATE_CASE_TYPE(at::ScalarType::Long, int64_t, __VA_ARGS__) \
4444
AT_PRIVATE_CASE_TYPE(at::ScalarType::Short, int16_t, __VA_ARGS__) \
4545
default: \
46-
AT_ERROR(#NAME, " not implemented for '", the_type.toString(), "'"); \
46+
AT_ERROR(#NAME, " not implemented for '", the_type.toString(), "'"); \
4747
} \
4848
}()
4949

@@ -59,7 +59,7 @@
5959
AT_PRIVATE_CASE_TYPE(at::ScalarType::Long, int64_t, __VA_ARGS__) \
6060
AT_PRIVATE_CASE_TYPE(at::ScalarType::Short, int16_t, __VA_ARGS__) \
6161
default: \
62-
AT_ERROR(#NAME, " not implemented for '", the_type.toString(), "'"); \
62+
AT_ERROR(#NAME, " not implemented for '", the_type.toString(), "'"); \
6363
} \
6464
}()
6565

@@ -74,8 +74,8 @@
7474
AT_PRIVATE_CASE_TYPE(at::ScalarType::Int, int32_t, __VA_ARGS__) \
7575
AT_PRIVATE_CASE_TYPE(at::ScalarType::Long, int64_t, __VA_ARGS__) \
7676
AT_PRIVATE_CASE_TYPE(at::ScalarType::Short, int16_t, __VA_ARGS__) \
77-
AT_PRIVATE_CASE_TYPE(at::ScalarType::Half, Half, __VA_ARGS__) \
77+
AT_PRIVATE_CASE_TYPE(at::ScalarType::Half, at::Half, __VA_ARGS__) \
7878
default: \
79-
AT_ERROR(#NAME, " not implemented for '", the_type.toString(), "'"); \
79+
AT_ERROR(#NAME, " not implemented for '", the_type.toString(), "'"); \
8080
} \
8181
}()

0 commit comments

Comments
 (0)