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

mkldnn only need one trainer #5715

Merged
merged 2 commits into from
Nov 17, 2017
Merged

Conversation

tensor-tang
Copy link
Contributor

@tensor-tang tensor-tang commented Nov 16, 2017

check trainer_count when use_mkldnn

finish the PR in #5671

@tensor-tang tensor-tang requested a review from luotao1 November 16, 2017 15:36
@@ -137,6 +137,10 @@ void Trainer::init(const std::shared_ptr<TrainerConfigHelper>& config,
}
}

if (FLAGS_trainer_count > 1) {
CHECK(!FLAGS_use_mkldnn) << "MKLDNN only need 1 trainer";
}
Copy link
Contributor

Choose a reason for hiding this comment

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

这个check要调换一下顺序么:

if (FLAGS_use_mkldnn) {
     CHECK_EQ(FLAGS_trainer_count, 1) << "MKLDNN only need 1 trainer";
}

毕竟用use_mkldnn的情况少,就不用每次做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.

好的

@tensor-tang
Copy link
Contributor Author

done

Copy link
Contributor

@luotao1 luotao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit ba9f252 into PaddlePaddle:develop Nov 17, 2017
@tensor-tang tensor-tang deleted the check branch November 17, 2017 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants