Skip to content

Commit

Permalink
windows: avx512 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ahorek committed Dec 8, 2023
1 parent 8259f47 commit ef5b285
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions client/hostinfo_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,7 @@ int get_processor_features(char* vendor, char* features, int features_size) {
FEATURE_TEST(std_supported, (std_edx & (1 << 29)), "tm ");

FEATURE_TEST(std_supported, (std_ecx & (1 << 0)), "pni ");
FEATURE_TEST(std_supported, (std_ecx & (1 << 1)), "pclmulqdq ");
FEATURE_TEST(std_supported, (std_ecx & (1 << 9)), "ssse3 ");
FEATURE_TEST(std_supported, (std_ecx & (1 << 12)), "fma ");
FEATURE_TEST(std_supported, (std_ecx & (1 << 13)), "cx16 ");
Expand All @@ -1328,6 +1329,24 @@ int get_processor_features(char* vendor, char* features, int features_size) {

if (is_avx_supported() && struc_ext_supported) {
FEATURE_TEST(struc_ext_supported, (struc_ebx & (1 << 5)), "avx2 ");
FEATURE_TEST(struc_ext_supported, (struc_ebx & (1 << 16)), "avx512f ");
FEATURE_TEST(struc_ext_supported, (struc_ebx & (1 << 17)), "avx512dq ");
FEATURE_TEST(struc_ext_supported, (struc_ebx & (1 << 19)), "adx ");
FEATURE_TEST(struc_ext_supported, (struc_ebx & (1 << 21)), "avx512ifma ");
FEATURE_TEST(struc_ext_supported, (struc_ebx & (1 << 26)), "avx512pf ");
FEATURE_TEST(struc_ext_supported, (struc_ebx & (1 << 27)), "avx512er ");
FEATURE_TEST(struc_ext_supported, (struc_ebx & (1 << 28)), "avx512cd ");
FEATURE_TEST(struc_ext_supported, (struc_ebx & (1 << 30)), "avx512bw ");
FEATURE_TEST(struc_ext_supported, (struc_ebx & (1 << 31)), "avx512vl ");

FEATURE_TEST(struc_ext_supported, (struc_ecx & (1 << 1)), "avx512vbmi ");
FEATURE_TEST(struc_ext_supported, (struc_ecx & (1 << 6)), "avx512_vbmi2 ");
FEATURE_TEST(struc_ext_supported, (struc_ecx & (1 << 8)), "gfni ");
FEATURE_TEST(struc_ext_supported, (struc_ecx & (1 << 9)), "vaes ");
FEATURE_TEST(struc_ext_supported, (struc_ecx & (1 << 10)), "vpclmulqdq ");
FEATURE_TEST(struc_ext_supported, (struc_ecx & (1 << 11)), "avx512_vnni ");
FEATURE_TEST(struc_ext_supported, (struc_ecx & (1 << 12)), "avx512_bitalg ");
FEATURE_TEST(struc_ext_supported, (struc_ecx & (1 << 14)), "avx512_vpopcntdq ");
}

if (intel_supported) {
Expand Down

0 comments on commit ef5b285

Please sign in to comment.