未验证 提交 5013c676 编写于 作者: Q QingshuChen 提交者: GitHub

fix softmax bug for multi_card in kunlun (#30600)

上级 7e671c07
......@@ -46,7 +46,7 @@ class SoftmaxXPUKernel : public framework::OpKernel<T> {
Tensor clip_x;
int len = x->numel();
T* clip_x_data =
clip_x.mutable_data<T>(platform::XPUPlace(), len * sizeof(T));
clip_x.mutable_data<T>(context.GetPlace(), len * sizeof(T));
r = xpu::clip(dev_ctx.x_context(), x->data<float>(), clip_x_data, len,
-1e30, 1e30);
PADDLE_ENFORCE_EQ(r, XPU_SUCCESS,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册