Browse Source

Merge pull request #1382 from martin-frbg/dtrmv-1332

Work around errors in multithreaded dtrmv
tags/v0.3.0
Martin Kroeker GitHub 8 years ago
parent
commit
c49c6b237d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions
  1. +6
    -2
      driver/level2/trmv_U.c
  2. +3
    -0
      interface/trmv.c

+ 6
- 2
driver/level2/trmv_U.c View File

@@ -54,12 +54,16 @@ int CNAME(BLASLONG m, FLOAT *a, BLASLONG lda, FLOAT *b, BLASLONG incb, FLOAT *bu
COPY_K(m, b, incb, buffer, 1); COPY_K(m, b, incb, buffer, 1);
} }


for (is = 0; is < m; is += DTB_ENTRIES){
/*FIXME the GEMV unrolling performed here was found to be broken, see issue 1332 */
/* Multiplying DTB size by 100 is just a quick-and-dirty hack to disable it for now[B */


min_i = MIN(m - is, DTB_ENTRIES);
for (is = 0; is < m; is += DTB_ENTRIES * 100){

min_i = MIN(m - is, DTB_ENTRIES * 100);


#ifndef TRANSA #ifndef TRANSA
if (is > 0){ if (is > 0){
fprintf(stderr,"WARNING unrolling of the trmv_U loop may give wrong results\n");
GEMV_N(is, min_i, 0, dp1, GEMV_N(is, min_i, 0, dp1,
a + is * lda, lda, a + is * lda, lda,
B + is, 1, B + is, 1,


+ 3
- 0
interface/trmv.c View File

@@ -220,6 +220,9 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo,
#ifdef SMP #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) { if (nthreads == 1) {
#endif #endif




Loading…
Cancel
Save