未验证 提交 de645153 编写于 作者: D duanboqiang 提交者: GitHub

fix bmm bug (#35098)

* fix bmm bug

* bmm style

* fix bmm
上级 36f7e751
......@@ -64,6 +64,10 @@ class BmmKernel : public framework::OpKernel<T> {
Tensor *out = context.Output<Tensor>("Out");
out->mutable_data<T>(context.GetPlace());
if (x.numel() == 0 || y.numel() == 0) {
return;
}
auto blas = math::GetBlas<DeviceContext, T>(context);
auto mat_dim_a = math::CreateMatrixDescriptor(x.dims(), 0, false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册