Add Icelake avx512 features (#838)
* Add Icelake avx512 features As documented in https://software.intel.com/sites/default/files/managed/c5/15//architecture-instruction-set-extensions-programming-reference.pdf * Sort the avx512 feature checks by bit * Unbreak macos Force nightly.
This commit is contained in:
parent
c8c587d0cd
commit
1601ce4f2f
6 changed files with 80 additions and 1 deletions
6
library/stdarch/.github/workflows/main.yml
vendored
6
library/stdarch/.github/workflows/main.yml
vendored
|
|
@ -173,8 +173,12 @@ jobs:
|
|||
run: |
|
||||
curl https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
|
||||
echo "##[add-path]$HOME/.cargo/bin"
|
||||
rustup update nightly --no-self-update
|
||||
rustup default nightly
|
||||
if: matrix.os == 'macos-latest'
|
||||
- run: rustup target add ${{ matrix.target }}
|
||||
- run: |
|
||||
rustup default nightly
|
||||
rustup target add ${{ matrix.target }}
|
||||
if: "!endsWith(matrix.target, 'emulated')"
|
||||
- run: cargo generate-lockfile
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,23 @@ fn x86_all() {
|
|||
"avx512_vpopcntdq {:?}",
|
||||
is_x86_feature_detected!("avx512vpopcntdq")
|
||||
);
|
||||
println!("avx512vbmi2 {:?}", is_x86_feature_detected!("avx512vbmi2"));
|
||||
println!("avx512gfni {:?}", is_x86_feature_detected!("avx512gfni"));
|
||||
println!("avx512vaes {:?}", is_x86_feature_detected!("avx512vaes"));
|
||||
println!(
|
||||
"avx512vpclmulqdq {:?}",
|
||||
is_x86_feature_detected!("avx512vpclmulqdq")
|
||||
);
|
||||
println!("avx512vnni {:?}", is_x86_feature_detected!("avx512vnni"));
|
||||
println!(
|
||||
"avx512bitalg {:?}",
|
||||
is_x86_feature_detected!("avx512bitalg")
|
||||
);
|
||||
println!("avx512bf16 {:?}", is_x86_feature_detected!("avx512bf16"));
|
||||
println!(
|
||||
"avx512vp2intersect {:?}",
|
||||
is_x86_feature_detected!("avx512vp2intersect")
|
||||
);
|
||||
println!("f16c: {:?}", is_x86_feature_detected!("f16c"));
|
||||
println!("fma: {:?}", is_x86_feature_detected!("fma"));
|
||||
println!("abm: {:?}", is_x86_feature_detected!("abm"));
|
||||
|
|
|
|||
|
|
@ -135,6 +135,22 @@ features! {
|
|||
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vpopcntdq: "avx512vpopcntdq";
|
||||
/// AVX-512 VPOPCNTDQ (Vector Population Count Doubleword and
|
||||
/// Quadword)
|
||||
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vbmi2: "avx512vbmi2";
|
||||
/// AVX-512 VBMI2 (Additional byte, word, dword and qword capabilities)
|
||||
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512gfni: "avx512gfni";
|
||||
/// AVX-512 GFNI (Galois Field New Instruction)
|
||||
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vaes: "avx512vaes";
|
||||
/// AVX-512 VAES (Vector AES instruction)
|
||||
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vpclmulqdq: "avx512vpclmulqdq";
|
||||
/// AVX-512 VPCLMULQDQ (Vector PCLMULQDQ instructions)
|
||||
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vnni: "avx512vnni";
|
||||
/// AVX-512 VNNI (Vector Neural Network Instructions)
|
||||
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512bitalg: "avx512bitalg";
|
||||
/// AVX-512 BITALG (Support for VPOPCNT[B,W] and VPSHUFBITQMB)
|
||||
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512bf16: "avx512bf16";
|
||||
/// AVX-512 BF16 (BFLOAT16 instructions)
|
||||
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] avx512vp2intersect: "avx512vp2intersect";
|
||||
/// AVX-512 P2INTERSECT
|
||||
@FEATURE: #[unstable(feature = "stdsimd", issue = "27731")] f16c: "f16c";
|
||||
/// F16C (Conversions between IEEE-754 `binary16` and `binary32` formats)
|
||||
@FEATURE: #[stable(feature = "simd_x86", since = "1.27.0")] fma: "fma";
|
||||
|
|
|
|||
|
|
@ -209,6 +209,14 @@ pub(crate) fn detect_features() -> cache::Initializer {
|
|||
enable(extended_features_ebx, 30, Feature::avx512bw);
|
||||
enable(extended_features_ebx, 31, Feature::avx512vl);
|
||||
enable(extended_features_ecx, 1, Feature::avx512vbmi);
|
||||
enable(extended_features_ecx, 5, Feature::avx512bf16);
|
||||
enable(extended_features_ecx, 6, Feature::avx512vbmi2);
|
||||
enable(extended_features_ecx, 8, Feature::avx512gfni);
|
||||
enable(extended_features_ecx, 8, Feature::avx512vp2intersect);
|
||||
enable(extended_features_ecx, 9, Feature::avx512vaes);
|
||||
enable(extended_features_ecx, 10, Feature::avx512vpclmulqdq);
|
||||
enable(extended_features_ecx, 11, Feature::avx512vnni);
|
||||
enable(extended_features_ecx, 12, Feature::avx512bitalg);
|
||||
enable(extended_features_ecx, 14, Feature::avx512vpopcntdq);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,23 @@ fn x86_all() {
|
|||
"avx512vpopcntdq: {:?}",
|
||||
is_x86_feature_detected!("avx512vpopcntdq")
|
||||
);
|
||||
println!("avx512vbmi2 {:?}", is_x86_feature_detected!("avx512vbmi2"));
|
||||
println!("avx512gfni {:?}", is_x86_feature_detected!("avx512gfni"));
|
||||
println!("avx512vaes {:?}", is_x86_feature_detected!("avx512vaes"));
|
||||
println!(
|
||||
"avx512vpclmulqdq {:?}",
|
||||
is_x86_feature_detected!("avx512vpclmulqdq")
|
||||
);
|
||||
println!("avx512vnni {:?}", is_x86_feature_detected!("avx512vnni"));
|
||||
println!(
|
||||
"avx512bitalg {:?}",
|
||||
is_x86_feature_detected!("avx512bitalg")
|
||||
);
|
||||
println!("avx512bf16 {:?}", is_x86_feature_detected!("avx512bf16"));
|
||||
println!(
|
||||
"avx512vp2intersect {:?}",
|
||||
is_x86_feature_detected!("avx512vp2intersect")
|
||||
);
|
||||
println!("f16c: {:?}", is_x86_feature_detected!("f16c"));
|
||||
println!("fma: {:?}", is_x86_feature_detected!("fma"));
|
||||
println!("bmi1: {:?}", is_x86_feature_detected!("bmi1"));
|
||||
|
|
|
|||
|
|
@ -35,6 +35,23 @@ fn dump() {
|
|||
"avx512_vpopcntdq {:?}",
|
||||
is_x86_feature_detected!("avx512vpopcntdq")
|
||||
);
|
||||
println!("avx512vbmi2 {:?}", is_x86_feature_detected!("avx512vbmi2"));
|
||||
println!("avx512gfni {:?}", is_x86_feature_detected!("avx512gfni"));
|
||||
println!("avx512vaes {:?}", is_x86_feature_detected!("avx512vaes"));
|
||||
println!(
|
||||
"avx512vpclmulqdq {:?}",
|
||||
is_x86_feature_detected!("avx512vpclmulqdq")
|
||||
);
|
||||
println!("avx512vnni {:?}", is_x86_feature_detected!("avx512vnni"));
|
||||
println!(
|
||||
"avx512bitalg {:?}",
|
||||
is_x86_feature_detected!("avx512bitalg")
|
||||
);
|
||||
println!("avx512bf16 {:?}", is_x86_feature_detected!("avx512bf16"));
|
||||
println!(
|
||||
"avx512vp2intersect {:?}",
|
||||
is_x86_feature_detected!("avx512vp2intersect")
|
||||
);
|
||||
println!("fma: {:?}", is_x86_feature_detected!("fma"));
|
||||
println!("abm: {:?}", is_x86_feature_detected!("abm"));
|
||||
println!("bmi: {:?}", is_x86_feature_detected!("bmi1"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue