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

[Dygraph] Tensor Parallelism improve & accuracy alignment #33015

Merged

Conversation

JZ-LIANG
Copy link
Contributor

@JZ-LIANG JZ-LIANG commented May 20, 2021

PR types

Bug fixes

PR changes

OPs

Describe

  1. bugfix: add "is_distributed" attribute to splited bias tensor
  2. performance improvement: tensor split c_identity op support FP16 (add to gray list)
    in the env: 4 x V100, Ernie-base, bsz=64, speed improve 11.6%
Ernie-base token/s
mp4-before pr 28491
mp4-after pr 31790

@paddle-bot-old
Copy link

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

sandyhouse
sandyhouse previously approved these changes May 20, 2021
Copy link

@sandyhouse sandyhouse left a comment

Choose a reason for hiding this comment

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

LGTM

@JZ-LIANG JZ-LIANG changed the title Hybrid parallelism/split fix bug [Tensor Parallelism] split fix bug May 20, 2021
wangxicoding
wangxicoding previously approved these changes May 21, 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

@@ -1008,6 +1008,10 @@ def _parallel_linear(x,
main_block = paddle.static.default_main_program().global_block()
startup_block.vars[linear.weight.name].is_distributed = True
main_block.vars[linear.weight.name].is_distributed = True
# set is_distributed for splited bias
Copy link
Contributor

Choose a reason for hiding this comment

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

API文档可以补清楚一些,axis=0以及axis=1时的切法。注释也可以再描述清楚一点,为何column切分时bias也需要切分。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done~

wangxicoding
wangxicoding previously approved these changes May 24, 2021
sandyhouse
sandyhouse previously approved these changes May 25, 2021
Copy link

@sandyhouse sandyhouse left a comment

Choose a reason for hiding this comment

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

LGTM

@JZ-LIANG JZ-LIANG force-pushed the hybrid_parallelism/split_fix_bug branch from 0eef9e0 to ffe8017 Compare May 25, 2021 06:33
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

@wangxicoding wangxicoding merged commit 20b9be6 into PaddlePaddle:develop May 26, 2021
wangxicoding pushed a commit to wangxicoding/Paddle that referenced this pull request Dec 9, 2021
@JZ-LIANG JZ-LIANG changed the title [Tensor Parallelism] split fix bug [Dygraph] Tensor Parallelism improve & accuracy alignment Jun 25, 2024
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.

3 participants