From 8229c163b7c0ce9ead73264b4f36487a91a3889d Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 26 Mar 2020 21:12:56 +0100 Subject: [PATCH 1/2] Use runtime check for AVX512 (sgemm_direct) capability when using DYNAMIC_ARCH --- interface/gemm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/gemm.c b/interface/gemm.c index 8a1d50f4e..0b18d9a8c 100644 --- a/interface/gemm.c +++ b/interface/gemm.c @@ -273,7 +273,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, enum CBLAS_TRANS #if !defined(COMPLEX) && !defined(DOUBLE) && defined(USE_SGEMM_KERNEL_DIRECT) #ifdef DYNAMIC_ARCH - if (gotoblas == &gotoblas_SKYLAKEX) + if (support_avx512() ) #endif if (beta == 0 && alpha == 1.0 && order == CblasRowMajor && TransA == CblasNoTrans && TransB == CblasNoTrans && sgemm_kernel_direct_performant(m,n,k)) { sgemm_kernel_direct(m, n, k, a, lda, b, ldb, c, ldc); From 79fd006c58157351e847d9afa9efb52e76f00e43 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 26 Mar 2020 21:25:39 +0100 Subject: [PATCH 2/2] Expose the support_avx512 function provided in dynamic.c --- common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common.h b/common.h index a9fe8d911..762968e6f 100644 --- a/common.h +++ b/common.h @@ -657,6 +657,8 @@ void gotoblas_dynamic_init(void); void gotoblas_dynamic_quit(void); void gotoblas_profile_init(void); void gotoblas_profile_quit(void); + +int support_avx512(void); #ifdef USE_OPENMP