Browse Source

POWER10: Fix multithreading check when USE_THREAD=0

This patch fixes an issue when OpenBLAS is compiled for TARGET=POWER10
and the flag USE_THREAD is set to 0.

The function `num_cpu_avail` is only available when USE_THREAD=1,
so SMP is defined.
tags/v0.3.21
VFerrari 3 years ago
parent
commit
cac634fce3
No known key found for this signature in database GPG Key ID: 34FDC20517C508FB
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      kernel/power/gemm_small_kernel_permit_power10.c

+ 4
- 0
kernel/power/gemm_small_kernel_permit_power10.c View File

@@ -69,6 +69,7 @@ int CNAME(int transa, int transb, BLASLONG M, BLASLONG N, BLASLONG K, FLOAT alph

#endif

#ifdef SMP
// Multi-threading execution outperforms (or approaches) the execution of the
// small kernel.
if (num_cpu_avail(3) > 1) {
@@ -77,6 +78,9 @@ int CNAME(int transa, int transb, BLASLONG M, BLASLONG N, BLASLONG K, FLOAT alph
} else {
return 1;
}
#else
return 1;
#endif

#endif



Loading…
Cancel
Save