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

Avoid init_p2p all the times #9699

Merged
merged 1 commit into from
Apr 9, 2018
Merged

Conversation

panyx0718
Copy link
Contributor

@panyx0718 panyx0718 commented Apr 7, 2018

Fix #9665

@@ -64,7 +64,7 @@ void InitP2P(int count) {
#endif
}

void InitDevices() {
void InitDevices(bool init_p2p) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems that InitDevice is always called with init_p2p=true. Do we plan to change some of these invocations to be with false?

Copy link
Contributor Author

@panyx0718 panyx0718 Apr 7, 2018

Choose a reason for hiding this comment

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

see __init__.py, For all tests, it should be false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see. Cool!

@panyx0718 panyx0718 merged commit 326b434 into PaddlePaddle:develop Apr 9, 2018
@Xreki
Copy link
Contributor

Xreki commented Apr 10, 2018

Can we set the default value of init_p2p, because in users' inference codes, they need to call InitDevices. This change may fail their old codes if they update the library.

@panyx0718
Copy link
Contributor Author

@Xreki if there are more than a handful of users, we can set the default. Otherwise, we can just ask them to change their codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants