From acf3d34bc50f65ddfebb037ab9e377e6236dd960 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 14 Nov 2017 23:23:44 +0100 Subject: [PATCH 1/5] Silence an unused variable warning with a cast l2 cache size is not universally needed to assign default unrolling limits, but neither putting its declaration inside an ifdef nor cloning it into all ifdef sections that need it really makes sense here. --- kernel/setparam-ref.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/setparam-ref.c b/kernel/setparam-ref.c index 9320cb56c..b6c5b54de 100644 --- a/kernel/setparam-ref.c +++ b/kernel/setparam-ref.c @@ -684,6 +684,9 @@ static void init_parameter(void) { int l2 = get_l2_size(); + (void) l2; /* dirty trick to suppress unused variable warning for targets */ + /* where the GEMM unrolling parameters do not depend on l2 */ + TABLE_NAME.sgemm_q = SGEMM_DEFAULT_Q; TABLE_NAME.dgemm_q = DGEMM_DEFAULT_Q; TABLE_NAME.cgemm_q = CGEMM_DEFAULT_Q; From 65bf0a343c5c7e9661648317959b4c3f33ad0d4c Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 14 Nov 2017 23:25:50 +0100 Subject: [PATCH 2/5] Remove unused variable btpr --- kernel/generic/zimatcopy_cnc.c | 2 +- kernel/generic/zimatcopy_rn.c | 2 +- kernel/generic/zimatcopy_rnc.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/generic/zimatcopy_cnc.c b/kernel/generic/zimatcopy_cnc.c index 7fffe193a..8e772bd8a 100644 --- a/kernel/generic/zimatcopy_cnc.c +++ b/kernel/generic/zimatcopy_cnc.c @@ -35,7 +35,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. int CNAME(BLASLONG rows, BLASLONG cols, FLOAT alpha_r, FLOAT alpha_i, FLOAT *a, BLASLONG lda) { BLASLONG i,j,ia; - FLOAT *aptr,*bptr; + FLOAT *aptr; FLOAT a0, a1; if ( rows <= 0 ) return(0); diff --git a/kernel/generic/zimatcopy_rn.c b/kernel/generic/zimatcopy_rn.c index 95819bdf6..b3037d3e7 100644 --- a/kernel/generic/zimatcopy_rn.c +++ b/kernel/generic/zimatcopy_rn.c @@ -34,7 +34,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. int CNAME(BLASLONG rows, BLASLONG cols, FLOAT alpha_r, FLOAT alpha_i, FLOAT *a, BLASLONG lda) { BLASLONG i,j,ia; - FLOAT *aptr,*bptr; + FLOAT *aptr; FLOAT a0, a1; if ( rows <= 0 ) return(0); diff --git a/kernel/generic/zimatcopy_rnc.c b/kernel/generic/zimatcopy_rnc.c index c95644987..4c20865a3 100644 --- a/kernel/generic/zimatcopy_rnc.c +++ b/kernel/generic/zimatcopy_rnc.c @@ -34,7 +34,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. int CNAME(BLASLONG rows, BLASLONG cols, FLOAT alpha_r, FLOAT alpha_i, FLOAT *a, BLASLONG lda) { BLASLONG i,j,ia; - FLOAT *aptr,*bptr; + FLOAT *aptr; FLOAT a0, a1; if ( rows <= 0 ) return(0); From 5f402b7759d7a843c78239a1a10be64747524197 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 14 Nov 2017 23:29:42 +0100 Subject: [PATCH 3/5] Remove unused (loop?) variable j from the gemv_n_4 implementations --- kernel/x86_64/cgemv_n_4.c | 1 - kernel/x86_64/dgemv_n_4.c | 1 - kernel/x86_64/sgemv_n_4.c | 1 - kernel/x86_64/zgemv_n_4.c | 1 - 4 files changed, 4 deletions(-) diff --git a/kernel/x86_64/cgemv_n_4.c b/kernel/x86_64/cgemv_n_4.c index d0a2c84e2..14cc9fe09 100644 --- a/kernel/x86_64/cgemv_n_4.c +++ b/kernel/x86_64/cgemv_n_4.c @@ -216,7 +216,6 @@ static void add_y(BLASLONG n, FLOAT *src, FLOAT *dest, BLASLONG inc_dest,FLOAT a int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha_r,FLOAT alpha_i, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT *buffer) { BLASLONG i; - BLASLONG j; FLOAT *a_ptr; FLOAT *x_ptr; FLOAT *y_ptr; diff --git a/kernel/x86_64/dgemv_n_4.c b/kernel/x86_64/dgemv_n_4.c index f8234fbc1..a8437a016 100644 --- a/kernel/x86_64/dgemv_n_4.c +++ b/kernel/x86_64/dgemv_n_4.c @@ -204,7 +204,6 @@ static void add_y(BLASLONG n, FLOAT *src, FLOAT *dest, BLASLONG inc_dest) int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT *buffer) { BLASLONG i; - BLASLONG j; FLOAT *a_ptr; FLOAT *x_ptr; FLOAT *y_ptr; diff --git a/kernel/x86_64/sgemv_n_4.c b/kernel/x86_64/sgemv_n_4.c index 7c091c765..60074d3d9 100644 --- a/kernel/x86_64/sgemv_n_4.c +++ b/kernel/x86_64/sgemv_n_4.c @@ -292,7 +292,6 @@ static void add_y(BLASLONG n, FLOAT *src, FLOAT *dest, BLASLONG inc_dest) int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT *buffer) { BLASLONG i; - BLASLONG j; FLOAT *a_ptr; FLOAT *x_ptr; FLOAT *y_ptr; diff --git a/kernel/x86_64/zgemv_n_4.c b/kernel/x86_64/zgemv_n_4.c index 1d0f1e8f7..2d7fd5798 100644 --- a/kernel/x86_64/zgemv_n_4.c +++ b/kernel/x86_64/zgemv_n_4.c @@ -218,7 +218,6 @@ static void add_y(BLASLONG n, FLOAT *src, FLOAT *dest, BLASLONG inc_dest,FLOAT a int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha_r,FLOAT alpha_i, FLOAT *a, BLASLONG lda, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT *buffer) { BLASLONG i; - BLASLONG j; FLOAT *a_ptr; FLOAT *x_ptr; FLOAT *y_ptr; From 8f177621bc7f0829791b19080a77f49f3699fc9e Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 14 Nov 2017 23:32:25 +0100 Subject: [PATCH 4/5] Remove unused variables at0...at3 from ?symv_U --- kernel/x86_64/dsymv_U.c | 1 - kernel/x86_64/ssymv_U.c | 1 - 2 files changed, 2 deletions(-) diff --git a/kernel/x86_64/dsymv_U.c b/kernel/x86_64/dsymv_U.c index 226458bf7..61cb77a64 100644 --- a/kernel/x86_64/dsymv_U.c +++ b/kernel/x86_64/dsymv_U.c @@ -164,7 +164,6 @@ int CNAME(BLASLONG m, BLASLONG offset, FLOAT alpha, FLOAT *a, BLASLONG lda, FLOA FLOAT temp2; FLOAT *xp, *yp; FLOAT *a0,*a1,*a2,*a3; - FLOAT at0,at1,at2,at3; FLOAT tmp1[4]; FLOAT tmp2[4]; diff --git a/kernel/x86_64/ssymv_U.c b/kernel/x86_64/ssymv_U.c index 104b29355..691a071f7 100644 --- a/kernel/x86_64/ssymv_U.c +++ b/kernel/x86_64/ssymv_U.c @@ -164,7 +164,6 @@ int CNAME(BLASLONG m, BLASLONG offset, FLOAT alpha, FLOAT *a, BLASLONG lda, FLOA FLOAT temp2; FLOAT *xp, *yp; FLOAT *a0,*a1,*a2,*a3; - FLOAT at0,at1,at2,at3; FLOAT tmp1[4]; FLOAT tmp2[4]; From 3fea849bbf90e50ee2e22c56c4b82205dd85c745 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 14 Nov 2017 23:35:10 +0100 Subject: [PATCH 5/5] Remove unused variables from Haswell dtrmm and Bulldozer dtrsm --- kernel/x86_64/dtrmm_kernel_4x8_haswell.c | 12 ++++++++---- kernel/x86_64/dtrsm_kernel_LN_bulldozer.c | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/kernel/x86_64/dtrmm_kernel_4x8_haswell.c b/kernel/x86_64/dtrmm_kernel_4x8_haswell.c index ac8c97d03..70be88f07 100644 --- a/kernel/x86_64/dtrmm_kernel_4x8_haswell.c +++ b/kernel/x86_64/dtrmm_kernel_4x8_haswell.c @@ -167,24 +167,28 @@ int CNAME(BLASLONG bm,BLASLONG bn,BLASLONG bk,FLOAT alpha,FLOAT* ba,FLOAT* bb,FL FLOAT res4_0; FLOAT res4_1; +/* FLOAT res4_2; FLOAT res4_3; - +*/ FLOAT res5_0; FLOAT res5_1; +/* FLOAT res5_2; FLOAT res5_3; - +*/ FLOAT res6_0; FLOAT res6_1; +/* FLOAT res6_2; FLOAT res6_3; - +*/ FLOAT res7_0; FLOAT res7_1; +/* FLOAT res7_2; FLOAT res7_3; - +*/ FLOAT a0; FLOAT a1; diff --git a/kernel/x86_64/dtrsm_kernel_LN_bulldozer.c b/kernel/x86_64/dtrsm_kernel_LN_bulldozer.c index efd8a4972..0a4f9db2b 100644 --- a/kernel/x86_64/dtrsm_kernel_LN_bulldozer.c +++ b/kernel/x86_64/dtrsm_kernel_LN_bulldozer.c @@ -438,7 +438,9 @@ static inline void solve(BLASLONG m, BLASLONG n, FLOAT *a, FLOAT *b, FLOAT *c, B *(cj + i) = bb; b ++; +/* BLASLONG i1 = i & -4 ; +*/ FLOAT t0,t1,t2,t3; k=0;