From f2917796c86245ca439274c3ac5a8e911bfe7e6c Mon Sep 17 00:00:00 2001 From: WillTrojak Date: Thu, 19 Sep 2024 11:12:18 +0100 Subject: [PATCH] Bug fixes from power9 compilation Signed-off-by: WillTrojak --- src/generator_gemm_mma_microkernel.c | 6 +++--- src/libxsmm_cpuid_ppc.c | 17 ++++++++--------- version.txt | 2 +- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/generator_gemm_mma_microkernel.c b/src/generator_gemm_mma_microkernel.c index 27570463c6..8d309b071d 100644 --- a/src/generator_gemm_mma_microkernel.c +++ b/src/generator_gemm_mma_microkernel.c @@ -51,7 +51,7 @@ void libxsmm_generator_gemm_mma_mk_load_trans( libxsmm_generated_code *io_gene unsigned int l_vec_ele = l_vec_len / l_databytes; unsigned int l_m_blocks = i_m / l_vec_ele; unsigned int l_n_blocks = (i_n + l_vec_ele - 1) / l_vec_ele; - unsigned int l_m_part; + unsigned int l_m_part = -1; unsigned int l_packed = ( ( i_m % l_vec_ele ) == 0 ) ? 1 : 0; /* Local copy of pointer */ @@ -232,7 +232,7 @@ void libxsmm_generator_gemm_mma_mk_load_acc( libxsmm_generated_code *io_generate unsigned int l_vec_ele = l_vec_len / l_databytes; unsigned int l_acc_vec = LIBXSMM_PPC64LE_ACC_WIDTH / LIBXSMM_PPC64LE_VSR_WIDTH; unsigned int l_m_blocks = i_m / l_vec_ele; - unsigned int l_m_part; + unsigned int l_m_part = -1; unsigned int l_packed = ( ( i_m % l_vec_ele ) == 0 ) ? 1 : 0; /* Local copies of pointer */ @@ -370,7 +370,7 @@ void libxsmm_generator_gemm_mma_mk_store_acc( libxsmm_generated_code *io_generat unsigned int l_vec_ele = l_vec_len / l_databytes; unsigned int l_acc_vec = LIBXSMM_PPC64LE_ACC_WIDTH / LIBXSMM_PPC64LE_VSR_WIDTH; unsigned int l_m_blocks = i_m / l_vec_ele; - unsigned int l_m_part; + unsigned int l_m_part = -1; unsigned int l_packed = ( ( i_m % l_vec_ele ) == 0 ) ? 1 : 0; /* Local copies of pointer */ diff --git a/src/libxsmm_cpuid_ppc.c b/src/libxsmm_cpuid_ppc.c index f9f61a1b94..09a64489c6 100644 --- a/src/libxsmm_cpuid_ppc.c +++ b/src/libxsmm_cpuid_ppc.c @@ -35,15 +35,14 @@ LIBXSMM_API int libxsmm_cpuid_ppc(libxsmm_cpuid_info* info) # if defined(LIBXSMM_CPUID_PPC_BASELINE) result = LIBXSMM_CPUID_PPC_BASELINE; # else - if (__builtin_cpu_supports("mma") > 0) { - result = LIBXSMM_PPC64LE_MMA; - } - else if (__builtin_cpu_supports("vsx") > 0) { - result = LIBXSMM_PPC64LE_VSX; - } - else if (__builtin_cpu_supports("fpu") > 0) { - result = LIBXSMM_PPC64LE_FPF; - } + +# if defined(_ARCH_PWR10) + result = LIBXSMM_PPC64LE_MMA; +# elif defined(_ARCH_PWR9) + result = LIBXSMM_PPC64LE_VSX; +# elif defined(_ARCH_PWR8) + result = LIBXSMM_PPC64LE_FPF; +# endif # endif } diff --git a/version.txt b/version.txt index 23ba2acc70..c4eb79365a 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -feature/power-1.17-3771 +feature/power-1.17-3772