1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

added AVXX VNNI support

This commit is contained in:
Abhishek Gola
2026-03-20 13:20:31 +05:30
parent f6aceee13b
commit ff2e6358fd
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -423,6 +423,7 @@ struct HWFeatures
g_hwFeatureNames[CPU_AVX_512VPOPCNTDQ] = "AVX512VPOPCNTDQ";
g_hwFeatureNames[CPU_AVX_5124VNNIW] = "AVX5124VNNIW";
g_hwFeatureNames[CPU_AVX_5124FMAPS] = "AVX5124FMAPS";
g_hwFeatureNames[CPU_AVX_VNNI] = "AVX_VNNI";
g_hwFeatureNames[CPU_NEON] = "NEON";
g_hwFeatureNames[CPU_NEON_DOTPROD] = "NEON_DOTPROD";
@@ -503,6 +504,11 @@ struct HWFeatures
have[CV_CPU_AVX_5124VNNIW] = (cpuid_data_ex[3] & (1<<2)) != 0;
have[CV_CPU_AVX_5124FMAPS] = (cpuid_data_ex[3] & (1<<3)) != 0;
// CPUID leaf 7, subleaf 1 for AVX-VNNI
int cpuid_data_ex1[4] = { 0, 0, 0, 0 };
CV_CPUID_X86(cpuid_data_ex1, 7, 1);
have[CV_CPU_AVX_VNNI] = (cpuid_data_ex1[0] & (1<<4)) != 0;
bool have_AVX_OS_support = true;
bool have_AVX512_OS_support = true;
if (!(cpuid_data[2] & (1<<27)))
@@ -527,6 +533,7 @@ struct HWFeatures
have[CV_CPU_FP16] = false;
have[CV_CPU_AVX2] = false;
have[CV_CPU_FMA3] = false;
have[CV_CPU_AVX_VNNI] = false;
}
if (!have_AVX_OS_support || !have_AVX512_OS_support)
{