-
Notifications
You must be signed in to change notification settings - Fork 5.7k
p_norm transfer to phi kernels #40819
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个benchmark脚本有添加吗
paddle/phi/infermeta/backward.cc
Outdated
@@ -220,6 +220,18 @@ void ScatterGradInferMeta(const MetaTensor& index, | |||
} | |||
} | |||
|
|||
void PNormGradInferMeta(const MetaTensor& x, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里也不需要包这一层,注册InferShapeFunctor的时候直接用GeneralUnaryGradInferMeta就行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
paddle/phi/infermeta/unary.h
Outdated
@@ -66,6 +66,14 @@ void CumsumInferMeta(const MetaTensor& x, | |||
bool reverse, | |||
MetaTensor* out); | |||
|
|||
void PNormInferMeta(const MetaTensor& x, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InferMeta函数按照字母序放置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
paddle/phi/infermeta/unary.cc
Outdated
@@ -190,6 +190,63 @@ void CumsumInferMeta(const MetaTensor& x, | |||
out->share_lod(x); | |||
} | |||
|
|||
void PNormInferMeta(const MetaTensor& x, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InferMeta函数按照字母序放置
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
这个op在normalize中使用,有benchmark脚本 |
PR types
Function optimization
PR changes
OPs
Describe
p_norm transfer to phi kernels