Use full LTO for all builds#343
Merged
mdboom merged 1 commit intofaster-cpython:mainfrom Jan 13, 2025
Fidget-Spinner:full_lto
Merged
Use full LTO for all builds#343mdboom merged 1 commit intofaster-cpython:mainfrom Fidget-Spinner:full_lto
mdboom merged 1 commit intofaster-cpython:mainfrom
Fidget-Spinner:full_lto
Conversation
Fidget-Spinner
commented
Jan 12, 2025
| run: | | ||
| cd cpython | ||
| ./configure ${{ inputs.pgo == true && '--enable-optimizations --with-lto=yes' || '' }} ${{ inputs.tier2 == true && '--enable-experimental-jit=interpreter' || '' }} ${{ inputs.jit == true && '--enable-experimental-jit=yes' || '' }} ${{ inputs.nogil == true && '--disable-gil' || '' }} | ||
| ./configure ${{ inputs.pgo == true && '--enable-optimizations --with-lto=full' || '' }} ${{ inputs.tier2 == true && '--enable-experimental-jit=interpreter' || '' }} ${{ inputs.jit == true && '--enable-experimental-jit=yes' || '' }} ${{ inputs.nogil == true && '--disable-gil' || '' }} |
Contributor
Author
There was a problem hiding this comment.
This is a bit tricky. Apple Clang defaults to ThinLTO on recent versions as well. So after this commit, we would need to be careful when benchmarking and make sure it's comparing to a recent CPython commit (and not an old one prior to this commit).
I'm still in favour of this change anyways, because full LTO produces more reproducible benchmarking results, based on our experience in python/cpython#122580
Contributor
|
We can merge this and then re-run all of the baselines (3.10, 3.11, 3.13) on macOS, and then backfill all of the comparisons. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #342
GCC defaults to full LTO with
--with-lto=yespassed. Clang defaults to ThinLTO with--with-lto=yespassed. You need--with-lto=fullto enable full LTO.