Skip to content

Commit 9f7497f

Browse files
airborne12claude
andcommitted
fix: add CPU detection for Intel Emerald Rapids (Xeon Platinum 8575C)
Problem: Intel Xeon Platinum 8575C (Emerald Rapids, model 207 = exmodel 12, model 15) was incorrectly detected as PRESCOTT (Pentium 4 era) instead of SAPPHIRERAPIDS. Root cause: 1. In get_corename() function, case 12 (exmodel 12) only handled model 6 (Arrow Lake) but missed model 15 (Emerald Rapids) 2. Missing break statement caused fall-through to case 15 (family 15, which is Pentium 4), returning CORE_PRESCOTT incorrectly Changes: - cpuid_x86.c: Add case 15 (Emerald Rapids) to exmodel 12 switch and add missing break statement - dynamic.c: Add case 12 with model 15 for runtime detection of Emerald Rapids processors Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 77986e4 commit 9f7497f

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

cpuid_x86.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,6 +2424,7 @@ int get_coretype(void){
24242424
}
24252425
case 12:
24262426
switch (model) {
2427+
case 15: // Emerald Rapids (e.g., Intel Xeon Platinum 8575C)
24272428
case 6: // Arrow Lake
24282429
if(support_amx_bf16())
24292430
return CORE_SAPPHIRERAPIDS;
@@ -2438,6 +2439,7 @@ int get_coretype(void){
24382439
else
24392440
return CORE_NEHALEM;
24402441
}
2442+
break;
24412443
}
24422444
case 15:
24432445
if (model <= 0x2) return CORE_NORTHWOOD;

driver/others/dynamic.c

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ static gotoblas_t *get_coretype(void){
792792
}
793793
}
794794
if (model == 7) {
795-
if (support_avx512())
795+
if (support_avx512())
796796
return &gotoblas_SKYLAKEX;
797797
if(support_avx2())
798798
return &gotoblas_HASWELL;
@@ -803,7 +803,27 @@ static gotoblas_t *get_coretype(void){
803803
openblas_warning(FALLBACK_VERBOSE, NEHALEM_FALLBACK);
804804
return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
805805
}
806-
}
806+
}
807+
return NULL;
808+
case 12:
809+
// Emerald Rapids (e.g., Intel Xeon Platinum 8575C, model 207 = exmodel 12, model 15)
810+
if (model == 15) {
811+
if(support_amx_bf16())
812+
return &gotoblas_SAPPHIRERAPIDS;
813+
if(support_avx512_bf16())
814+
return &gotoblas_COOPERLAKE;
815+
if (support_avx512())
816+
return &gotoblas_SKYLAKEX;
817+
if(support_avx2())
818+
return &gotoblas_HASWELL;
819+
if(support_avx()) {
820+
openblas_warning(FALLBACK_VERBOSE, SANDYBRIDGE_FALLBACK);
821+
return &gotoblas_SANDYBRIDGE;
822+
} else {
823+
openblas_warning(FALLBACK_VERBOSE, NEHALEM_FALLBACK);
824+
return &gotoblas_NEHALEM;
825+
}
826+
}
807827
return NULL;
808828
}
809829
break;

0 commit comments

Comments
 (0)