Skip to content

Commit

Permalink
[bug fix] avoiding multiple initialization of gloo for fleet in dygra…
Browse files Browse the repository at this point in the history
…ph mode (PaddlePaddle#27706)

* add double grad for expand, test=develop
  • Loading branch information
lilong12 authored Sep 30, 2020
1 parent a12071a commit 742cbe6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/paddle/distributed/fleet/base/role_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import warnings
from multiprocessing import Process, Manager

import paddle
import paddle.fluid as fluid
from paddle.distributed.fleet.base.private_helper_function import wait_server_ready

Expand Down Expand Up @@ -869,7 +870,8 @@ def _generate_role(self):
else:
self._collective_env()
self._role_is_generated = True
self._gloo_init()
if not paddle.fluid.framework.in_dygraph_mode():
self._gloo_init()


class UserDefinedRoleMaker(PaddleCloudRoleMaker):
Expand Down

0 comments on commit 742cbe6

Please sign in to comment.