未验证 提交 742cbe66 编写于 作者: L lilong12 提交者: GitHub

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

* add double grad for expand, test=develop
上级 a12071ab
...@@ -18,6 +18,7 @@ import numpy as np ...@@ -18,6 +18,7 @@ import numpy as np
import warnings import warnings
from multiprocessing import Process, Manager from multiprocessing import Process, Manager
import paddle
import paddle.fluid as fluid import paddle.fluid as fluid
from paddle.distributed.fleet.base.private_helper_function import wait_server_ready from paddle.distributed.fleet.base.private_helper_function import wait_server_ready
...@@ -869,7 +870,8 @@ class PaddleCloudRoleMaker(RoleMakerBase): ...@@ -869,7 +870,8 @@ class PaddleCloudRoleMaker(RoleMakerBase):
else: else:
self._collective_env() self._collective_env()
self._role_is_generated = True self._role_is_generated = True
self._gloo_init() if not paddle.fluid.framework.in_dygraph_mode():
self._gloo_init()
class UserDefinedRoleMaker(PaddleCloudRoleMaker): class UserDefinedRoleMaker(PaddleCloudRoleMaker):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册