Skip to content

Commit 2c445be

Browse files
authored
Merge pull request #3051 from martin-frbg/rocketlake
Add CPUID information for Intel Rocket Lake
2 parents da8d7f0 + 8656766 commit 2c445be

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

cpuid_x86.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,15 @@ int get_cpuname(void){
14361436
return CPUTYPE_SANDYBRIDGE;
14371437
else
14381438
return CPUTYPE_NEHALEM;
1439+
case 7: // Rocket Lake
1440+
if(support_avx512())
1441+
return CPUTYPE_SKYLAKEX;
1442+
if(support_avx2())
1443+
return CPUTYPE_HASWELL;
1444+
if(support_avx())
1445+
return CPUTYPE_SANDYBRIDGE;
1446+
else
1447+
return CPUTYPE_NEHALEM;
14391448
}
14401449
break;
14411450
}
@@ -2014,6 +2023,19 @@ int get_coretype(void){
20142023
#endif
20152024
else
20162025
return CORE_NEHALEM;
2026+
case 7:// Rocket Lake
2027+
#ifndef NO_AVX512
2028+
if(support_avx512())
2029+
return CORE_SKYLAKEX;
2030+
#endif
2031+
#ifndef NO_AVX2
2032+
if(support_avx2())
2033+
return CORE_HASWELL;
2034+
#endif
2035+
if(support_avx())
2036+
return CORE_SANDYBRIDGE;
2037+
else
2038+
return CORE_NEHALEM;
20172039
}
20182040
case 5:
20192041
switch (model) {

driver/others/dynamic.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ static gotoblas_t *get_coretype(void){
656656
}
657657
}
658658
case 10:
659-
if (model == 5 || model == 6) {
659+
if (model == 5 || model == 6) {
660660
if(support_avx2())
661661
return &gotoblas_HASWELL;
662662
if(support_avx()) {
@@ -666,7 +666,20 @@ static gotoblas_t *get_coretype(void){
666666
openblas_warning(FALLBACK_VERBOSE, NEHALEM_FALLBACK);
667667
return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
668668
}
669-
}
669+
}
670+
if (model == 7) {
671+
if (support_avx512())
672+
return &gotoblas_SKYLAKEX;
673+
if(support_avx2())
674+
return &gotoblas_HASWELL;
675+
if(support_avx()) {
676+
openblas_warning(FALLBACK_VERBOSE, SANDYBRIDGE_FALLBACK);
677+
return &gotoblas_SANDYBRIDGE;
678+
} else {
679+
openblas_warning(FALLBACK_VERBOSE, NEHALEM_FALLBACK);
680+
return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
681+
}
682+
}
670683
return NULL;
671684
}
672685
case 0xf:

0 commit comments

Comments
 (0)