Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support finetuning the model saved on the mac platform on the Linux p… #34027

Merged
merged 1 commit into from
Jul 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion paddle/fluid/operators/matmul_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ class MatMulGradKernel : public framework::OpKernel<T> {
int head_number = 1;
#if defined(PADDLE_WITH_MKLML) && !defined(PADDLE_WITH_CUDA) && \
!defined(PADDLE_WITH_HIP)
head_number = context.Attr<int>("head_number");
if (context.HasAttr("head_number")) {
head_number = context.Attr<int>("head_number");
}
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前matmul有两个,还是一个matmul_v2 辛苦check一下是否有同样的问题

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matmul_v2 在Linux上多两个属性:mkldnn_data_type = float32,use_mkldnn = False,在mac上保存的Program在Linux上是可以运行的


if (head_number <= 1 && a.dims().size() == 3 && b.dims().size() <= 2) {
Expand Down