Skip to content

Correct range limiting in trmv_thread and re-enable TRMV multithreading #2026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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