[bug fix] avoiding multiple initialization of gloo for fleet in dygraph mode (#27706)

* add double grad for expand, test=develop
my_2.0rc
lilong12 4 years ago committed by GitHub
parent a12071ab8a
commit 742cbe6660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,6 +18,7 @@ import numpy as np
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
@ -869,7 +870,8 @@ class PaddleCloudRoleMaker(RoleMakerBase):
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):

Loading…
Cancel
Save