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

hidden bcast_params call in dist train #11575

Merged
merged 2 commits into from
Jun 20, 2018

Conversation

Yancey1989
Copy link
Contributor

Fixed #11572

@@ -131,6 +132,11 @@ def __init__(self,
main = main_program
main = main if main else framework.default_main_program()
scope = executor.global_scope()
# FIXME(Yancey1989): it's a temporary approach to determinate the distribute
# train program, call self.bcast_param() at the end of each mini-batch.
self.is_dist = True if "recv" in [
Copy link
Contributor

Choose a reason for hiding this comment

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

Can use num_trainers to test if it's distributed training

Copy link
Contributor

Choose a reason for hiding this comment

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

The num_trainers looks a bit suspicious now. Is it only for nccl? I found some pserver training script working without setting num_trainers...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's only a temporary fix, we can insert bcast after recv op in PrallelExecuotor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And i think @panyx0718 is right, pserver update does not set num_trainers.

panyx0718
panyx0718 previously approved these changes Jun 20, 2018
Copy link
Contributor

@panyx0718 panyx0718 left a comment

Choose a reason for hiding this comment

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

Added a issue to address this properly soon: #11593

@Yancey1989 Yancey1989 merged commit 2fdbc1c into PaddlePaddle:develop Jun 20, 2018
@Yancey1989 Yancey1989 deleted the hidden_bcast_params_call branch June 20, 2018 08:15
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.

None yet

3 participants