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

fix bugs: output of splited fc is wrong #38724

Merged
merged 1 commit into from
Jan 6, 2022
Merged

fix bugs: output of splited fc is wrong #38724

merged 1 commit into from
Jan 6, 2022

Conversation

sljlp
Copy link
Contributor

@sljlp sljlp commented Jan 5, 2022

PR types

Bug fixes

PR changes

APIs

Describe

在distributed.collective._parallel_linear 中
c_concat 的没有加入rank参数,导致反向时调用c_split时不能判断当前rank
因此总是按照rank默认值(0)输出,导致结果不正确

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jan 5, 2022

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

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

@@ -1219,6 +1219,7 @@ def _parallel_linear(x,
inputs={'X': linear_out},
outputs={'Out': out},
attrs={
'rank': inner_rank,
Copy link
Contributor

Choose a reason for hiding this comment

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

之后在c++端给c_concat的rank参数默认设为-1,这样在c++端就可以立马检测出python端没有设置rank了

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

@wangxicoding wangxicoding merged commit 35213c6 into PaddlePaddle:develop Jan 6, 2022
@sljlp sljlp deleted the fix_dist_parallel_linear branch January 26, 2022 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants