From 1d51ca579857b05a928336b4e9e961868182940b Mon Sep 17 00:00:00 2001 From: Chip Kerchner Date: Fri, 11 Oct 2024 16:08:48 -0500 Subject: [PATCH] Change multi-threading logic for SBGEMV to be the same as SGEMV. --- interface/sbgemv.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/interface/sbgemv.c b/interface/sbgemv.c index 89debe82da..fce86f8e46 100644 --- a/interface/sbgemv.c +++ b/interface/sbgemv.c @@ -178,21 +178,10 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE TransA, blasint m, blasi if (incy < 0) {y -= (leny - 1) * incy;} #ifdef SMP - int thread_thres_row = 20480; - if (trans) { - if (n <= thread_thres_row) { - nthreads = 1; - } else { - nthreads = num_cpu_avail(1); - } - } else { - if (m <= thread_thres_row) { - nthreads = 1; - } else { - nthreads = num_cpu_avail(1); - } - } - + if ( 1L * m * n < 115200L * GEMM_MULTITHREAD_THRESHOLD ) + nthreads = 1; + else + nthreads = num_cpu_avail(2); if (nthreads == 1) { #endif