Skip to content

Commit bc0691a

Browse files
authored
Merge pull request #4920 from martin-frbg/issue4917
Fix potential inaccuracy in multithreaded level3 related to SWITCH_RATIO
2 parents 0dfe42d + 8a1710d commit bc0691a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver/level3/level3_thread.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ static int gemm_driver(blas_arg_t *args, BLASLONG *range_m, BLASLONG
742742
num_parts = 0;
743743
while (n > 0){
744744
width = blas_quickdivide(n + nthreads - num_parts - 1, nthreads - num_parts);
745-
if (width < switch_ratio) {
745+
if (width < switch_ratio && width > 1) {
746746
width = switch_ratio;
747747
}
748748
width = round_up(n, width, GEMM_PREFERED_SIZE);

0 commit comments

Comments
 (0)