[NDK] Issue Related to OpenBLAS NDK Implementation

38 views
Skip to first unread message

Yi Jin

unread,
Mar 7, 2022, 2:56:10 AM3/7/22
to OpenBLAS-users
Hi 

Currently my company tech team are trying to implement Mlpack to an Android project.  OpenBlas as an essential part that is required to implement into the project as well. 

Right now we are facing one issue during the implemation.

andriod studio error log:

Armadillo is requiring  "ssyrk_"

/Users/yi.jin/Desktop/untitled folder 10/ndkdemo/app/src/main/cpp/include/armadillo_bits/translate_blas.hpp:166: error: undefined reference to 'ssyrk_

Relevant .h files of OpenBlas are found at f77blas.h and cblas.h

f77blas.h
void BLASFUNC(ssyr2k)(char *, char *, blasint *, blasint *, float  *, float  *, blasint *,
           float *, blasint *, float  *, float  *, blasint *);
cblas.h
void cblas_ssyr2k(OPENBLAS_CONST enum CBLAS_ORDER Order, OPENBLAS_CONST enum CBLAS_UPLO Uplo, OPENBLAS_CONST enum CBLAS_TRANSPOSE Trans,
                  OPENBLAS_CONST blasint N, OPENBLAS_CONST blasint K, OPENBLAS_CONST float alpha, OPENBLAS_CONST float *A, OPENBLAS_CONST blasint lda, OPENBLAS_CONST float *B, OPENBLAS_CONST blasint ldb, OPENBLAS_CONST float beta, float *C, OPENBLAS_CONST blasint ldc);

but I can't find any .cpp file that shows the content of the ssyr2 method.

The project Android binary is provided from Google Drive link as well. 

build environment:
NDK: 21.1.6352462
SDK: min 23, target 30
gradle: 3.4.0

Please advise.

Thanks a lot.

Best 

Yi Jin

martin-frbg

unread,
Mar 27, 2022, 8:52:01 AM3/27/22
to OpenBLAS-users
Are you looking for ssyr, ssyr2 or ssyr2k ? Generally, the code flow is from "interface" (e.g. interface/syr.c for ssyr and dsyr) to files in driver/level2 (Level 2 BLAS syr, syr2) or driver/level3 (Level 3 BLAS routines syrk, syr2k) to the respective cpu-specific microkernels in kernel/<architecture> (e.g. kernel/arm64/). SYR and SYR2 are implemented in the drivers by calling AXPY, SYRK/SYRK2 via GEMM, so you do not see any SYR (etc.) microkernels as such. Can you check the generated OpenBLAS library with something like "nm" or "objdump" so check if the symbol is really missing ?
Reply all
Reply to author
Forward
0 new messages