提交 8754cbd1 编写于 作者: W WangXi 提交者: gongweibao

fix std::min type in nan_inf, test=develop (#21725)

上级 549f24b5
......@@ -167,7 +167,9 @@ void TensorCheckerVisitor<platform::CUDADeviceContext>::apply(
}
const size_t threads = 1024;
size_t blocks = std::min(128ul, (tensor_.numel() + threads - 1) / threads);
size_t blocks =
std::min(static_cast<size_t>(128),
static_cast<size_t>((tensor_.numel() + threads - 1) / threads));
CheckNanInfKernel<<<blocks, threads, 0, dev_ctx->stream()>>>(
tensor_.data<T>(), tensor_.numel(), print_num, gpu_str_ptr);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册