Skip to content

Commit ffc8661

Browse files
author
chengduo
authored
hot fix log (#14293)
test=develop
1 parent 65b61db commit ffc8661

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/fluid/operators/math/cross_entropy.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ __device__ __forceinline__ double real_log(double x) { return log(x); }
2828

2929
__device__ __forceinline__ platform::float16 real_log(
3030
const platform::float16& val) {
31-
return static_cast<platform::float16>(hlog(static_cast<half>(val)));
31+
return static_cast<platform::float16>(logf(static_cast<float>(val)));
3232
}
3333

3434
template <typename T>

0 commit comments

Comments
 (0)