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

sparse_momentum_op is used to save w@GRAD memory for gather_op #34942

Merged
merged 5 commits into from
Aug 27, 2021

Conversation

GuoxiaWang
Copy link
Contributor

PR types

New features

PR changes

OPs

Describe

sparse_momentum_op is used to save w@GRAD memory for gather_op when gather from a large parameter, e.g.

# for paddle.optimizer.Momentum
weight = paddle.static.create_parameter(
    shape=[512, 10000000],
    dtype='float32',
    name='large_fc_w',
    is_bias=False)
weight = paddle.gather(weight, index, axis=1)

@paddle-bot-old
Copy link

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

paddle/fluid/operators/optimizers/sparse_momentum_op.h Outdated Show resolved Hide resolved
paddle/fluid/operators/optimizers/sparse_momentum_op.h Outdated Show resolved Hide resolved
paddle/fluid/operators/optimizers/sparse_momentum_op.h Outdated Show resolved Hide resolved
paddle/fluid/operators/optimizers/sparse_momentum_op.h Outdated Show resolved Hide resolved
paddle/fluid/operators/optimizers/sparse_momentum_op.h Outdated Show resolved Hide resolved
paddle/fluid/operators/optimizers/sparse_momentum_op.h Outdated Show resolved Hide resolved
paddle/fluid/operators/optimizers/sparse_momentum_op.h Outdated Show resolved Hide resolved
paddle/fluid/operators/optimizers/sparse_momentum_op.h Outdated Show resolved Hide resolved
TCChenlong
TCChenlong previously approved these changes Aug 17, 2021
sandyhouse
sandyhouse previously approved these changes Aug 17, 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

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

Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM for op_function_generator.cc

@sandyhouse sandyhouse merged commit 234ce93 into PaddlePaddle:develop Aug 27, 2021
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.

5 participants