Conversation
| 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.
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? |
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). |
|
Is there a way to manually set uv to prefer v2 or v3 builds? And then this could be documented as a non-default performance enhancement. |
|
I might finish this up, it looks straightforward to detect this with https://doc.rust-lang.org/std/macro.is_x86_feature_detected.html. |
|
(I didn't mean to close it, accidental click.) |
|
Taking this up in #9781 |
…tion sets (#9781) Supersedes #8517 with an alternative approach of making all the variants available instead of replacing the x86_64 (v1) variant with x86_64_v2. Doesn't add automatic inference of the supported instructions, but that should be doable per @charliermarsh's comment there. Going to do it as a follow-up since this has been pretty time consuming. e.g., ``` ❯ cargo run -q -- python install cpython-3.12.8-linux-x86_64_v3-gnu Installed Python 3.12.8 in 2.72s + cpython-3.12.8-linux-x86_64_v3-gnu ``` Co-authored-by: j178 <[email protected]>
Summary
Resolves #8499