Expand cpu mapping for future Zen cpus and use feature-based fallback for unknown...
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Wed, 18 May 2022 13:35:30 +0000 (15:35 +0200)
committerGitHub <noreply@github.com>
Wed, 18 May 2022 13:35:30 +0000 (15:35 +0200)
driver/others/dynamic.c

index df7fa67..9a693b0 100644 (file)
@@ -855,7 +855,11 @@ static gotoblas_t *get_coretype(void){
            openblas_warning(FALLBACK_VERBOSE, BARCELONA_FALLBACK);
            return &gotoblas_BARCELONA; //OS doesn't support AVX. Use old kernels.
           }
-      } else if (exfamily == 10) {  
+      } else if (exfamily == 10) {
+         if(support_avx512_bf16())
+           return &gotoblas_COOPERLAKE;
+         if(support_avx512())
+           return &gotoblas_SKYLAKEX;
          if(support_avx())
            return &gotoblas_ZEN;
          else{
@@ -863,7 +867,7 @@ static gotoblas_t *get_coretype(void){
            return &gotoblas_BARCELONA; //OS doesn't support AVX. Use old kernels.
           }
       }else {
-       return &gotoblas_BARCELONA;
+       return NULL;
       }
    
     }