Skip to content

Commit cac634f

Browse files
committed
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.
1 parent 9283c7c commit cac634f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/power/gemm_small_kernel_permit_power10.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ int CNAME(int transa, int transb, BLASLONG M, BLASLONG N, BLASLONG K, FLOAT alph
6969

7070
#endif
7171

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

8185
#endif
8286

0 commit comments

Comments
 (0)