CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add mock shape analysis #59032
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
Add mock shape analysis #59032
Conversation
paddle/cinn/hlir/dialect/operator/transforms/cinn_group_lowering_pass.cc
Outdated
Show resolved
Hide resolved
@@ -67,7 +67,9 @@ ShapeConstraintIRAnalysis::ShapeConstraintIRAnalysis(ModuleOp m) | |||
} | |||
} | |||
|
|||
ShapeConstraintIRAnalysis::~ShapeConstraintIRAnalysis() { mgr_.Save(); } | |||
ShapeConstraintIRAnalysis::~ShapeConstraintIRAnalysis() { | |||
// mgr_.Save(); |
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.
这个 mgr_.save() 现在 uncomment 还是会挂吗
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.
用mock的方式析构的时候还是会挂
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.
单例的pr不是已经合入了吗,为什么还在用mock的方式做?
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.
这里的Mock接口主要是管理SymbolicDim
的存放位置,临时绕开TieShapeOp
插入Program遇到的解析问题。
单例的PR是解决了ShapeAnalysis
放在哪里的问题,两个PR间互相没有影响,TieShape
的问题解决后直接替换这里的Mock对象即可。
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.
LGTM
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.
LGTM
} | ||
|
||
} // namespace ir | ||
} // namespace dialect | ||
} // namespace cinn | ||
|
||
REGISTER_IR_PASS(cinn_group_lowering, CinnGroupLoweringPass); | ||
// REGISTER_IR_PASS(cinn_group_lowering, CinnGroupLoweringPass); |
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.
REGISTER_IR_PASS
要求注册的CreatePass
函数输入参数为空,但由于CreateCinnGroupLoweringPass
函数增加了shape_analysis
参数,所以不能通过REGISTER_IR_PASS
注册了。
使用REGISTER_IR_PASS
注册 Pass 是为了在 Python 层通过 pass name 来管理 pass 的调用,对于CinnGroupLoweringPass
是和 CINN 强绑定的,目前来看不需要在 Python 层来管理该 Pass 的调用,所以这里去掉了 Pass 的注册。
PR types
Others
PR changes
Others
Description
Pcard-73448
添加 MockShapeAnalysis 用于动态shape编译流程执行验证