Skip to content

Conversation

martin-frbg
Copy link
Collaborator

fixes #3039 , xianyi's code has been languishing on the now heavily outdated small_matrix branch - the small matrix gemm support was already implemented in the meantime

@martin-frbg martin-frbg added this to the 0.3.28 milestone May 29, 2024
@martin-frbg martin-frbg merged commit 56bd57c into OpenMathLib:develop May 31, 2024
@ayappanec ayappanec mentioned this pull request Jun 1, 2024
@RajalakshmiSR
Copy link

Fails on Power Linux with gcc.

gemm_batch.c:117:6: note: in expansion of macro ‘CNAME’
  117 | void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE *  transa_array, enum CBLAS_TRANSPOSE * transb_array,
      |      ^~~~~
In file included from ../common.h:835,
                 from gemm_batch.c:36:
../cblas.h:446:6: note: previous declaration of ‘cblas_sbgemm_batch’ with type ‘void(enum CBLAS_ORDER,  enum CBLAS_TRANSPOSE *, enum CBLAS_TRANSPOSE *, blasint *, blasint *, blasint *, float *, bfloat16 **, blasint *, bfloat16 **, blasint *, float *, float **, blasint *, blasint,  blasint *)’ {aka ‘void(enum CBLAS_ORDER,  enum CBLAS_TRANSPOSE *, enum CBLAS_TRANSPOSE *, int *, int *, int *, float *, short unsigned int **, int *, short unsigned int **, int *, float *, float **, int *, int,  int *)’}
  446 | void cblas_sbgemm_batch(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransA_array, OPENBLAS_CONST enum CBLAS_TRANSPOSE * TransB_array, OPENBLAS_CONST blasint * M_array, OPENBLAS_CONST blasint * N_array, OPENBLAS_CONST blasint * K_array,
      |      ^~~~~~~~~~~~~~~~~~
cc -m64 -O3 -O2 -Wno-error=incompatible-pointer-types -DMAX_STACK_ALLOC=2048 -DHAVE_P10_SUPPORT -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DC_LAPACK -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=32 -DMAX_PARALLEL_NUMBER=1 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.27.dev\" -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math -DUSE_OPENMP -fopenmp -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I. -O2 -DSMALL_MATRIX_OPT -Wno-error=incompatible-pointer-types -DMAX_STACK_ALLOC=2048 -fopenmp -DHAVE_P10_SUPPORT -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DC_LAPACK -DSMP_SERVER -DUSE_OPENMP -DNO_WARMUP -DMAX_CPU_NUMBER=32 -DMAX_PARALLEL_NUMBER=1 -DBUILD_BFLOAT16 -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.27.dev\" -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math -DUSE_OPENMP -fopenmp -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME=isamin -DASMFNAME=isamin_ -DNAME=isamin_ -DCNAME=isamin -DCHAR_NAME=\"isamin_\" -DCHAR_CNAME=\"isamin\" -DNO_AFFINITY -I.. -I. -UDOUBLE  -UCOMPLEX -c -DUSE_ABS -DUSE_MIN imax.c -o isamin.o
make[1]: *** [Makefile:2423: cblas_sbgemm_batch.o] Error 1
make[1]: *** Waiting for unfinished jobs..```

@RajalakshmiSR
Copy link

RajalakshmiSR commented Jun 3, 2024

index 846d8e0f4..56ccc12ce 100644
--- a/interface/gemm_batch.c
+++ b/interface/gemm_batch.c
@@ -118,8 +118,8 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_TRANSPOSE *  transa_array, enum CB
           blasint * m_array, blasint * n_array, blasint * k_array,
 #ifndef COMPLEX
           FLOAT * alpha_array,
-          FLOAT ** a_array, blasint * lda_array,
-          FLOAT ** b_array, blasint * ldb_array,
+          IFLOAT ** a_array, blasint * lda_array,
+          IFLOAT ** b_array, blasint * ldb_array,
           FLOAT * beta_array,
           FLOAT ** c_array, blasint * ldc_array, blasint group_count, blasint * group_size) {
 #else

This should help to fix this issue.

@martin-frbg
Copy link
Collaborator Author

yes, that is what is in #4732

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WIP] cblas_?gemm_batch

2 participants