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

[PTen]Remove infershape of Reshape OP #39631

Merged
merged 9 commits into from
Feb 21, 2022

Conversation

YuanRisheng
Copy link
Contributor

@YuanRisheng YuanRisheng commented Feb 16, 2022

PR types

Others

PR changes

OPs

Describe

移除Reshape的前向infershape并确保兼容.

@paddle-bot-old
Copy link

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

@YuanRisheng YuanRisheng changed the title [PTen]Remove infershape and Xshape of Reshape OP [PTen]Remove infershape of Reshape OP Feb 17, 2022
@@ -288,6 +294,15 @@ pten::InferMetaContext BuildInferMetaContext(InferShapeContext* ctx,
auto& attr_names = std::get<1>(signature.args);
auto& output_names = std::get<2>(signature.args);

auto kernels = pten::KernelFactory::Instance().kernels().find(signature.name);
Copy link
Contributor

Choose a reason for hiding this comment

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

有个SelectKernelMap接口是不是可以直接用

@@ -145,6 +145,7 @@
output : Tensor
infer_meta :
func : ReshapeInferMeta
param : [x, shape]
Copy link
Contributor

Choose a reason for hiding this comment

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

这个需要写吗


void setInitByTensor(bool val) { is_init_by_tensor_ = val; }
void SetInitFromTensor(bool val) { is_from_tensor_ = val; }
Copy link
Contributor

Choose a reason for hiding this comment

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

是不直接叫SetFromTensor就行了?

@YuanRisheng YuanRisheng merged commit 45dd4a5 into PaddlePaddle:develop Feb 21, 2022
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.

3 participants