未验证 提交 2dcc622d 编写于 作者: J jiangfan06 提交者: GitHub

fix reduce.h (#54476)

上级 3a452e4e
......@@ -78,7 +78,7 @@ int XPUReduce(const Context& dev_ctx,
r = xpu::copy<XPUType>(dev_ctx.x_context(),
reinterpret_cast<const XPUType*>(x_data),
reinterpret_cast<XPUType*>(y_data),
x.numel() * sizeof(T));
x.numel());
PADDLE_ENFORCE_XDNN_SUCCESS(r, "copy");
} else {
r = func(dev_ctx.x_context(), x_data, y_data, xdims, reduce_dims);
......@@ -100,7 +100,7 @@ void ReduceKernelImpl(const DeviceContext& dev_ctx,
int r = xpu::copy<XPUType>(dev_ctx.x_context(),
reinterpret_cast<const XPUType*>(x_data),
reinterpret_cast<XPUType*>(y_data),
input.numel() * sizeof(T));
input.numel());
PADDLE_ENFORCE_XDNN_SUCCESS(r, "copy");
} else {
Functor func;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册