-
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
[CINN]delete redundant SetShapeOrDataForValue #64470
[CINN]delete redundant SetShapeOrDataForValue #64470
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
} | ||
|
||
if (VLOG_IS_ON(4)) { | ||
::std::cerr << ">>>>>>>>>>>>>>>>>>>> cinn_op.fusion(op_id: op_" |
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.
这个不像是error信息,对调试如果没有作用的话就去掉吧
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.
Done
paddle/cinn/common/broadcast_tree.cc
Outdated
return Pattern2Placement{{rhs, lhs}}; | ||
} | ||
if (lhs.isa<std::string>()) { | ||
if (GetSymbolSet(rhs).count(ToString(lhs)) != 0) { |
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.
这样对于 S0*S1*S2 <----> S0*S2
的情况是不是处理不了?
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.
这里我们只用保证uniform的符号不被替换就可以了
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/cinn/common/broadcast_tree.cc
Outdated
@@ -120,6 +120,12 @@ using Pattern2Placement = std::unordered_map<symbol::DimExpr, symbol::DimExpr>; | |||
Pattern2Placement ConstructCstrLhsEqRhsReplacement( | |||
const symbol::Broadcastable<symbol::DimExpr>& broadcastable_condition) { | |||
auto [lhs, rhs] = *broadcastable_condition; | |||
if (SubstituteDimExpr(rhs, Pattern2Placement{{rhs, lhs}}) != rhs) { |
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.
rhs != lhs的情况下,这个条件分支一定是true吧?
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.
已修复,上一个commit里发生了粘贴错误
* [CINN]delete redundant SetShapeOrDataForValue * update broadcast_tree Substitute policy * fix * fix
* [CINN]delete redundant SetShapeOrDataForValue * update broadcast_tree Substitute policy * fix * fix
PR Category
CINN
PR Types
Others
Description
Pcard-67164
This PR delete redundant SetShapeOrDataForValue.