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

p_norm transfer to phi kernels #40819

Merged
merged 1 commit into from
Mar 24, 2022
Merged

p_norm transfer to phi kernels #40819

merged 1 commit into from
Mar 24, 2022

Conversation

zhiboniu
Copy link
Contributor

@zhiboniu zhiboniu commented Mar 22, 2022

PR types

Function optimization

PR changes

OPs

Describe

p_norm transfer to phi kernels

paddle/phi/ops/compat/p_norm_sig.cc Outdated Show resolved Hide resolved
paddle/phi/infermeta/backward.cc Outdated Show resolved Hide resolved
paddle/phi/kernels/gpu/p_norm_grad_kernel.cu Outdated Show resolved Hide resolved
paddle/phi/kernels/gpu/p_norm_grad_kernel.cu Outdated Show resolved Hide resolved
paddle/phi/kernels/gpu/p_norm_kernel.cu Outdated Show resolved Hide resolved
paddle/phi/kernels/gpu/p_norm_kernel.cu Show resolved Hide resolved
paddle/phi/kernels/gpu/p_norm_kernel.cu Outdated Show resolved Hide resolved
Copy link
Contributor

@YuanRisheng YuanRisheng left a comment

Choose a reason for hiding this comment

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

这个benchmark脚本有添加吗

@@ -220,6 +220,18 @@ void ScatterGradInferMeta(const MetaTensor& index,
}
}

void PNormGradInferMeta(const MetaTensor& x,
Copy link
Contributor

Choose a reason for hiding this comment

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

这里也不需要包这一层,注册InferShapeFunctor的时候直接用GeneralUnaryGradInferMeta就行

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

@@ -66,6 +66,14 @@ void CumsumInferMeta(const MetaTensor& x,
bool reverse,
MetaTensor* out);

void PNormInferMeta(const MetaTensor& x,
Copy link
Contributor

Choose a reason for hiding this comment

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

InferMeta函数按照字母序放置

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

@@ -190,6 +190,63 @@ void CumsumInferMeta(const MetaTensor& x,
out->share_lod(x);
}

void PNormInferMeta(const MetaTensor& x,
Copy link
Contributor

Choose a reason for hiding this comment

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

InferMeta函数按照字母序放置

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

@zhiboniu
Copy link
Contributor Author

这个benchmark脚本有添加吗

这个op在normalize中使用,有benchmark脚本

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