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

Less aggressive inlining. #1857

Merged
merged 34 commits into from
Jul 19, 2024
Merged

Less aggressive inlining. #1857

merged 34 commits into from
Jul 19, 2024

Conversation

athas
Copy link
Member

@athas athas commented Jan 23, 2023

This commit is the beginning of reworking our inlining policy to be less aggressive. Currently it inlines all functions called from SOACs that involve arrays in any way. This is not quite enough: we also need to inline anything that contributes to irregularity.

Given our downstream compilation restrictions, inlining isn't just about performance - it is about whether we can compile at all.

On heston32, the impact of this is pretty promising. Pretty much unchanged performance, but more than 2x faster compilation.

This commit is the beginning of reworking our inlining policy to be
less aggressive.  Currently it inlines all functions called from SOACs
that involve arrays in any way.  This is not quite enough: we also
need to inline anything that contributes to irregularity.

Given our downstream compilation restrictions, inlining isn't just
about performance - it is about whether we can compile at all.

On heston32, the impact of this is pretty promising.  Pretty much
unchanged performance, but more than 2x faster compilation.
@athas athas marked this pull request as draft January 23, 2023 22:25
@athas
Copy link
Member Author

athas commented Jan 24, 2023

I've realised we will also need to augment the autotuner to be able to tune threshold parameters used in callees. This will require us to expose the call graph of the program in some machine-readable manner. I think the best place to do this is in the manifest.

@athas athas marked this pull request as ready for review January 24, 2023 21:50
@athas athas added the run-benchmarks Makes GA run the benchmark suite. label Jun 15, 2023
This is because constant code generated from functions is low-level
bookkeeping things, like the counter arrays used for GPU reductions.  These functions might then be used in the normal init code.
@athas athas merged commit 75b4c05 into master Jul 19, 2024
26 checks passed
@athas athas deleted the better-inlining branch July 19, 2024 17:38
@athas athas mentioned this pull request Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-benchmarks Makes GA run the benchmark suite.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant