Skip to content

Conversation

@Aurelius84
Copy link
Contributor

@Aurelius84 Aurelius84 commented Apr 17, 2024

PR Category

CINN

PR Types

Not User Facing

Description

Pcard-67164

Program里的sym_expr_str里的符号信息现在没有友好地维护和更新,应该统一使用ShapeAnalysis里的符号作为FusionInfo的符号信息

@paddle-bot
Copy link

paddle-bot bot commented Apr 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.

@Aurelius84 Aurelius84 changed the title [PIR+CINN]Consider ShapeAnalysis SymDimExprs instead of sym_expr_str … [PIR+CINN]Consider ShapeAnalysis SymDimExprs instead of sym_expr_str attribute as Hash element Apr 17, 2024
void FusionOpAnalysis::PreCompileGroup() {
// Make compilation into lazy mode while
// FLAGS_enable_cinn_compile_cache=false.
if (!FLAGS_enable_cinn_compile_cache) return;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

为什么要跳过这里?
之前设置FLAGS_enable_compile_cache=false依然可能有问题,是因为关闭缓存策略时,编译的操作也是在PreAnalysis阶段,但从PreAnanlysis阶段到FusionOpPattern里的JitKernel替换这中间(如Lowering等),虽然传递的是const OpLoweringGroupPtr&,但shared_ptr的-> 依然可以改变group的内在状态,导致后面从缓存Get时,计算出来的HashKey不一样,会报错,

Copy link
Contributor

@XieYunshen XieYunshen left a comment

Choose a reason for hiding this comment

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

LGTM

@Aurelius84 Aurelius84 merged commit 6c66abe into PaddlePaddle:develop Apr 19, 2024
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.

4 participants