From 76c6e33e54ac3f3fc5f811ca17d922391c0379b5 Mon Sep 17 00:00:00 2001 From: Martin Koehler Date: Tue, 7 Feb 2017 21:38:28 +0100 Subject: [PATCH] Enable EXCAVATOR kernels for A12-9800 --- cpuid_x86.c | 11 ++++++++++- driver/others/dynamic.c | 9 ++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/cpuid_x86.c b/cpuid_x86.c index 6b6bc0f..48ac1c1 100644 --- a/cpuid_x86.c +++ b/cpuid_x86.c @@ -1280,6 +1280,11 @@ int get_cpuname(void){ return CPUTYPE_PILEDRIVER; else return CPUTYPE_BARCELONA; //OS don't support AVX. + case 5: // New EXCAVATOR CPUS + if(support_avx()) + return CPUTYPE_EXCAVATOR; + else + return CPUTYPE_BARCELONA; //OS don't support AVX. case 0: switch(exmodel){ case 1: //AMD Trinity @@ -1786,7 +1791,11 @@ int get_coretype(void){ return CORE_PILEDRIVER; else return CORE_BARCELONA; //OS don't support AVX. - + case 5: // New EXCAVATOR + if(support_avx()) + return CORE_EXCAVATOR; + else + return CORE_BARCELONA; //OS don't support AVX. case 0: switch(exmodel){ case 1: //AMD Trinity diff --git a/driver/others/dynamic.c b/driver/others/dynamic.c index 9bb96b7..d569e70 100644 --- a/driver/others/dynamic.c +++ b/driver/others/dynamic.c @@ -354,7 +354,14 @@ 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(model == 0){ + }else if(model == 5){ + if(support_avx()) + return &gotoblas_EXCAVATOR; + else{ + openblas_warning(FALLBACK_VERBOSE, BARCELONA_FALLBACK); + return &gotoblas_BARCELONA; //OS doesn't support AVX. Use old kernels. + } + }else if(model == 0){ if (exmodel == 1) { //AMD Trinity if(support_avx()) -- 2.7.4