Skip to content

Conversation

@zhangboSJTU
Copy link
Contributor

PR types

Others

PR changes

Others

Description

Pcard-67164
Add some more symbolic shape infer funcs

@paddle-bot
Copy link

paddle-bot bot commented Jan 17, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@zhangboSJTU zhangboSJTU changed the title Add some more symbolic shape infer funcs [Dynamic shape] Add some more symbolic shape infer funcs Jan 18, 2024
Comment on lines +365 to +368
bool MultiplySrOpInferSymbolicShape(
pir::Operation *op, pir::ShapeConstraintIRAnalysis *shape_analysis) {
return InferSymbolicShapeElementWiseBinary(op, shape_analysis);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

SelectedRows的还需要支持吗?这类Tensor编译器应该也处理不了

Copy link
Contributor Author

@zhangboSJTU zhangboSJTU Jan 18, 2024

Choose a reason for hiding this comment

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

这个 PIR 相关代码解析 yaml 的时候、 CodeGen 的时候会自动生成、因此需要加上函数、其实现调用 DenseTensor 的即可

Copy link
Contributor

Choose a reason for hiding this comment

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

这个的维度信息和dense_tensor的可能还有差别,建议先直接报错吧


bool FullOpInferSymbolicShape(pir::Operation *op,
pir::ShapeConstraintIRAnalysis *shape_analysis) {
return true;
Copy link
Contributor

Choose a reason for hiding this comment

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

这里面可以加一些TODO和高级别的LOG,实现的时候也好找

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个在PASS 循环里会有 LOG、相关的推导正在补全中、为了防止冲突 、我先把本地代码 push 上去

@zhangboSJTU zhangboSJTU requested a review from zyfncg January 18, 2024 09:26
@zhangboSJTU zhangboSJTU merged commit c0f85ba into PaddlePaddle:develop Jan 19, 2024
@zhangboSJTU zhangboSJTU deleted the add_sym_infer branch January 19, 2024 02:54
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