-
Notifications
You must be signed in to change notification settings - Fork 0
fix(simd): gate simd_avx512 tests behind target_feature = avx512f #134
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2619,7 +2619,7 @@ unsafe fn convert_f32_to_bf16_avx512f_rne(input: &[f32], output: &mut [u16]) { | |
| } | ||
| } | ||
|
|
||
| #[cfg(test)] | ||
| #[cfg(all(test, target_feature = "avx512f"))] | ||
| mod bf16_tests { | ||
| use super::*; | ||
|
|
||
|
|
@@ -3260,7 +3260,7 @@ pub fn f32_to_f16_batch_ieee754_rne(input: &[f32], output: &mut [u16]) { | |
| } | ||
| } | ||
|
|
||
| #[cfg(test)] | ||
| #[cfg(all(test, target_feature = "avx512f"))] | ||
| mod f16_tests { | ||
| use super::*; | ||
|
|
||
|
|
@@ -3351,7 +3351,7 @@ mod f16_tests { | |
| } | ||
| } | ||
|
|
||
| #[cfg(test)] | ||
| #[cfg(all(test, target_feature = "avx512f"))] | ||
| mod u8x64_rasterizer_tests { | ||
| use super::U8x64; | ||
|
|
||
|
|
@@ -3467,7 +3467,7 @@ mod u8x64_rasterizer_tests { | |
| } | ||
| } | ||
|
|
||
| #[cfg(test)] | ||
| #[cfg(all(test, target_feature = "avx512f"))] | ||
| mod tier3_tests { | ||
| use super::{U8x64, U16x32}; | ||
|
|
||
|
|
@@ -3590,7 +3590,7 @@ mod tier3_tests { | |
| // whichever path the linker selected. | ||
| // ──────────────────────────────────────────────────────────────────────── | ||
|
|
||
| #[cfg(test)] | ||
| #[cfg(all(test, target_feature = "avx512f"))] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Gating Useful? React with 👍 / 👎. |
||
| mod int_simd_tests { | ||
| use crate::simd::{I8x32, I8x64, I16x16, I16x32}; | ||
|
|
||
|
|
||
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.
This
cfggate now compiles out the entirebf16_testsmodule unless AVX-512 is enabled at compile time, but that module contains scalar and runtime-dispatched checks (for examplescalar_roundtripandbatch_conversion_matches_scalar) that should still run on non-AVX-512 hosts. In normalcargo testruns (without-C target-feature=+avx512f), these core conversion tests disappear, so CI no longer validates BF16/F16 correctness on the default x86_64 path.Useful? React with 👍 / 👎.