Merge branch 'yuyichao-skylake-id' into develop

This commit is contained in:
Zhang Xianyi 2015-09-09 10:48:15 -05:00
commit dfe1eef33b
2 changed files with 60 additions and 0 deletions

View File

@ -1133,6 +1133,16 @@ int get_cpuname(void){
return CPUTYPE_HASWELL; return CPUTYPE_HASWELL;
#else #else
return CPUTYPE_SANDYBRIDGE; return CPUTYPE_SANDYBRIDGE;
#endif
else
return CPUTYPE_NEHALEM;
case 14:
//Skylake
if(support_avx())
#ifndef NO_AVX2
return CPUTYPE_HASWELL;
#else
return CPUTYPE_SANDYBRIDGE;
#endif #endif
else else
return CPUTYPE_NEHALEM; return CPUTYPE_NEHALEM;
@ -1147,6 +1157,17 @@ int get_cpuname(void){
return CPUTYPE_HASWELL; return CPUTYPE_HASWELL;
#else #else
return CPUTYPE_SANDYBRIDGE; return CPUTYPE_SANDYBRIDGE;
#endif
else
return CPUTYPE_NEHALEM;
case 5:
case 14:
// Skylake
if(support_avx())
#ifndef NO_AVX2
return CPUTYPE_HASWELL;
#else
return CPUTYPE_SANDYBRIDGE;
#endif #endif
else else
return CPUTYPE_NEHALEM; return CPUTYPE_NEHALEM;
@ -1608,6 +1629,16 @@ int get_coretype(void){
return CORE_HASWELL; return CORE_HASWELL;
#else #else
return CORE_SANDYBRIDGE; return CORE_SANDYBRIDGE;
#endif
else
return CORE_NEHALEM;
case 14:
//Skylake
if(support_avx())
#ifndef NO_AVX2
return CORE_HASWELL;
#else
return CORE_SANDYBRIDGE;
#endif #endif
else else
return CORE_NEHALEM; return CORE_NEHALEM;
@ -1622,6 +1653,17 @@ int get_coretype(void){
return CORE_HASWELL; return CORE_HASWELL;
#else #else
return CORE_SANDYBRIDGE; return CORE_SANDYBRIDGE;
#endif
else
return CORE_NEHALEM;
case 5:
case 14:
// Skylake
if(support_avx())
#ifndef NO_AVX2
return CORE_HASWELL;
#else
return CORE_SANDYBRIDGE;
#endif #endif
else else
return CORE_NEHALEM; return CORE_NEHALEM;

View File

@ -252,6 +252,15 @@ static gotoblas_t *get_coretype(void){
return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels. return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
} }
} }
//Intel Skylake
if (model == 14) {
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; return NULL;
case 5: case 5:
//Intel Broadwell //Intel Broadwell
@ -263,6 +272,15 @@ static gotoblas_t *get_coretype(void){
return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels. return &gotoblas_NEHALEM; //OS doesn't support AVX. Use old kernels.
} }
} }
//Intel Skylake
if (model == 14 || model == 5) {
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; return NULL;
} }
case 0xf: case 0xf: