-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-141808: Don't remove the JIT stencils when building with PGO #141809
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
Conversation
|
I opened this as a draft, because keeping the files from being deleted when |
Misc/NEWS.d/next/Build/2025-11-20-23-15-39.gh-issue-141808.NEewZC.rst
Outdated
Show resolved
Hide resolved
…8.NEewZC.rst Co-authored-by: Mikhail Efimov <[email protected]>
|
My understanding of So I would suggest making a new target |
|
However, when the stencils are removed in make clean, they are apparently also removed during the pgo task that calls it. I have not yet figured out why and where make clean is called. |
|
Ah: Lines 838 to 841 in bc9e63d
So the problem with my approach is that by dropping in the prebuilt stencils before this runs, they are deleted here. That's probably only problematic for my use case :/ |
This allows us not to call make clean from the PGO task.
|
So, I modified the behavior to keep removing the stencils with |
efimov-mikhail
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I can confirm that issue with double generation of JIT stencils for PGO build is fixed.
And Makefile.pre.in changes looks clean for me.
I also confirm that the change works as expected. I built Python with the JIT and PGO using commands: Currently, I see the command twice in
With this PR, I only see the command once. |
vstinner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Merged, thanks! The question is now if this change should be backported to 3.13 and 3.14 branches. Other branches are also affected by the issue, no? What do you think? |
|
I would say yes to backport, as this is a build change and more a fix for specific needs than a new feature. Pinging RM @hugovk |
The other branches have the rm without the asterisk: Line 3225 in 04ecff5
So technically, I am not even sure this is needed. I do not need a backport of this for Fedora. |
At least, I can say that |
|
It runs twice but should only actually build the stencils once, due to the digest-match check. |
Yep, looks like a backportable bug fix to me. |
|
Sorry, @hroncok and @vstinner, I could not cleanly backport this to |
See https://discuss.python.org/t/building-the-jit-with-pre-built-stencils/91838/12