-
Notifications
You must be signed in to change notification settings - Fork 899
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
Detect x86_64 microarchitecture variant automatically #9788
base: main
Are you sure you want to change the base?
Conversation
if is_x86_feature_detected!("avx512f") | ||
&& is_x86_feature_detected!("avx512bw") | ||
&& is_x86_feature_detected!("avx512cd") | ||
&& is_x86_feature_detected!("avx512dq") | ||
&& is_x86_feature_detected!("avx512vl") |
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.
tbh no clue if we should check for all of these or not
e8ace72
to
359b5bb
Compare
While mostly I would want uv to automatically detect which microarchitecture variant to grab, I have a concern here related to docker images, specifically if uv is used to install Python in the dockerfile, what happens when the build machine and execution machine support different instruction sets? |
359b5bb
to
cd5f82c
Compare
I think it's fair to say the build machine will need to be on the same (or an older) microarchitecture than your execution machine. Do you think that's unreasonable? |
Only in the sense it's not something I have to think about right now, and without being familiar with this I'm not sure it would be easy to diagnose when a failure happened? |
Yeah the interpreter would probably just crash at runtime, or, if you use uv as your entry point, it would be "missing" |
Maybe this is already an issue with other tools that are installed into docker images, and it's not that common to face, and people who do face this problem are familiar with the symptom and cause. I just never thought about it before now. |
cd5f82c
to
c3ec284
Compare
c3ec284
to
d51e5d7
Compare
I don't think this is a common issue right now, and you raised a very valid concern. For pre-built binary artifacts, for example most Linux distros AFAIK use conservative microarchitecture and don't do any runtime detection. There has been some discussion about this in Fedora but the proposal to bump microarchutecture has been withdrawn? https://discussion.fedoraproject.org/t/will-future-releases-require-x86-64-v3/131200/6 |
e.g., on my test machine
Note this is split into two commits: