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

[CINN] Re-Implement operator = for two Expr Tree #55145

Merged
merged 3 commits into from
Jul 6, 2023

Conversation

Courtesy-Xs
Copy link
Contributor

@Courtesy-Xs Courtesy-Xs commented Jul 5, 2023

PR types

Performance optimization

PR changes

Others

Description

Former implementation is to transform two AST tree as two string and compare their equivalence and it is cost-time, now we compare them by doing dfs traversal on both two tree。
Compared two implementation, the latter can get approximately 10% performance profit on batchnorm operator on function complieGraph in CINN。

compilerGraph cost time

dev optim ratio
1.48086 1.34312 10.25%

Pcard-72718

@paddle-bot
Copy link

paddle-bot bot commented Jul 5, 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.

@Courtesy-Xs Courtesy-Xs changed the title Re-Implement operator = for two Expr Tree [CINN] Re-Implement operator = for two Expr Tree Jul 5, 2023
Copy link
Contributor

@JamesLim-sy JamesLim-sy left a comment

Choose a reason for hiding this comment

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

LGTM

@JamesLim-sy JamesLim-sy merged commit af58cc3 into PaddlePaddle:develop Jul 6, 2023
@Courtesy-Xs Courtesy-Xs deleted the cinn_llir_refact branch July 7, 2023 03:13
cqulilujia pushed a commit to cqulilujia/Paddle that referenced this pull request Jul 24, 2023
* optimize expr operator = implementation

* fix codestyle
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