Created by: zhiqiu
PR types
Bug fixes
PR changes
OPs
Describe
Fix compile problem on windows. The error message is:
error : calling a
__host__
function("isfinite ") from a__global__
function("paddle::operators::AmpCheckFiniteAndScale ") is not allowed
This PR changes std::isfinite
to finite
, so the function uses the isfinite in cuda math functions, instead of isfinite
in c++.
In linux platform, the nvcc compiler should automatically redirect to cuda math functions, not sure why it fails on windows platform.