未验证 提交 4d259b91 编写于 作者: W WeiXin 提交者: GitHub

Support finetuning the model saved on the mac platform on the Linux platform (#34027)

上级 c4e04986
...@@ -232,7 +232,9 @@ class MatMulGradKernel : public framework::OpKernel<T> { ...@@ -232,7 +232,9 @@ class MatMulGradKernel : public framework::OpKernel<T> {
int head_number = 1; int head_number = 1;
#if defined(PADDLE_WITH_MKLML) && !defined(PADDLE_WITH_CUDA) && \ #if defined(PADDLE_WITH_MKLML) && !defined(PADDLE_WITH_CUDA) && \
!defined(PADDLE_WITH_HIP) !defined(PADDLE_WITH_HIP)
if (context.HasAttr("head_number")) {
head_number = context.Attr<int>("head_number"); head_number = context.Attr<int>("head_number");
}
#endif #endif
if (head_number <= 1 && a.dims().size() == 3 && b.dims().size() <= 2) { if (head_number <= 1 && a.dims().size() == 3 && b.dims().size() <= 2) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册