-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
hidden bcast_params call in dist train #11575
Conversation
@@ -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 [ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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
…bcast_params_call
Fixed #11572