From 1963a666eb1a79b25b20ecf99cdf912f1f545910 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 15 Oct 2026 00:15:08 +0200 Subject: [PATCH 1/5] Remove spurious "indexed non-absolute complex min/max" functions --- cblas.h | 5 ----- common_interface.h | 4 ---- 2 files changed, 9 deletions(-) diff --git a/cblas.h b/cblas.h index 5cebc47d47..89b2f99cde 100644 --- a/cblas.h +++ b/cblas.h @@ -181,13 +181,8 @@ OPENBLAS_EXPORT double cblas_dzamin(OPENBLAS_CONST blasint n, OPENBLAS_CONST voi OPENBLAS_EXPORT CBLAS_INDEX cblas_ismax(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx); OPENBLAS_EXPORT CBLAS_INDEX cblas_idmax(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx); -OPENBLAS_EXPORT CBLAS_INDEX cblas_icmax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx); -OPENBLAS_EXPORT CBLAS_INDEX cblas_izmax(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx); - OPENBLAS_EXPORT CBLAS_INDEX cblas_ismin(OPENBLAS_CONST blasint n, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx); OPENBLAS_EXPORT CBLAS_INDEX cblas_idmin(OPENBLAS_CONST blasint n, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx); -OPENBLAS_EXPORT CBLAS_INDEX cblas_icmin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx); -OPENBLAS_EXPORT CBLAS_INDEX cblas_izmin(OPENBLAS_CONST blasint n, OPENBLAS_CONST void *x, OPENBLAS_CONST blasint incx); OPENBLAS_EXPORT void cblas_saxpy(OPENBLAS_CONST blasint n, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *x, OPENBLAS_CONST blasint incx, float *y, OPENBLAS_CONST blasint incy); OPENBLAS_EXPORT void cblas_daxpy(OPENBLAS_CONST blasint n, OPENBLAS_CONST double alpha, OPENBLAS_CONST double *x, OPENBLAS_CONST blasint incx, double *y, OPENBLAS_CONST blasint incy); diff --git a/common_interface.h b/common_interface.h index f201b20b31..44f524a490 100644 --- a/common_interface.h +++ b/common_interface.h @@ -151,8 +151,6 @@ blasint OPENBLAS_API(ixamax)(blasint *, xdouble *, blasint *); blasint OPENBLAS_API(ismax) (blasint *, float *, blasint *); blasint OPENBLAS_API(idmax) (blasint *, double *, blasint *); blasint OPENBLAS_API(iqmax) (blasint *, xdouble *, blasint *); -blasint OPENBLAS_API(icmax) (blasint *, float *, blasint *); -blasint OPENBLAS_API(izmax) (blasint *, double *, blasint *); blasint OPENBLAS_API(ixmax) (blasint *, xdouble *, blasint *); blasint OPENBLAS_API(isamin)(blasint *, float *, blasint *); @@ -165,8 +163,6 @@ blasint OPENBLAS_API(ixamin)(blasint *, xdouble *, blasint *); blasint OPENBLAS_API(ismin)(blasint *, float *, blasint *); blasint OPENBLAS_API(idmin)(blasint *, double *, blasint *); blasint OPENBLAS_API(iqmin)(blasint *, xdouble *, blasint *); -blasint OPENBLAS_API(icmin)(blasint *, float *, blasint *); -blasint OPENBLAS_API(izmin)(blasint *, double *, blasint *); blasint OPENBLAS_API(ixmin)(blasint *, xdouble *, blasint *); FLOATRET OPENBLAS_API(samax) (blasint *, float *, blasint *); From 4d7b24568c071361fcfbac12f143cfef95373eb6 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 15 Oct 2026 00:18:52 +0200 Subject: [PATCH 2/5] Remove spurious "complex non-absolute indexed min/max" functions --- interface/CMakeLists.txt | 14 +++++++++----- interface/Makefile | 16 ++-------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index ab78c1f07e..a41d41d505 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -137,16 +137,20 @@ endif () # gemmtr is gemmt under the name adopted by the Reference BLAS GenerateNamedObjects("gemmt.c" "RNAME" "gemmtr" ${CBLAS_FLAG}) - # max and imax are compiled 4 times - GenerateNamedObjects("max.c" "" "" ${CBLAS_FLAG}) + # absolute max and imax are compiled 4 times but non-absolute does not exist for complex + GenerateNamedObjects("max.c" "" "smax" ${CBLAS_FLAG} "" "" true "SINGLE") + GenerateNamedObjects("max.c" "" "dmax" ${CBLAS_FLAG} "" "" true "DOUBLE") GenerateNamedObjects("max.c" "USE_ABS" "amax" ${CBLAS_FLAG}) GenerateNamedObjects("max.c" "USE_ABS;USE_MIN" "amin" ${CBLAS_FLAG}) - GenerateNamedObjects("max.c" "USE_MIN" "min" ${CBLAS_FLAG}) + GenerateNamedObjects("max.c" "USE_MIN" "smin" ${CBLAS_FLAG} "" "" true "SINGLE") + GenerateNamedObjects("max.c" "USE_MIN" "dmin" ${CBLAS_FLAG} "" "" true "DOUBLE") - GenerateNamedObjects("imax.c" "" "i*max" ${CBLAS_FLAG}) + GenerateNamedObjects("imax.c" "" "ismax" ${CBLAS_FLAG} "" "" true "SINGLE") + GenerateNamedObjects("imax.c" "" "idmax" ${CBLAS_FLAG} "" "" true "DOUBLE") GenerateNamedObjects("imax.c" "USE_ABS" "i*amax" ${CBLAS_FLAG}) GenerateNamedObjects("imax.c" "USE_ABS;USE_MIN" "i*amin" ${CBLAS_FLAG}) - GenerateNamedObjects("imax.c" "USE_MIN" "i*min" ${CBLAS_FLAG}) + GenerateNamedObjects("imax.c" "USE_MIN" "ismin" ${CBLAS_FLAG} "" "" true "SINGLE") + GenerateNamedObjects("imax.c" "USE_MIN" "idmin" ${CBLAS_FLAG} "" "" true "DOUBLE") if (BUILD_BFLOAT16) GenerateNamedObjects("scal.c" "BGEMM" "bscal" ${CBLAS_FLAG} "" "" true "BFLOAT16") diff --git a/interface/Makefile b/interface/Makefile index 2b6b60c142..6683f00e12 100644 --- a/interface/Makefile +++ b/interface/Makefile @@ -369,7 +369,7 @@ CCBLAS1OBJS = \ cblas_cscal.$(SUFFIX) cblas_csscal.$(SUFFIX) \ cblas_cswap.$(SUFFIX) cblas_scnrm2.$(SUFFIX) \ cblas_caxpby.$(SUFFIX) cblas_scamax.$(SUFFIX) cblas_caxpyc.$(SUFFIX) cblas_scamin.$(SUFFIX) \ - cblas_icmin.$(SUFFIX) cblas_icmax.$(SUFFIX) cblas_scsum.$(SUFFIX) cblas_csrot.$(SUFFIX) cblas_crotg.$(SUFFIX) + cblas_scsum.$(SUFFIX) cblas_csrot.$(SUFFIX) cblas_crotg.$(SUFFIX) CCBLAS2OBJS = \ cblas_cgemv.$(SUFFIX) cblas_cgerc.$(SUFFIX) cblas_cgeru.$(SUFFIX) \ @@ -399,7 +399,7 @@ CZBLAS1OBJS = \ cblas_zscal.$(SUFFIX) cblas_zdscal.$(SUFFIX) \ cblas_zswap.$(SUFFIX) cblas_dznrm2.$(SUFFIX) \ cblas_zaxpby.$(SUFFIX) cblas_zaxpyc.$(SUFFIX) \ - cblas_izmin.$(SUFFIX) cblas_izmax.$(SUFFIX) cblas_dzsum.$(SUFFIX) cblas_zdrot.$(SUFFIX) cblas_zrotg.$(SUFFIX) + cblas_dzsum.$(SUFFIX) cblas_zdrot.$(SUFFIX) cblas_zrotg.$(SUFFIX) CZBLAS2OBJS = \ @@ -1611,18 +1611,6 @@ cblas_ismin.$(SUFFIX) cblas_ismin.$(PSUFFIX) : imax.c cblas_idmin.$(SUFFIX) cblas_idmin.$(PSUFFIX) : imax.c $(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -DUSE_MIN $< -o $(@F) -cblas_icmax.$(SUFFIX) cblas_icmax.$(PSUFFIX) : imax.c - $(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -UUSE_MIN $< -o $(@F) - -cblas_izmax.$(SUFFIX) cblas_izmax.$(PSUFFIX) : imax.c - $(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -UUSE_MIN $< -o $(@F) - -cblas_icmin.$(SUFFIX) cblas_icmin.$(PSUFFIX) : imax.c - $(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -DUSE_MIN $< -o $(@F) - -cblas_izmin.$(SUFFIX) cblas_izmin.$(PSUFFIX) : imax.c - $(CC) $(CFLAGS) -DCBLAS -c -UUSE_ABS -DUSE_MIN $< -o $(@F) - cblas_samax.$(SUFFIX) cblas_samax.$(PSUFFIX) : max.c $(CC) $(CFLAGS) -DCBLAS -c -DUSE_ABS -UUSE_MIN $< -o $(@F) From 0a4f05448a857f7e48fa066f369f1c4e83563eec Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 15 Oct 2026 00:20:10 +0200 Subject: [PATCH 3/5] Remove spurious "complex non-absolute indexed min/max" functions --- exports/gensymbol | 4 ++-- exports/gensymbol.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exports/gensymbol b/exports/gensymbol index d94ca4b447..0b65b1c540 100755 --- a/exports/gensymbol +++ b/exports/gensymbol @@ -92,7 +92,7 @@ cblasobjsc=" cblas_csscal cblas_cswap cblas_csymm cblas_csyr2k cblas_csyrk cblas_ctbmv cblas_cgeadd cblas_ctbsv cblas_ctpmv cblas_ctpsv cblas_ctrmm cblas_ctrmv cblas_ctrsm cblas_ctrsv cblas_scnrm2 cblas_scasum cblas_cgemmt cblas_cgemmtr - cblas_icamax cblas_icamin cblas_icmin cblas_icmax cblas_scsum cblas_cimatcopy cblas_comatcopy + cblas_icamax cblas_icamin cblas_scsum cblas_cimatcopy cblas_comatcopy cblas_caxpyc cblas_crotg cblas_csrot cblas_scamax cblas_scamin cblas_cgemm_batch cblas_cgemm_batch_strided " cblasobjsd=" @@ -126,7 +126,7 @@ cblasobjsz=" cblas_ztbmv cblas_ztbsv cblas_ztpmv cblas_ztpsv cblas_ztrmm cblas_ztrmv cblas_ztrsm cblas_ztrsv cblas_cdotc_sub cblas_cdotu_sub cblas_zdotc_sub cblas_zdotu_sub cblas_zaxpby cblas_zgeadd cblas_zgemmt cblas_zgemmtr - cblas_izamax cblas_izamin cblas_izmin cblas_izmax cblas_dzsum cblas_zimatcopy cblas_zomatcopy + cblas_izamax cblas_izamin cblas_dzsum cblas_zimatcopy cblas_zomatcopy cblas_zaxpyc cblas_zdrot cblas_zrotg cblas_dzamax cblas_dzamin cblas_zgemm_batch cblas_zgemm_batch_strided " diff --git a/exports/gensymbol.pl b/exports/gensymbol.pl index b03206e7a0..fca6ea14e1 100644 --- a/exports/gensymbol.pl +++ b/exports/gensymbol.pl @@ -91,7 +91,7 @@ cblas_csscal, cblas_cswap, cblas_csymm, cblas_csyr2k, cblas_csyrk, cblas_ctbmv, cblas_cgeadd, cblas_ctbsv, cblas_ctpmv, cblas_ctpsv, cblas_ctrmm, cblas_ctrmv, cblas_ctrsm, cblas_ctrsv, cblas_scnrm2, cblas_scasum, cblas_cgemmt, cblas_cgemmtr, - cblas_icamax, cblas_icamin, cblas_icmin, cblas_icmax, cblas_scsum,cblas_cimatcopy,cblas_comatcopy, + cblas_icamax, cblas_icamin, cblas_scsum,cblas_cimatcopy,cblas_comatcopy, cblas_caxpyc, cblas_crotg, cblas_csrot, cblas_scamax, cblas_scamin, cblas_cgemm_batch, cblas_cgemm_batch_strided); @cblasobjsd = ( @@ -123,7 +123,7 @@ cblas_ztbmv, cblas_ztbsv, cblas_ztpmv, cblas_ztpsv, cblas_ztrmm, cblas_ztrmv, cblas_ztrsm, cblas_ztrsv, cblas_cdotc_sub, cblas_cdotu_sub, cblas_zdotc_sub, cblas_zdotu_sub, cblas_zaxpby, cblas_zgeadd, cblas_zgemmt, cblas_zgemmtr, - cblas_izamax, cblas_izamin, cblas_izmin, cblas_izmax, cblas_dzsum,cblas_zimatcopy,cblas_zomatcopy, + cblas_izamax, cblas_izamin, cblas_dzsum,cblas_zimatcopy,cblas_zomatcopy, cblas_zaxpyc, cblas_zdrot, cblas_zrotg, cblas_dzamax, cblas_dzamin, cblas_zgemm_batch, cblas_zgemm_batch_strided); @cblasobjs = ( cblas_xerbla ); From 24068475f75e3cf577c57acb6d74051d8dff86bc Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 15 Oct 2026 00:27:18 +0200 Subject: [PATCH 4/5] Remove spurious "complex non-absolute min/max" functions --- common_c.h | 8 -------- common_macro.h | 8 -------- common_z.h | 8 -------- 3 files changed, 24 deletions(-) diff --git a/common_c.h b/common_c.h index f12561127b..31226f5ef1 100644 --- a/common_c.h +++ b/common_c.h @@ -44,12 +44,8 @@ #define CAMAX_K camax_k #define CAMIN_K camin_k -#define CMAX_K cmax_k -#define CMIN_K cmin_k #define ICAMAX_K icamax_k #define ICAMIN_K icamin_k -#define ICMAX_K icmax_k -#define ICMIN_K icmin_k #define CASUM_K casum_k #define CAXPYU_K caxpy_k #define CAXPYC_K caxpyc_k @@ -292,12 +288,8 @@ #define CAMAX_K gotoblas -> camax_k #define CAMIN_K gotoblas -> camin_k -#define CMAX_K gotoblas -> cmax_k -#define CMIN_K gotoblas -> cmin_k #define ICAMAX_K gotoblas -> icamax_k #define ICAMIN_K gotoblas -> icamin_k -#define ICMAX_K gotoblas -> icmax_k -#define ICMIN_K gotoblas -> icmin_k #define CASUM_K gotoblas -> casum_k #define CAXPYU_K gotoblas -> caxpy_k #define CAXPYC_K gotoblas -> caxpyc_k diff --git a/common_macro.h b/common_macro.h index 8ed813742b..6b0a61559f 100644 --- a/common_macro.h +++ b/common_macro.h @@ -1917,12 +1917,8 @@ #define AMAX_K ZAMAX_K #define AMIN_K ZAMIN_K -#define MAX_K ZMAX_K -#define MIN_K ZMIN_K #define IAMAX_K IZAMAX_K #define IAMIN_K IZAMIN_K -#define IMAX_K IZMAX_K -#define IMIN_K IZMIN_K #define ASUM_K ZASUM_K #define AXPYU_K ZAXPYU_K #define AXPYC_K ZAXPYC_K @@ -2437,12 +2433,8 @@ #define AMAX_K CAMAX_K #define AMIN_K CAMIN_K -#define MAX_K CMAX_K -#define MIN_K CMIN_K #define IAMAX_K ICAMAX_K #define IAMIN_K ICAMIN_K -#define IMAX_K ICMAX_K -#define IMIN_K ICMIN_K #define ASUM_K CASUM_K #define AXPYU_K CAXPYU_K #define AXPYC_K CAXPYC_K diff --git a/common_z.h b/common_z.h index 24f88595df..e1935787c2 100644 --- a/common_z.h +++ b/common_z.h @@ -44,12 +44,8 @@ #define ZAMAX_K zamax_k #define ZAMIN_K zamin_k -#define ZMAX_K zmax_k -#define ZMIN_K zmin_k #define IZAMAX_K izamax_k #define IZAMIN_K izamin_k -#define IZMAX_K izmax_k -#define IZMIN_K izmin_k #define ZASUM_K zasum_k #define ZAXPYU_K zaxpy_k #define ZAXPYC_K zaxpyc_k @@ -292,12 +288,8 @@ #define ZAMAX_K gotoblas -> zamax_k #define ZAMIN_K gotoblas -> zamin_k -#define ZMAX_K gotoblas -> zmax_k -#define ZMIN_K gotoblas -> zmin_k #define IZAMAX_K gotoblas -> izamax_k #define IZAMIN_K gotoblas -> izamin_k -#define IZMAX_K gotoblas -> izmax_k -#define IZMIN_K gotoblas -> izmin_k #define ZASUM_K gotoblas -> zasum_k #define ZAXPYU_K gotoblas -> zaxpy_k #define ZAXPYC_K gotoblas -> zaxpyc_k From c16031fa1dfe3279b0303e50d7f08604a66c4b63 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 15 Oct 2026 10:25:53 +0200 Subject: [PATCH 5/5] Properly wrap the S and D MIN/MAX entries in BUILD conditionals now that they are standalone --- interface/CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index a41d41d505..4e3f695a0b 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -138,19 +138,35 @@ endif () GenerateNamedObjects("gemmt.c" "RNAME" "gemmtr" ${CBLAS_FLAG}) # absolute max and imax are compiled 4 times but non-absolute does not exist for complex +if (BUILD_SINGLE) GenerateNamedObjects("max.c" "" "smax" ${CBLAS_FLAG} "" "" true "SINGLE") +endif() +if (BUILD_DOUBLE) GenerateNamedObjects("max.c" "" "dmax" ${CBLAS_FLAG} "" "" true "DOUBLE") +endif() GenerateNamedObjects("max.c" "USE_ABS" "amax" ${CBLAS_FLAG}) GenerateNamedObjects("max.c" "USE_ABS;USE_MIN" "amin" ${CBLAS_FLAG}) +if (BUILD_SINGLE) GenerateNamedObjects("max.c" "USE_MIN" "smin" ${CBLAS_FLAG} "" "" true "SINGLE") +endif() +if (BUILD_DOUBLE) GenerateNamedObjects("max.c" "USE_MIN" "dmin" ${CBLAS_FLAG} "" "" true "DOUBLE") +endif() +if (BUILD_SINGLE) GenerateNamedObjects("imax.c" "" "ismax" ${CBLAS_FLAG} "" "" true "SINGLE") +endif() +if (BUILD_DOUBLE) GenerateNamedObjects("imax.c" "" "idmax" ${CBLAS_FLAG} "" "" true "DOUBLE") +endif() GenerateNamedObjects("imax.c" "USE_ABS" "i*amax" ${CBLAS_FLAG}) GenerateNamedObjects("imax.c" "USE_ABS;USE_MIN" "i*amin" ${CBLAS_FLAG}) +if (BUILD_SINGLE) GenerateNamedObjects("imax.c" "USE_MIN" "ismin" ${CBLAS_FLAG} "" "" true "SINGLE") +endif() +if (BUILD_DOUBLE) GenerateNamedObjects("imax.c" "USE_MIN" "idmin" ${CBLAS_FLAG} "" "" true "DOUBLE") +endif() if (BUILD_BFLOAT16) GenerateNamedObjects("scal.c" "BGEMM" "bscal" ${CBLAS_FLAG} "" "" true "BFLOAT16")