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

[PIR]add build cinn pass constrain #59759

Merged

Conversation

phlrain
Copy link
Collaborator

@phlrain phlrain commented Dec 6, 2023

PR types

Bug fixes

PR changes

Others

Description

添加build cinn pass的检查,对于cinn不支持的算子,不做映射

Pcard-67164

Copy link

paddle-bot bot commented Dec 6, 2023

你的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.

Copy link

paddle-bot bot commented Dec 6, 2023

❌ The PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

@phlrain phlrain changed the title add build cinn pass constrain [PIR]add build cinn pass constrain Dec 7, 2023
out.first_use().owner()->isa<paddle::dialect::UniformOp>()) {
return true;
if (out.use_count() > 0) {
return !IsSupportCinn(out.first_use().owner());
Copy link
Contributor

Choose a reason for hiding this comment

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

这个意味着 Full 的输出如果传递给了一个CINN不支持的算子,则full本身单算子不会交给CINN来生成kernel?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

是的, 这个逻辑后面会跟build cinn pass 统一优化下

@@ -162,6 +204,9 @@ bool IsSupportCinn(pir::Operation* op) {

// Strip the dialect, like pd_op.abs -> abs
const auto op_name = CompatibleInfo::OpName(*op);
if (op_name == "matmul") {
Copy link
Contributor

Choose a reason for hiding this comment

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

类似这样的名单更推荐添加到 line 110行中的 OpTransInfo.default_deny_ops_里,统一管理

@phlrain phlrain merged commit b3a766f into PaddlePaddle:develop Dec 8, 2023
28 of 29 checks passed
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.

None yet

2 participants