Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TARGETs for newer Intel CPUs - Kaby Lake, Knights Landing, Apollo Lake #1010

Merged
merged 12 commits into from
Nov 7, 2016
44 changes: 43 additions & 1 deletion cpuid_x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -1205,8 +1205,34 @@ int get_cpuname(void){
#endif
else
return CPUTYPE_NEHALEM;
case 7:
// Xeon Phi Knights Landing
if(support_avx())
#ifndef NO_AVX2
return CPUTYPE_HASWELL;
#else
return CPUTYPE_SANDYBRIDGE;
#endif
else
return CPUTYPE_NEHALEM;
case 12:
// Apollo Lake
return CPUTYPE_NEHALEM;
}
break;
case 8:
switch (model) {
case 14: // Kaby Lake
if(support_avx())
#ifndef NO_AVX2
return CPUTYPE_HASWELL;
#else
return CPUTYPE_SANDYBRIDGE;
#endif
else
return CPUTYPE_NEHALEM;
}
break;
}
break;
case 0x7:
Expand Down Expand Up @@ -1713,8 +1739,24 @@ int get_coretype(void){
#endif
else
return CORE_NEHALEM;
}
case 7:
// Phi Knights Landing
if(support_avx())
#ifndef NO_AVX2
return CORE_HASWELL;
#else
return CORE_SANDYBRIDGE;
#endif
else
return CORE_NEHALEM;
case 12:
// Apollo Lake
return CORE_NEHALEM;
}
break;
case 8:
if (model == 14) // Kaby Lake
return CORE_HASWELL;
}
break;

Expand Down
24 changes: 23 additions & 1 deletion driver/others/dynamic.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ static gotoblas_t *get_coretype(void){
}
//Intel Braswell / Avoton
if (model == 12 || model == 13) {
openblas_warning(FALLBACK_VERBOSE, NEHALEM_FALLBACK);
return &gotoblas_NEHALEM;
}
return NULL;
Expand All @@ -287,6 +286,29 @@ static gotoblas_t *get_coretype(void){
return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
}
}
//Intel Phi Knights Landing
if (model == 7) {
if(support_avx())
return &gotoblas_HASWELL;
else{
openblas_warning(FALLBACK_VERBOSE, NEHALEM_FALLBACK);
return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
}
}
//Apollo Lake
if (model == 14) {
return &gotoblas_NEHALEM;
}
return NULL;
case 8:
if (model == 14 ) { // Kaby Lake
if(support_avx())
return &gotoblas_HASWELL;
else{
openblas_warning(FALLBACK_VERBOSE, NEHALEM_FALLBACK);
return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
}
}
return NULL;
}
case 0xf:
Expand Down