Ref #632. Support Intel Skylake by Haswell kernels.
authorYichao Yu <yyc1992@gmail.com>
Wed, 9 Sep 2015 15:00:23 +0000 (11:00 -0400)
committerYichao Yu <yyc1992@gmail.com>
Wed, 9 Sep 2015 15:07:33 +0000 (11:07 -0400)
cpuid_x86.c
driver/others/dynamic.c

index 4f97cfb..828ecc3 100644 (file)
@@ -1150,6 +1150,16 @@ int get_cpuname(void){
 #endif
           else
            return CPUTYPE_NEHALEM;
+        case 14:
+         // Skylake
+          if(support_avx())
+#ifndef NO_AVX2
+            return CPUTYPE_HASWELL;
+#else
+           return CPUTYPE_SANDYBRIDGE;
+#endif
+          else
+           return CPUTYPE_NEHALEM;
        }
        break;
       }
@@ -1625,6 +1635,16 @@ int get_coretype(void){
 #endif
           else
            return CORE_NEHALEM;
+       case 14:
+         // Skylake
+          if(support_avx())
+#ifndef NO_AVX2
+            return CORE_HASWELL;
+#else
+           return CORE_SANDYBRIDGE;
+#endif
+          else
+           return CORE_NEHALEM;
        }
        break;
       }
index ff80504..1f70b79 100644 (file)
@@ -263,6 +263,15 @@ static gotoblas_t *get_coretype(void){
            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;
       }
       case 0xf: