mirror of
https://github.com/OpenMathLib/OpenBLAS
synced 2026-06-15 07:51:43 +08:00
Merge pull request #5516 from OpenMathLib/revert-4741-Pthread_Scalability_Improvement
Revert "Enhancing Core Utilization in BLAS Calls: A Scalable Architecture"
This commit is contained in:
@@ -588,8 +588,6 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
|
||||
InitializeCriticalSection((PCRITICAL_SECTION)&level3_lock);
|
||||
#else
|
||||
static pthread_mutex_t level3_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_cond_t level3_wakeup = PTHREAD_COND_INITIALIZER;
|
||||
volatile static BLASLONG CPU_AVAILABLE = MAX_CPU_NUMBER;
|
||||
#endif
|
||||
|
||||
blas_arg_t newarg;
|
||||
@@ -659,12 +657,6 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
|
||||
EnterCriticalSection((PCRITICAL_SECTION)&level3_lock);
|
||||
#else
|
||||
pthread_mutex_lock(&level3_lock);
|
||||
while(CPU_AVAILABLE < nthreads) {
|
||||
pthread_cond_wait(&level3_wakeup, &level3_lock);
|
||||
}
|
||||
CPU_AVAILABLE -= nthreads;
|
||||
WMB;
|
||||
pthread_mutex_unlock(&level3_lock);
|
||||
#endif
|
||||
|
||||
#ifdef USE_ALLOC_HEAP
|
||||
@@ -816,10 +808,6 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
|
||||
#elif defined(OS_WINDOWS)
|
||||
LeaveCriticalSection((PCRITICAL_SECTION)&level3_lock);
|
||||
#else
|
||||
pthread_mutex_lock(&level3_lock);
|
||||
CPU_AVAILABLE += nthreads;
|
||||
WMB;
|
||||
pthread_cond_signal(&level3_wakeup);
|
||||
pthread_mutex_unlock(&level3_lock);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user