Skip to content

Commit

Permalink
Merge pull request #2026 from martin-frbg/trmv_threads
Browse files Browse the repository at this point in the history
Correct range limiting in trmv_thread and re-enable TRMV multithreading
  • Loading branch information
martin-frbg authored Mar 4, 2019
2 parents 12f2b76 + 45333d5 commit 10d841d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions driver/level2/trmv_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ int CNAME(BLASLONG m, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG incx, FLOAT *bu

range_m[MAX_CPU_NUMBER - num_cpu - 1] = range_m[MAX_CPU_NUMBER - num_cpu] - width;
range_n[num_cpu] = num_cpu * (((m + 15) & ~15) + 16);
if (range_n[num_cpu] > m) range_n[num_cpu] = m;
if (range_n[num_cpu] > m * num_cpu) range_n[num_cpu] = m * num_cpu;

queue[num_cpu].mode = mode;
queue[num_cpu].routine = trmv_kernel;
Expand Down Expand Up @@ -386,7 +386,7 @@ int CNAME(BLASLONG m, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG incx, FLOAT *bu

range_m[num_cpu + 1] = range_m[num_cpu] + width;
range_n[num_cpu] = num_cpu * (((m + 15) & ~15) + 16);
if (range_n[num_cpu] > m) range_n[num_cpu] = m;
if (range_n[num_cpu] > m * num_cpu) range_n[num_cpu] = m * num_cpu;

queue[num_cpu].mode = mode;
queue[num_cpu].routine = trmv_kernel;
Expand Down
5 changes: 1 addition & 4 deletions interface/trmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,8 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo,
buffer = (FLOAT *)blas_memory_alloc(1);

#ifdef SMP
/* nthreads = num_cpu_avail(2);
nthreads = num_cpu_avail(2);

FIXME trmv_thread was found to be broken, see issue 1332 */
nthreads = 1;

if (nthreads == 1) {
#endif

Expand Down
3 changes: 0 additions & 3 deletions interface/ztrmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,6 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo,
} else
nthreads = 1;

/* FIXME TRMV multithreading appears to be broken, see issue 1332*/
nthreads = 1;

if(nthreads > 1) {
buffer_size = n > 16 ? 0 : n * 4 + 40;
}
Expand Down

0 comments on commit 10d841d

Please sign in to comment.