Skip to content

Commit 303903e

Browse files
committed
Handle emerald rapids model
1 parent 18638c7 commit 303903e

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

cpuid_x86.c

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,19 @@ int get_cpuname(void){
15861586
else
15871587
return CPUTYPE_NEHALEM;
15881588
break;
1589-
case 15:
1589+
case 15: // Emerald Rapids
1590+
if(support_amx_bf16())
1591+
return CPUTYPE_SAPPHIRERAPIDS;
1592+
if(support_avx512_bf16())
1593+
return CPUTYPE_COOPERLAKE;
1594+
if(support_avx512())
1595+
return CPUTYPE_SKYLAKEX;
1596+
if(support_avx2())
1597+
return CPUTYPE_HASWELL;
1598+
if(support_avx())
1599+
return CPUTYPE_SANDYBRIDGE;
1600+
else
1601+
return CPUTYPE_NEHALEM;
15901602
case 6: // Arrow Lake
15911603
if(support_avx512())
15921604
return CPUTYPE_SAPPHIRERAPIDS;
@@ -2456,6 +2468,19 @@ int get_coretype(void){
24562468
}
24572469
case 12:
24582470
switch (model) {
2471+
case 15: // Emerald Rapids
2472+
if(support_amx_bf16())
2473+
return CORE_SAPPHIRERAPIDS;
2474+
if(support_avx512_bf16())
2475+
return CORE_COOPERLAKE;
2476+
if(support_avx512())
2477+
return CORE_SKYLAKEX;
2478+
if(support_avx2())
2479+
return CORE_HASWELL;
2480+
if(support_avx())
2481+
return CORE_SANDYBRIDGE;
2482+
else
2483+
return CORE_NEHALEM;
24592484
case 6: // Arrow Lake
24602485
if(support_amx_bf16())
24612486
return CORE_SAPPHIRERAPIDS;

0 commit comments

Comments
 (0)