File tree 3 files changed +16
-0
lines changed
3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -729,6 +729,7 @@ void CPUINFO_ABI cpuinfo_deinitialize(void);
729
729
bool sse4a ;
730
730
bool misaligned_sse ;
731
731
bool avx ;
732
+ bool avxvnni ;
732
733
bool fma3 ;
733
734
bool fma4 ;
734
735
bool xop ;
@@ -1076,6 +1077,14 @@ static inline bool cpuinfo_has_x86_avx(void) {
1076
1077
#endif
1077
1078
}
1078
1079
1080
+ static inline bool cpuinfo_has_x86_avxvnni (void ) {
1081
+ #if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
1082
+ return cpuinfo_isa .avxvnni ;
1083
+ #else
1084
+ return false;
1085
+ #endif
1086
+ }
1087
+
1079
1088
static inline bool cpuinfo_has_x86_fma3 (void ) {
1080
1089
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
1081
1090
return cpuinfo_isa .fma3 ;
Original file line number Diff line number Diff line change @@ -496,6 +496,12 @@ struct cpuinfo_x86_isa cpuinfo_x86_detect_isa(
496
496
*/
497
497
isa .avx512fp16 = avx512_regs && !!(structured_feature_info0 .edx & UINT32_C (0x00800000 ));
498
498
499
+ /*
500
+ * AVX_VNNI instructions:
501
+ * - Intel: eax[bit 4] in structured feature info (ecx = 1).
502
+ */
503
+ isa .avxvnni = avx_regs && !!(structured_feature_info1 .eax & UINT32_C (0x00000010 ));
504
+
499
505
/*
500
506
* AVX512_BF16 instructions:
501
507
* - Intel: eax[bit 5] in structured feature info (ecx = 1).
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ int main(int argc, char** argv) {
72
72
printf ("\tAVX512VP2INTERSECT: %s\n" , cpuinfo_has_x86_avx512vp2intersect () ? "yes" : "no" );
73
73
printf ("\tAVX512_4VNNIW: %s\n" , cpuinfo_has_x86_avx512_4vnniw () ? "yes" : "no" );
74
74
printf ("\tAVX512_4FMAPS: %s\n" , cpuinfo_has_x86_avx512_4fmaps () ? "yes" : "no" );
75
+ printf ("\tAVXVNNI: %s\n" , cpuinfo_has_x86_avxvnni () ? "yes" : "no" );
75
76
76
77
77
78
printf ("Multi-threading extensions:\n" );
You can’t perform that action at this time.
0 commit comments