blasfeo icon indicating copy to clipboard operation
blasfeo copied to clipboard

blasfeo_dtrmm_rltn not implemented

Open markisus opened this issue 2 years ago • 1 comments

I don't believe blasfeo_dtrmm_rltn declared in blasfeo_d_blasfeo_api.h is actually implemented?

Here are the relevant build variables I used for compilation, taken from CMakeCache.txt

//Reference blas to use
EXTERNAL_BLAS:STRING=0

//Compile external dependencies in BLASFEO
EXT_DEP:BOOL=ON

//Standard fortran BLAS API
FORTRAN_BLAS_API:BOOL=OFF

//Maximum k value using stack memory
K_MAX_STACK:STRING=300

//Linear algebra backend
LA:STRING=HIGH_PERFORMANCE

//Matrix Format internally used in blasfeo_{d,s}mat struct
MF:STRING=PANELMAJ

//Target architecture
TARGET:STRING=GENERIC

//Use C99 extension to math library
USE_C99_MATH:BOOL=ON

Running nm on the resulting library reveals no code for the function in question. There is, however, the "ref" version.

nm libblasfeo.a | grep dtrmm_rltn

000000000000fb30 T blasfeo_ref_dtrmm_rltn
                 U blasfeo_cm_dtrmm_rltn
000000000000a730 T blasfeo_cm_dtrmm_rltn
0000000000006a70 T blasfeo_hp_cm_dtrmm_rltn

markisus avatar Jun 09 '22 03:06 markisus

Yes you are correct, all 16 versions of dtrmm are implemented for the reference back end (so they are there is you choose LA=REFERENCE), and they are also all implemented for the column-major matrix format (so when MF=COLMAJ), but only two of them are actually implemented when the high-performance back end and the panel-major matrix format are selected.

What is usually done in these cases is to implement a fallback to the reference back end when this is available, and exit when not. Or clearly to implement and optimize all routines for all targets, but this is a lot of work and rather done when something is needed :p

giaf avatar Jun 29 '22 15:06 giaf