From 926e56e3892f58c82588a7eb6aa72ba302bc0b22 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 14 Nov 2024 14:04:25 -0800 Subject: [PATCH 1/3] Align GEMM3M parameters for GENERIC with ZGEMM and add P/Q/R --- param.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/param.h b/param.h index fee9195d02..27743c6ef3 100644 --- a/param.h +++ b/param.h @@ -4033,6 +4033,8 @@ Until then, just keep it different than DGEMM_DEFAULT_UNROLL_N to keep copy rout #define CGEMM_DEFAULT_UNROLL_N 2 #define ZGEMM_DEFAULT_UNROLL_N 2 #define XGEMM_DEFAULT_UNROLL_N 1 +#define CGEMM3M_DEFAULT_UNROLL_N 2 +#define ZGEMM3M_DEFAULT_UNROLL_N 2 #ifdef ARCH_X86 #define SGEMM_DEFAULT_UNROLL_M 2 @@ -4048,6 +4050,18 @@ Until then, just keep it different than DGEMM_DEFAULT_UNROLL_N to keep copy rout #define CGEMM_DEFAULT_UNROLL_M 2 #define ZGEMM_DEFAULT_UNROLL_M 2 #define XGEMM_DEFAULT_UNROLL_M 1 +#define CGEMM3M_DEFAULT_UNROLL_M 2 +#define ZGEMM3M_DEFAULT_UNROLL_M 2 +#define CGEMM3M_DEFAULT_P 448 +#define ZGEMM3M_DEFAULT_P 224 +#define XGEMM3M_DEFAULT_P 112 +#define CGEMM3M_DEFAULT_Q 224 +#define ZGEMM3M_DEFAULT_Q 224 +#define XGEMM3M_DEFAULT_Q 224 +#define CGEMM3M_DEFAULT_R 12288 +#define ZGEMM3M_DEFAULT_R 12288 +#define XGEMM3M_DEFAULT_R 12288 + #endif #ifdef ARCH_MIPS From 2a290dfc2c659f42715df84a94973b4be57c89e5 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 14 Nov 2024 14:07:08 -0800 Subject: [PATCH 2/3] forward GEMM3M calls for GENERIC targets to the regular C/ZGEMM for now --- interface/gemm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/gemm.c b/interface/gemm.c index 576e94593c..c9f810faa2 100644 --- a/interface/gemm.c +++ b/interface/gemm.c @@ -86,7 +86,7 @@ #endif static int (*gemm[])(blas_arg_t *, BLASLONG *, BLASLONG *, IFLOAT *, IFLOAT *, BLASLONG) = { -#ifndef GEMM3M +#if !defined(GEMM3M) || defined(GENERIC) GEMM_NN, GEMM_TN, GEMM_RN, GEMM_CN, GEMM_NT, GEMM_TT, GEMM_RT, GEMM_CT, GEMM_NR, GEMM_TR, GEMM_RR, GEMM_CR, From d04686acd8844443c8787148c7e22db35babbf05 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 14 Nov 2024 14:09:01 -0800 Subject: [PATCH 3/3] Re-enable the EXPRECISION option for non-Windows x86/x86_64 --- Makefile.system | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Makefile.system b/Makefile.system index 21a0fc3caa..48099d8bbb 100644 --- a/Makefile.system +++ b/Makefile.system @@ -446,7 +446,7 @@ endif ifeq ($(OSNAME), Linux) EXTRALIB += -lm -NO_EXPRECISION = 1 +#NO_EXPRECISION = 1 endif ifeq ($(OSNAME), Android) @@ -572,7 +572,7 @@ NO_BINARY_MODE = 1 endif ifeq ($(CORE), generic) -NO_EXPRECISION = 1 +#NO_EXPRECISION = 1 endif ifndef NO_EXPRECISION @@ -595,7 +595,7 @@ endif ifeq ($(ARCH), x86_64) ifeq ($(CORE), generic) -NO_EXPRECISION = 1 +#NO_EXPRECISION = 1 endif ifndef NO_EXPRECISION @@ -828,8 +828,8 @@ BINARY_DEFINED = 1 ifeq ($(F_COMPILER), GFORTRAN) ifeq ($(C_COMPILER), GCC) -# EXPRECISION = 1 -# CCOMMON_OPT += -DEXPRECISION +EXPRECISION = 1 +CCOMMON_OPT += -DEXPRECISION endif endif endif @@ -1392,17 +1392,15 @@ endif endif ifeq ($(F_COMPILER), CRAY) -CCOMMON_OPT += -DF_INTERFACE_CRAYFC +CCOMMON_OPT += -DF_INTERFACE_INTEL FCOMMON_OPT += -hnopattern ifdef INTERFACE64 ifneq ($(INTERFACE64), 0) FCOMMON_OPT += -s integer64 endif endif -ifeq ($(USE_OPENMP), 1) -FCOMMON_OPT += -fopenmp -else -FCOMMON_OPT += -fno-openmp +ifneq ($(USE_OPENMP), 1) +FCOMMON_OPT += -O noomp endif endif