From d27b4f690c14b1f836f8c7a3c0e91e09d852f02e Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Tue, 1 Apr 2014 12:57:24 -0500 Subject: [PATCH 1/5] Use generic paths for toolchain in POWER7. Details: - Fixed issue #4. Thanks to Jeff Hammond for contributing changes. --- config/power7/make_defs.mk | 4 ++-- kernels/power7/3/test/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/power7/make_defs.mk b/config/power7/make_defs.mk index df3eb363b..de3f05b59 100644 --- a/config/power7/make_defs.mk +++ b/config/power7/make_defs.mk @@ -76,7 +76,7 @@ GIT_LOG := $(GIT) log --decorate # # --- Determine the C compiler and related flags --- -CC := /opt/at6.0/bin/powerpc64-linux-gcc +CC := gcc # Enable IEEE Standard 1003.1-2004 (POSIX.1d). # NOTE: This is needed to enable posix_memalign(). CPPROCFLAGS := -D_POSIX_C_SOURCE=200112L @@ -96,7 +96,7 @@ CFLAGS_KERNELS := $(CDBGFLAGS) $(CKOPTFLAGS) $(CVECFLAGS) $(CWARNFLAGS) $(CMISCF CFLAGS_NOOPT := $(CDBGFLAGS) $(CWARNFLAGS) $(CMISCFLAGS) $(CPPROCFLAGS) # --- Determine the archiver and related flags --- -AR := /opt/at6.0/bin/powerpc64-linux-ar +AR := ar ARFLAGS := cru # --- Determine the linker and related flags --- diff --git a/kernels/power7/3/test/Makefile b/kernels/power7/3/test/Makefile index 356cde9dd..15f27b811 100644 --- a/kernels/power7/3/test/Makefile +++ b/kernels/power7/3/test/Makefile @@ -1,5 +1,5 @@ -CC = /opt/at6.0/bin/powerpc64-linux-gcc +CC = gcc TARGET_ARCH = -m64 -mvsx TGTS = exp From 47a90e69dfde3f4f8fdf90654248a6b499fbadbc Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Tue, 1 Apr 2014 14:34:31 -0500 Subject: [PATCH 2/5] Attempted to fix uninitialized variable warnings. Details: - Added initialization statements to various macros used in level 1m and 1m-like operations. I wasn't able to reproduce the reported behavior, so hopefully this takes care of it. Thanks to Jeff Hammond for the report. --- frame/include/bli_param_macro_defs.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frame/include/bli_param_macro_defs.h b/frame/include/bli_param_macro_defs.h index 4cfa45e71..c235e420e 100644 --- a/frame/include/bli_param_macro_defs.h +++ b/frame/include/bli_param_macro_defs.h @@ -581,6 +581,11 @@ uplo_eff, n_elem_max, n_iter, inca, lda, \ ij0, n_shift ) \ { \ + /* This is to prevent the compiler from warning about uninitialized + variables. */ \ + ij0 = 0; \ + n_shift = 0; \ +\ /* If matrix A is entirely "unstored", that is, if either: - A is lower-stored and entirely above the diagonal, or - A is upper-stored and entirely below the diagonal @@ -669,6 +674,11 @@ ij0, n_shift \ ) \ { \ + /* This is to prevent the compiler from warning about uninitialized + variables. */ \ + ij0 = 0; \ + n_shift = 0; \ +\ /* If matrix A is entirely "unstored", that is, if either: - A is lower-stored and entirely above the diagonal, or - A is upper-stored and entirely below the diagonal @@ -749,6 +759,11 @@ ij0, n_shift \ ) \ { \ + /* This is to prevent the compiler from warning about uninitialized + variables. */ \ + ij0 = 0; \ + n_shift = 0; \ +\ /* If matrix A is entirely "unstored", that is, if either: - A is lower-stored and entirely above the diagonal, or - A is upper-stored and entirely below the diagonal From b5150a1bf3bd89598e2b3aeac110eb5b44ac6c12 Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Thu, 3 Apr 2014 12:25:45 -0500 Subject: [PATCH 3/5] Added #include "arm_neon.h" to ARM gemm ukernel. Details: - Inserted #include "arm_neon.h" into gemm ukernel source file for arm/neon. Thanks to Jean-Michel Hautbois for suggesting this fix. --- kernels/arm/neon/3/bli_gemm_opt_4x4.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernels/arm/neon/3/bli_gemm_opt_4x4.c b/kernels/arm/neon/3/bli_gemm_opt_4x4.c index 54710b4ae..6c6fe4fbe 100644 --- a/kernels/arm/neon/3/bli_gemm_opt_4x4.c +++ b/kernels/arm/neon/3/bli_gemm_opt_4x4.c @@ -33,6 +33,7 @@ */ #include "blis.h" +#include "arm_neon.h" void bli_sgemm_opt_4x4( dim_t k, From c318157a9bee8ea6e59be16f99f65d9271fe0d27 Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Thu, 3 Apr 2014 16:24:34 -0500 Subject: [PATCH 4/5] Fixed issue #6 (incorrect 'restrict' usage). Details: - Fixed improper usage of restrict keyword in axpyv and dotv bgq kernels. (However, there may be other instances of similar misuse elsewhere in BLIS.) Thanks to Jeff Hammond for reporting this issue. --- kernels/bgq/1/bli_axpyv_opt_var1.c | 10 +++------- kernels/bgq/1/bli_dotv_opt_var1.c | 11 ++++------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/kernels/bgq/1/bli_axpyv_opt_var1.c b/kernels/bgq/1/bli_axpyv_opt_var1.c index a6fb43daa..495ab606e 100644 --- a/kernels/bgq/1/bli_axpyv_opt_var1.c +++ b/kernels/bgq/1/bli_axpyv_opt_var1.c @@ -37,15 +37,11 @@ void bli_daxpyv_opt_var1( conj_t conjx, dim_t n, - double* restrict alpha_in, - double* restrict x_in, inc_t incx, - double* restrict y_in, inc_t incy + double* restrict alpha, + double* restrict x, inc_t incx, + double* restrict y, inc_t incy ) { - double* restrict alpha = alpha_in; - double* restrict x = x_in; - double* restrict y = y_in; - if ( bli_zero_dim1( n ) ) return; // If there is anything that would interfere with our use of aligned diff --git a/kernels/bgq/1/bli_dotv_opt_var1.c b/kernels/bgq/1/bli_dotv_opt_var1.c index 7fceb2ec3..2cb623db2 100644 --- a/kernels/bgq/1/bli_dotv_opt_var1.c +++ b/kernels/bgq/1/bli_dotv_opt_var1.c @@ -38,16 +38,13 @@ void bli_ddotv_opt_var1( conj_t conjx, conj_t conjy, dim_t n, - double* restrict x_in, inc_t incx, - double* restrict y_in, inc_t incy, - double* restrict rho_in + double* restrict x, inc_t incx, + double* restrict y, inc_t incy, + double* restrict rho ) { - double* restrict x = x_in; - double* restrict y = y_in; - double* rho = rho_in; + bool_t use_ref = FALSE; - bool_t use_ref = FALSE; // If the vector lengths are zero, set rho to zero and return. if ( bli_zero_dim1( n ) ) { PASTEMAC(d,set0s)( rho ); From 21a0efb33d7435139e9c43c1a4787a6bff533e26 Mon Sep 17 00:00:00 2001 From: "Field G. Van Zee" Date: Thu, 3 Apr 2014 16:38:44 -0500 Subject: [PATCH 5/5] Fixed follow-up to issue #6. --- kernels/bgq/1/bli_axpyv_opt_var1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernels/bgq/1/bli_axpyv_opt_var1.c b/kernels/bgq/1/bli_axpyv_opt_var1.c index 495ab606e..163e8bb49 100644 --- a/kernels/bgq/1/bli_axpyv_opt_var1.c +++ b/kernels/bgq/1/bli_axpyv_opt_var1.c @@ -61,7 +61,7 @@ void bli_daxpyv_opt_var1( dim_t n_left = n % 4; vector4double xv, yv, zv; - vector4double alphav = vec_lds( 0 * sizeof(double), alpha ); + vector4double alphav = vec_lds( 0 * sizeof(double), (double*)alpha ); #pragma omp parallel for for ( dim_t i = 0; i < n_run; i++ )