-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
move trunc_op's infer shape to phi #39772
Conversation
95f9fc8
to
6282255
Compare
6282255
to
0eea241
Compare
paddle/phi/infermeta/unary.cc
Outdated
@@ -538,6 +538,16 @@ void TraceInferMeta( | |||
out->set_dims(phi::make_ddim(sizes)); | |||
} | |||
|
|||
void TruncInferMeta(const MetaTensor& x, MetaTensor* out) { |
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看起来比较简单,感觉可以复用已有的UnchangedInferMeta
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.
已改成复用。
paddle/fluid/operators/trunc_op.cc
Outdated
#include "paddle/fluid/framework/op_registry.h" | ||
#include "paddle/fluid/framework/operator.h" | ||
#include "paddle/fluid/framework/op_version_registry.h" |
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.
这个头文件有用到吗
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.
没有,已删除。
8a91c9b
to
886bd2b
Compare
PR types
Others
PR changes
Others
Describe
move trunc_op's infere shape to phi. op's move see here