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

Add solutions to PyLayer which is unsupported in DataParallel #35401

Merged
merged 15 commits into from
Sep 14, 2021
Merged
Prev Previous commit
Next Next commit
modify note format for parallel.py
haohongxiang committed Sep 2, 2021
commit c8436e842c73b50459452556a4dbde4734ebcf5d
4 changes: 2 additions & 2 deletions python/paddle/fluid/dygraph/parallel.py
Original file line number Diff line number Diff line change
@@ -474,7 +474,7 @@ def train():
# 2. start by ``paddle.distributed.launch``
# train()

**Note**:
.. note::
``PyLayer`` is not supported in DataParallel. To solve problems of this kind,
it's recommended to skip gradient synchronization among multiple cards by 'no_sync',
and manually implement 'all_reduce' before model optimization. There is an example
@@ -568,7 +568,7 @@ def forward(self, inputs):

opt.step()
opt.clear_grad()

"""

def __init__(self,