From 09ba0994615c2e78570ca400bf13da0a8a45d873 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 25 Feb 2025 12:10:48 +0100 Subject: [PATCH] make throttling code conditional on SMP --- interface/gemm.c | 2 ++ interface/gemv.c | 9 ++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/interface/gemm.c b/interface/gemm.c index 67ab42b48..d36925629 100644 --- a/interface/gemm.c +++ b/interface/gemm.c @@ -177,6 +177,7 @@ static int init_amxtile_permission() { } #endif +#ifdef SMP #ifdef DYNAMIC_ARCH extern char* gotoblas_corename(void); #endif @@ -242,6 +243,7 @@ static inline int get_gemm_optimal_nthreads(double MNK) { } } } +#endif #ifndef CBLAS diff --git a/interface/gemv.c b/interface/gemv.c index 4bcdf07c4..533ea3a56 100644 --- a/interface/gemv.c +++ b/interface/gemv.c @@ -63,6 +63,7 @@ static int (*gemv_thread[])(BLASLONG, BLASLONG, FLOAT, FLOAT *, BLASLONG, FLOAT }; #endif +#ifdef SMP #ifdef DYNAMIC_ARCH extern char* gotoblas_corename(void); #endif @@ -108,6 +109,7 @@ static inline int get_gemv_optimal_nthreads(BLASLONG MN) { else return num_cpu_avail(2); } +#endif #ifndef CBLAS @@ -248,13 +250,6 @@ void CNAME(enum CBLAS_ORDER order, if (alpha == ZERO) return; -#if 0 -/* this optimization causes stack corruption on x86_64 under OSX, Windows and FreeBSD */ - if (trans == 0 && incx == 1 && incy == 1 && m*n < 2304 *GEMM_MULTITHREAD_THRESHOLD) { - GEMV_N(m, n, 0, alpha, a, lda, x, incx, y, incy, NULL); - return; - } -#endif IDEBUG_START; FUNCTION_PROFILE_START();