Skip to content

Conversation

@FeixLiu
Copy link
Contributor

@FeixLiu FeixLiu commented Oct 11, 2021

PR types

Bug fixes

PR changes

Others

Describe

fix_dp_grad_merge_with_grad_clip_by_global_norm

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@FeixLiu FeixLiu changed the title fix_dp_grad_merge_with_grad_clip_by_global_norm [bug fix] Fix program where dp grad merge not compatible with ClipGradientByGlobalNorm function Oct 11, 2021
@FeixLiu FeixLiu changed the title [bug fix] Fix program where dp grad merge not compatible with ClipGradientByGlobalNorm function [bug fix] Fix problem where dp grad merge not compatible with ClipGradientByGlobalNorm function Oct 11, 2021
Copy link
Contributor

@wangxicoding wangxicoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# We need to handle the correct block, otherwise will encounter
# a 'NotFoundError' during compile time.
block = default_main_program().current_block()
block.append_op(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看下g.block可行否

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可行,但考虑到未来存在更新g.block的可能性,使用current_block是最保险的。

@wangxicoding wangxicoding merged commit 1026052 into PaddlePaddle:develop Oct 11, 2021
@FeixLiu FeixLiu deleted the fix_dp_grad_merge_with_grad_clip_by_global_norm branch October 11, 2021 11:02
FeixLiu added a commit to FeixLiu/Paddle that referenced this pull request Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants