Skip to content

renorm op #38130

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

Merged
merged 219 commits into from
Dec 24, 2021
Merged

renorm op #38130

merged 219 commits into from
Dec 24, 2021

Conversation

seemingwang
Copy link
Contributor

PR types

New features

PR changes

OPs

Describe

renorm op

@CLAassistant
Copy link

CLAassistant commented Dec 14, 2021

CLA assistant check
All committers have signed the CLA.

@paddle-bot-old
Copy link

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

Comment on lines 213 to 216
TensorReduceFunctorImpl<T, T, CustomSum>(pow_value, &dim_value, reduce_axis,
stream);
TensorReduceFunctorImpl<T, T, CustomSum>(mul_value, &weight_derivative,
reduce_axis, stream);
Copy link
Contributor

Choose a reason for hiding this comment

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

Recently, this PR add the transformop parameter in TensorReduceFunctorImpl, it's better to have the same modification.

UnsignedPowFunctor<MT, T>>(
cuda_ctx, ins, &outs, func);
std::vector<int> reduce_axis = {0, 2};
TensorReduceFunctorImpl<T, T, CustomSum>(pow_value, &dim_value, reduce_axis,
Copy link
Contributor

Choose a reason for hiding this comment

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

Recently, this PR add the transformop parameter in TensorReduceFunctorImpl, it's better to have the same modification.

@@ -1069,6 +1069,31 @@ def addmm(input, x, y, beta=1.0, alpha=1.0, name=None):
type="addmm", inputs=inputs, attrs=attrs, outputs={"Out": out})
return out

def renorm(input, p, dim, max_norm):
Copy link
Contributor

Choose a reason for hiding this comment

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

parameter "input" should be "x" like other Python API and "dim" should be "axis"

jzhang533
jzhang533 previously approved these changes Dec 23, 2021
Copy link
Contributor

@jzhang533 jzhang533 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

@jeff41404 jeff41404 left a comment

Choose a reason for hiding this comment

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

LGTM

@seemingwang seemingwang merged commit 6982871 into PaddlePaddle:develop Dec 24, 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.