-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Use an explicit x86-64 cpu in tests that are sensitive to it #124597
Conversation
There are a few tests that depend on some target features **not** being enabled by default, and usually they are correct with the default x86-64 target CPU. However, in downstream builds we have modified the default to fit our distros -- `x86-64-v2` in RHEL 9 and `x86-64-v3` in RHEL 10 -- and the latter especially trips tests that expect not to have AVX. These cases are few enough that we can just set them back explicitly.
r? @davidtwco rustbot has assigned @davidtwco. Use |
tests/ui/sse2.rs
Outdated
assert!(cfg!(not(target_feature = "avx512f")), | ||
"AVX512 shouldn't be detected as available by default on any platform"); |
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.
hmm, if we add a v4 platform this is not the case... why not name a really outlandish target feature, like "avx512vp2intersect"
? it is now fully deprecated in Intel CPUs, i.e. none of their newer SKUs support them, no matter what segment, so we can expect it to never make it into a platform default. ever.
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.
Sure, although I wonder, does this need to be a real feature at all? This test runs on non-x86 targets too, and it seems not to mind if I put something like "ferris_wheel"
in there either.
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.
I put in my silly one, but I can switch to your deprecated feature if preferred for some reason.
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.
No that's great. :3
Oh, I don't think RHEL shouldn't upstream it, I just felt the patch may not survive someone "tidying up" and a reviewer not looking too closely at the blame, unless it explained itself~ @bors r+ rollup |
…llaumeGomez Rollup of 3 pull requests Successful merges: - rust-lang#124568 (Adjust `#[macro_export]`/doctest help suggestion for non_local_defs lint) - rust-lang#124582 (always print nice 'std not found' error when std is not found) - rust-lang#124597 (Use an explicit x86-64 cpu in tests that are sensitive to it) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124597 - cuviper:x86-64-v3, r=workingjubilee Use an explicit x86-64 cpu in tests that are sensitive to it There are a few tests that depend on some target features **not** being enabled by default, and usually they are correct with the default x86-64 target CPU. However, in downstream builds we have modified the default to fit our distros -- `x86-64-v2` in RHEL 9 and `x86-64-v3` in RHEL 10 -- and the latter especially trips tests that expect not to have AVX. These cases are few enough that we can just set them back explicitly.
There are a few tests that depend on some target features not being
enabled by default, and usually they are correct with the default x86-64
target CPU. However, in downstream builds we have modified the default
to fit our distros --
x86-64-v2
in RHEL 9 andx86-64-v3
in RHEL 10-- and the latter especially trips tests that expect not to have AVX.
These cases are few enough that we can just set them back explicitly.