From a7cb97a1a5b8d865443912afd5d3bd38b95bc1e4 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Fri, 5 Jun 2020 19:35:18 +0800 Subject: [PATCH] Fix/isfinite on windows (#24927) * refine isfinite, test=develop * use namespace std of isfinite, test=develop, test=win_gpu --- paddle/fluid/operators/amp/amp_check_finite_and_scale_op.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e691dd8bc8f..b92c6901d71 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]; -- GitLab