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

move trunc_op's infer shape to phi #39772

Merged
merged 3 commits into from
Feb 23, 2022

Conversation

betterpig
Copy link
Contributor

@betterpig betterpig commented Feb 21, 2022

PR types

Others

PR changes

Others

Describe

move trunc_op's infere shape to phi. op's move see here

@betterpig betterpig changed the title move trunc_op's infere shape move trunc_op's infere shape to phi Feb 22, 2022
@@ -538,6 +538,16 @@ void TraceInferMeta(
out->set_dims(phi::make_ddim(sizes));
}

void TruncInferMeta(const MetaTensor& x, MetaTensor* out) {
Copy link
Contributor

Choose a reason for hiding this comment

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

这个InferMeta看起来比较简单,感觉可以复用已有的UnchangedInferMeta

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已改成复用。

#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/framework/operator.h"
#include "paddle/fluid/framework/op_version_registry.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

这个头文件有用到吗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

没有,已删除。

@YuanRisheng YuanRisheng merged commit 95280a3 into PaddlePaddle:develop Feb 23, 2022
@betterpig betterpig changed the title move trunc_op's infere shape to phi move trunc_op's infer shape to phi Apr 8, 2022
@betterpig betterpig deleted the move_infer branch June 8, 2022 06:26
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.

2 participants