Skip to content

Commit

Permalink
hot fix log (PaddlePaddle#14293)
Browse files Browse the repository at this point in the history
test=develop
  • Loading branch information
chengduo committed Nov 7, 2018
1 parent 65b61db commit ffc8661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/fluid/operators/math/cross_entropy.cu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ __device__ __forceinline__ double real_log(double x) { return log(x); }

__device__ __forceinline__ platform::float16 real_log(
const platform::float16& val) {
return static_cast<platform::float16>(hlog(static_cast<half>(val)));
return static_cast<platform::float16>(logf(static_cast<float>(val)));
}

template <typename T>
Expand Down

0 comments on commit ffc8661

Please sign in to comment.