Skip to content

Commit 0650dc8

Browse files
committed
Revert sycl::log1p to std::log1p in math_utils.hpp until compiler crash on CUDA is resolved
1 parent 163bd3c commit 0650dc8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dpctl/tensor/libtensor/include/utils/math_utils.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,14 @@ template <typename T> T logaddexp(T x, T y)
122122
return x + log2;
123123
}
124124
else {
125+
// FIXME: switch to `sycl::log1p` when
126+
// compiler segfault in CUDA build is fixed
125127
const T tmp = x - y;
126128
if (tmp > 0) {
127-
return x + sycl::log1p(sycl::exp(-tmp));
129+
return x + std::log1p(sycl::exp(-tmp));
128130
}
129131
else if (tmp <= 0) {
130-
return y + sycl::log1p(sycl::exp(tmp));
132+
return y + std::log1p(sycl::exp(tmp));
131133
}
132134
else {
133135
return std::numeric_limits<T>::quiet_NaN();

0 commit comments

Comments
 (0)