-
Notifications
You must be signed in to change notification settings - Fork 739
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
Prefer x86_64_v2
Python builds
#8517
base: main
Are you sure you want to change the base?
Conversation
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.
Thank you!
return (flavor_priority, build_option_priority) | ||
return (arch_priority, flavor_priority, build_option_priority) | ||
|
||
def _arch_priority(self, arch: Arch) -> int: |
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.
Nit: This can be a method on Arch
I check that the versions uv uses all run on my machine. CC @zanieb for the changes in the generator script. |
Can we use these unconditionally? Don't we need to check if the system supports the v2 instruction set before selecting these distributions? |
According to https://gregoryszorc.com/docs/python-build-standalone/main/running.html:
Requiring at least a cpu from 2008 is safe enough. I'd like to add cpu feature detection on top of that (e.g. avx2 for x86_64_v3), but this change in itself is a good idea. |
I think we should probably retain the Also, this is a breaking change; although it may not be likely. We might want to roll it into 0.5.0. |
I'm not particularly enthused about defaulting to the v2 builds without checking the CPU features, especially since we need to do so anyway in the future. But I feel less strongly about that as long as there's a path towards recovering the existing behavior. |
Are there any benchmarks that show whether / how much CPython is faster with these extra instructions? Might by interesting to run the pyperformance test suite (which is what faster CPython team uses for benchmarking). |
Summary
Resolves #8499