From 20581bf303776f831c788ced24f179d720ec5c39 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 11 Sep 2021 14:36:27 +0200 Subject: [PATCH 1/5] Remove unused variable --- interface/zsyr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/zsyr.c b/interface/zsyr.c index 71d4dbf29..c70bd819e 100644 --- a/interface/zsyr.c +++ b/interface/zsyr.c @@ -119,7 +119,7 @@ void NAME(char *UPLO, blasint *N, FLOAT *ALPHA, void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int n, FLOAT alpha, FLOAT *x, int incx, FLOAT *a, int lda) { FLOAT *buffer; - int trans, uplo; + int uplo; blasint info; FLOAT * ALPHA = α FLOAT alpha_r = ALPHA[0]; From ef2471203068b64d648b1495c9399bc18e802788 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 11 Sep 2021 14:37:44 +0200 Subject: [PATCH 2/5] Move a conditionally used variable --- kernel/generic/dot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/generic/dot.c b/kernel/generic/dot.c index 5abbb735c..84568ee0b 100644 --- a/kernel/generic/dot.c +++ b/kernel/generic/dot.c @@ -47,7 +47,6 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) if ( (inc_x == 1) && (inc_y == 1) ) { - int n1 = n & -4; #if V_SIMD && !defined(DSDOT) const int vstep = v_nlanes_f32; const int unrollx4 = n & (-vstep * 4); @@ -84,6 +83,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) } dot = v_sum_f32(vsum0); #elif defined(DSDOT) + int n1 = n & -4; for (; i < n1; i += 4) { dot += (double) y[i] * (double) x[i] @@ -92,6 +92,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) + (double) y[i+3] * (double) x[i+3] ; } #else + int n1 = n & -4; for (; i < n1; i += 4) { dot += y[i] * x[i] From 7d873a329f477c676b39719d4f83a87a506cc0b9 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 11 Sep 2021 14:38:47 +0200 Subject: [PATCH 3/5] Add ifdefs around conditionally used functions --- kernel/x86_64/sgemv_n_4.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/x86_64/sgemv_n_4.c b/kernel/x86_64/sgemv_n_4.c index 90865c4b3..0d8cada75 100644 --- a/kernel/x86_64/sgemv_n_4.c +++ b/kernel/x86_64/sgemv_n_4.c @@ -115,6 +115,8 @@ static void sgemv_kernel_4x4(BLASLONG n, FLOAT **ap, FLOAT *xo, FLOAT *y, FLOAT #endif +#ifndef HAVE_SGEMV_N_SKYLAKE_KERNEL + #ifndef HAVE_KERNEL_4x2 static void sgemv_kernel_4x2( BLASLONG n, FLOAT **ap, FLOAT *x, FLOAT *y, FLOAT *alpha) __attribute__ ((noinline)); @@ -246,6 +248,8 @@ static void sgemv_kernel_4x1(BLASLONG n, FLOAT *ap, FLOAT *x, FLOAT *y, FLOAT *a #endif +#endif + static void add_y(BLASLONG n, FLOAT *src, FLOAT *dest, BLASLONG inc_dest) __attribute__ ((noinline)); static void add_y(BLASLONG n, FLOAT *src, FLOAT *dest, BLASLONG inc_dest) From 1085775bc68c7de6e4a93c0d920b5564c8e84706 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 11 Sep 2021 15:05:55 +0200 Subject: [PATCH 4/5] really remove the unused variable --- interface/zsyr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/interface/zsyr.c b/interface/zsyr.c index c70bd819e..54fb8a4e9 100644 --- a/interface/zsyr.c +++ b/interface/zsyr.c @@ -130,7 +130,6 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, int n, FLOAT alpha, FLO PRINT_DEBUG_CNAME; - trans = -1; uplo = -1; info = 0; From 0925dfe2c9a287f1fadfd20ea718e89b722c4de0 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 11 Sep 2021 15:30:19 +0200 Subject: [PATCH 5/5] One instance of kernel_4x1 is used even on SKX --- kernel/x86_64/sgemv_n_4.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/x86_64/sgemv_n_4.c b/kernel/x86_64/sgemv_n_4.c index 0d8cada75..e0778006f 100644 --- a/kernel/x86_64/sgemv_n_4.c +++ b/kernel/x86_64/sgemv_n_4.c @@ -172,6 +172,7 @@ static void sgemv_kernel_4x2( BLASLONG n, FLOAT **ap, FLOAT *x, FLOAT *y, FLOAT } +#endif #endif #ifndef HAVE_KERNEL_4x1 @@ -248,8 +249,6 @@ static void sgemv_kernel_4x1(BLASLONG n, FLOAT *ap, FLOAT *x, FLOAT *y, FLOAT *a #endif -#endif - static void add_y(BLASLONG n, FLOAT *src, FLOAT *dest, BLASLONG inc_dest) __attribute__ ((noinline)); static void add_y(BLASLONG n, FLOAT *src, FLOAT *dest, BLASLONG inc_dest)