Skip to content

Commit

Permalink
Merge pull request #4303 from martin-frbg/ryzen-avx512
Browse files Browse the repository at this point in the history
Enable autodetection of Zen 3/4 cpus as their AVX512 Intel counterparts
  • Loading branch information
martin-frbg authored Nov 11, 2023
2 parents 95ed812 + 778e3b7 commit cad10a3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion cpuid_x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,13 @@ int get_cpuname(void){
else
return CPUTYPE_BARCELONA;
}
case 10: // Zen3
case 10: // Zen3/4
#ifndef NO_AVX512
if(support_avx512_bf16())
return CPUTYPE_COOPERLAKE;
if(support_avx512())
return CPUTYPE_SKYLAKEX;
#endif
if(support_avx())
#ifndef NO_AVX2
return CPUTYPE_ZEN;
Expand Down Expand Up @@ -2438,6 +2444,12 @@ int get_coretype(void){
// Ryzen 2
default:
// Matisse,Renoir Ryzen2 models
#ifndef NO_AVX512
if(support_avx512_bf16())
return CORE_COOPERLAKE;
if(support_avx512())
return CORE_SKYLAKEX;
#endif
if(support_avx())
#ifndef NO_AVX2
return CORE_ZEN;
Expand Down

0 comments on commit cad10a3

Please sign in to comment.