We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd46ee6 commit df837d0Copy full SHA for df837d0
aten/src/ATen/native/cpu/MultinomialKernel.cpp
@@ -47,9 +47,9 @@ void multinomial_with_replacement_apply(
47
for (int64_t j = 0; j < n_categories; j++) {
48
val = self_ptr[i * self_stride_0 + j * self_stride_1];
49
TORCH_CHECK(val >= 0, "invalid multinomial distribution (encountering probability entry < 0)");
50
-// NB: std::isfinite doesn't bode well with clang for half datatypes,
+// NB: std::isfinite doesn't bode well with libc++ for half datatypes,
51
// so we manually cast it to a double and perform the check.
52
-#if defined(__clang__)
+#if defined(_LIBCPP_VERSION)
53
TORCH_CHECK(std::isfinite(static_cast<double>(val)),
54
"invalid multinomial distribution (encountering probability entry = infinity or NaN)");
55
#else
0 commit comments