-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add InferSymbolicShape for pd_op.mean #63231
base: develop
Are you sure you want to change the base?
add InferSymbolicShape for pd_op.mean #63231
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
f956bdc
to
9d300ee
Compare
Signed-off-by: ZelinMa557 <3388706467@qq.com>
9d300ee
to
cb9c4d3
Compare
- op : reduce_mean | ||
args : (Tensor x, int64_t[] dim, bool keep_dim) | ||
output : Tensor(out) | ||
infer_meta : | ||
func : ReduceInferMeta | ||
kernel : | ||
func : frobenius_norm | ||
interfaces : paddle::dialect::InferSymbolicShapeInterface | ||
|
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.
mean算子进入CINN前会拆分成 sum 和 divide 等算子,不会直接进入到CINN,所以这里可以不加reduce_mean
的定义
@@ -799,6 +827,7 @@ pir::RewritePatternSet PdOpToCinnOpPass::InitializePatterns( | |||
ps.Add<ScaleOpPattern>( | |||
context); // NOTE, scale op pattern should before AddBroadcastTo | |||
ps.Add(paddle::drr::Create<SumOpPattern>(context)); | |||
ps.Add(paddle::drr::Create<MeanOpPattern>(context)); |
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.
同上
bool ReduceMeanOpInferSymbolicShape( | ||
pir::Operation *op, pir::ShapeConstraintIRAnalysis *shape_analysis) { | ||
return ReduceInferSymbolicShape(op, shape_analysis); | ||
} |
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.
同上
Sorry to inform you that cb9c4d3's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
|
PR Category
Others
PR Types
Others
Description