-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[PTen]Remove infershape of Reshape OP #39631
Conversation
Thanks for your contribution! |
@@ -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); |
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.
有个SelectKernelMap接口是不是可以直接用
@@ -145,6 +145,7 @@ | |||
output : Tensor | |||
infer_meta : | |||
func : ReshapeInferMeta | |||
param : [x, shape] |
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/pten/common/scalar_array.h
Outdated
|
||
void setInitByTensor(bool val) { is_init_by_tensor_ = val; } | ||
void SetInitFromTensor(bool val) { is_from_tensor_ = val; } |
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.
是不直接叫SetFromTensor
就行了?
PR types
Others
PR changes
OPs
Describe
移除Reshape的前向infershape并确保兼容.