Skip to content

Commit 778e3b7

Browse files
authored
Enable autodetection of current AMD cpus as their AVX512 Intel counterparts
1 parent 273f4e8 commit 778e3b7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

cpuid_x86.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,13 @@ int get_cpuname(void){
16601660
else
16611661
return CPUTYPE_BARCELONA;
16621662
}
1663-
case 10: // Zen3
1663+
case 10: // Zen3/4
1664+
#ifndef NO_AVX512
1665+
if(support_avx512_bf16())
1666+
return CPUTYPE_COOPERLAKE;
1667+
if(support_avx512())
1668+
return CPUTYPE_SKYLAKEX;
1669+
#endif
16641670
if(support_avx())
16651671
#ifndef NO_AVX2
16661672
return CPUTYPE_ZEN;
@@ -2438,6 +2444,12 @@ int get_coretype(void){
24382444
// Ryzen 2
24392445
default:
24402446
// Matisse,Renoir Ryzen2 models
2447+
#ifndef NO_AVX512
2448+
if(support_avx512_bf16())
2449+
return CORE_COOPERLAKE;
2450+
if(support_avx512())
2451+
return CORE_SKYLAKEX;
2452+
#endif
24412453
if(support_avx())
24422454
#ifndef NO_AVX2
24432455
return CORE_ZEN;

0 commit comments

Comments
 (0)