Skip to content

Commit c53fb26

Browse files
committed
Use sycl::log1p in math_utils.hpp
Prevents build failure on AMD
1 parent 15e0def commit c53fb26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ template <typename T> T logaddexp(T x, T y)
126126
// compiler segfault in CUDA build is fixed
127127
const T tmp = x - y;
128128
if (tmp > 0) {
129-
return x + std::log1p(sycl::exp(-tmp));
129+
return x + sycl::log1p(sycl::exp(-tmp));
130130
}
131131
else if (tmp <= 0) {
132-
return y + std::log1p(sycl::exp(tmp));
132+
return y + sycl::log1p(sycl::exp(tmp));
133133
}
134134
else {
135135
return std::numeric_limits<T>::quiet_NaN();

0 commit comments

Comments
 (0)