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

GCC: inline limit #3841

Merged
merged 1 commit into from
Apr 1, 2024
Merged

Conversation

WeiqunZhang
Copy link
Member

By default, set GCC inline limit to a huge number (43210). GCC's default value is version dependent. It appears to be smaller than 2000 in recent versions. The motivation for setting this to a huge number is that GCC especially the recent versions (e.g., 12) no longer inline big lambda functions passed to ParallelFor, resulting in serious performance issues.

@zingale
Copy link
Member

zingale commented Mar 24, 2024

I tested this with Castro and GCC 13.2 and I didn't see any measureable performance difference.

@WeiqunZhang
Copy link
Member Author

The hotspot functions in Castro are perhaps already inlined. Or they are so expensive that the cost of not inlining does not matter.

@WeiqunZhang WeiqunZhang marked this pull request as draft March 29, 2024 04:16
By default, set GCC inline limit to a huge number (43210). GCC's default
value is version dependent. It appears to be smaller than 2000 in recent
versions. The motivation for setting this to a huge number is that GCC
especially the recent versions (e.g., 12) no longer inline big lambda
functions passed to ParallelFor, resulting in serious performance issues.
@WeiqunZhang WeiqunZhang marked this pull request as ready for review March 29, 2024 18:30
@WeiqunZhang WeiqunZhang requested a review from jmsexton03 March 29, 2024 18:30
@WeiqunZhang WeiqunZhang merged commit 728eec4 into AMReX-Codes:development Apr 1, 2024
68 of 69 checks passed
@WeiqunZhang WeiqunZhang deleted the gcc-inline-limit branch April 1, 2024 18:50
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.

3 participants