-
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
[Phi] Migrate InferShape of multiplex, qr, tril_triu #40102
[Phi] Migrate InferShape of multiplex, qr, tril_triu #40102
Conversation
Thanks for your contribution! |
Sorry to inform you that d04b195's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
c33adf0
to
279a462
Compare
279a462
to
0f367d8
Compare
fedf56c
to
0b9aa7c
Compare
paddle/phi/infermeta/multiary.cc
Outdated
phi::errors::PreconditionNotMet( | ||
"All the candidate tensors must have the same size.")); | ||
} | ||
out->set_dims(in_dim); |
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.
out还需要set_dtype
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.
thx, done
paddle/phi/infermeta/multiary.h
Outdated
@@ -104,6 +104,9 @@ void BatchNormInferInferMeta(const MetaTensor& x, | |||
MetaTensor* mean_out, | |||
MetaTensor* variance_out, | |||
MetaConfig config = MetaConfig()); | |||
void MultiplexInferMeta(const std::vector<MetaTensor*>& ins, |
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.
thx, done
paddle/phi/infermeta/unary.h
Outdated
@@ -81,6 +81,16 @@ void EighInferMeta(const MetaTensor& x, | |||
MetaTensor* out_w, | |||
MetaTensor* out_v); | |||
|
|||
void TrilTriuInferMeta(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.
按字母序排列放置
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.
thx, done
paddle/phi/infermeta/unary.cc
Outdated
void TrilTriuInferMeta(const MetaTensor& x, | ||
int diagonal, | ||
bool lower, | ||
MetaTensor* out) { | ||
const auto& x_dims = x.dims(); | ||
PADDLE_ENFORCE_GE(x_dims.size(), | ||
2, | ||
phi::errors::InvalidArgument( | ||
"Input(X)'s rank must be at least 2 in TrilTriuOp.")); | ||
out->set_dims(x.dims()); | ||
out->share_lod(x); | ||
out->set_dtype(x.dtype()); | ||
} | ||
|
||
void QrInferMeta(const MetaTensor& x, | ||
const std::string& mode, |
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.
thx, done
@@ -1112,6 +1113,44 @@ void RealAndImagInferMeta(const MetaTensor& x, MetaTensor* out) { | |||
out->set_layout(x.layout()); | |||
} | |||
|
|||
void QrInferMeta(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.
QrInferMeta应该是在RealAndImagInferMeta前面
@@ -1769,6 +1808,20 @@ void UnbindInferMeta(const MetaTensor& x, | |||
} | |||
} | |||
|
|||
void TrilTriuInferMeta(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.
TrilTriuInferMeta按字母序也需要放在前面
PR types
Others
PR changes
Others
Describe
This pr migrates InferShape of multiplex, qr, tril_triu op to phi.