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] Adjust tile config parameters based on model benchmarks #69363

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

lshpku
Copy link
Contributor

@lshpku lshpku commented Nov 13, 2024

PR Category

CINN

PR Types

Performance

Description

Adjust two key parameters in TileConfig based on recent end-to-end model benchmark results.

Change 1:
Add one more condition for using WarpReduce. This improves performance for huge-S-small-R cases, such as:

reduce(shape=[128, 197, 768] axis=2)
reduce(shape=[32, 512, 56, 56], axis=(2, 3))

Change 2:
Set tighter limit on spatial inner loop number (from 32 to 4). This prevents performance degradation in Transpose and certain element-wise operations.
Note: this change doesn't imply that 32 is inherently a worse choice than 4; rather, it is due to the lack of support for scheduling Transpose, and 4 is currently the optimal choice for nvcc to do just acceptable optimization.

Pcard-85711

Copy link

paddle-bot bot commented Nov 13, 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.

@lshpku lshpku force-pushed the adjust-tile-config-parameters branch from d75aef7 to 1912feb Compare November 14, 2024 08:44
@lshpku lshpku force-pushed the adjust-tile-config-parameters branch from 1912feb to 127b515 Compare November 14, 2024 17:26
@phlrain phlrain self-requested a review November 15, 2024 02:04
@phlrain phlrain merged commit e5a5899 into PaddlePaddle:develop Nov 15, 2024
27 of 28 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.

2 participants