diff --git a/paddle/fluid/operators/amp/amp_check_finite_and_scale_op.cu b/paddle/fluid/operators/amp/amp_check_finite_and_scale_op.cu index e691dd8bc8f5638653dd8f48744aaf317a13cf5c..b92c6901d71bd80c45b0681f62a1a2ddedfcf64a 100644 --- a/paddle/fluid/operators/amp/amp_check_finite_and_scale_op.cu +++ b/paddle/fluid/operators/amp/amp_check_finite_and_scale_op.cu @@ -25,7 +25,7 @@ __global__ void AmpCheckFiniteAndScale(const T* in, const T* scale, int num, const int idx = threadIdx.x + blockIdx.x * blockDim.x; if (idx < num) { - if (!std::isfinite(in[idx])) { + if (!isfinite(in[idx])) { *found_inf = 1; } out[idx] = *found_inf ? in[idx] : in[idx] * scale[0];