未验证 提交 a7cb97a1 编写于 作者: L Leo Chen 提交者: GitHub

Fix/isfinite on windows (#24927)

* refine isfinite, test=develop

* use namespace std of isfinite, test=develop, test=win_gpu
上级 a9dca580
...@@ -25,7 +25,7 @@ __global__ void AmpCheckFiniteAndScale(const T* in, const T* scale, int num, ...@@ -25,7 +25,7 @@ __global__ void AmpCheckFiniteAndScale(const T* in, const T* scale, int num,
const int idx = threadIdx.x + blockIdx.x * blockDim.x; const int idx = threadIdx.x + blockIdx.x * blockDim.x;
if (idx < num) { if (idx < num) {
if (!std::isfinite(in[idx])) { if (!isfinite(in[idx])) {
*found_inf = 1; *found_inf = 1;
} }
out[idx] = *found_inf ? in[idx] : in[idx] * scale[0]; out[idx] = *found_inf ? in[idx] : in[idx] * scale[0];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册